I will change this.

From: david g. [mailto:notifications@github.com]
Sent: Tuesday, March 11, 2014 12:57 AM
To: Adobe-Consulting-Services/acs-aem-commons
Cc: gopal Kalyanaraman
Subject: Re: [acs-aem-commons] Feature/editable grid (#144)


In bundle/src/main/java/com/adobe/acs/commons/configpage/impl/ConfigurationsAdapterFactory.java:

> +            @Nonnull Class<AdapterType> clazz) {

> +        if (clazz == Configurations.class) {

> +            return (AdapterType) adaptToConfigurations(obj);

> +        }

> +        return null;

> +    }

> +

> +    private Configurations adaptToConfigurations(@CheckForNull Object obj) {

> +        if (obj == null) {

> +            return null;

> +        }

> +        final Page page = (Page) obj;

> +        HierarchyNodeInheritanceValueMap hvm = new HierarchyNodeInheritanceValueMap(page.getContentResource());

> +        String configPage = hvm.getInherited("configPage", "/etc/acs-commons/config/testgrid/testchild");

> +      if(!"".equals(configPage)){

> +          Resource configResource   = page.getContentResource().getResourceResolver().resolve(configPage+"/"+JcrConstants.JCR_CONTENT+"/grid");

This might be null and throw a NPE in the ConfigurationsImpl cstor (this.manager = resource.getResourceResolver().adaptTo(PageManager.class))

—
Reply to this email directly or view it on GitHub<https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/144/files#r10445893>.