Uploaded image for project: '[Archived] Aikau'
  1. [Archived] Aikau
  2. AKU-173

Surf: NPE when dependency file would be empty

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.8
    • Fix Version/s: 1.0.11
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Sprint 9

      Description

      While playing around with some Dev Env improvements, I discovered that Surf doesn't process non-local resources for dependency aggregation, e.g.:
      with the following package config:

      <package name="alfresco" location="http://localhost:8383/" />
      

      The freemarker templates fail to render due to a Null Pointer Exception in the surf dependency aggregation code:

      Caused by: java.lang.NullPointerException
      at org.springframework.extensions.surf.DojoDependencyHandler.outputDependency(DojoDependencyHandler.java:559)
      at org.springframework.extensions.surf.DojoDependencyHandler.getChecksumForDependencies(DojoDependencyHandler.java:413)
      at org.springframework.extensions.directives.ProcessJsonModelDirective.createExtensibilityDirectiveData(ProcessJsonModelDirective.java:365)
      at org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective.execute(AbstractExtensibilityDirective.java:133)
      at org.springframework.extensions.directives.JavaScriptDependencyDirective.execute(JavaScriptDependencyDirective.java:68)
      

      Further to this, the surf specific behaviour around processing of i18n, css and nonAMD dependencies fail if the package is not located within the surf app. This is expected behaviour, but it's worth recording somewhere that external paths are supported by the Dojo Loader, but may not contain any files that aren't loaded directly by the loader.

      This is a minor issue that is unlikely to crop up in the product, but David Draper [X] asked me to capture it here.

        Attachments

          Activity

            People

            • Assignee:
              closedissues Closed Issues
              Reporter:
              dwebster David Webster [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: