brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request: Rest API location transformers use m...
Date Tue, 05 Apr 2016 11:27:27 GMT
GitHub user sjcorbett opened a pull request:

    https://github.com/apache/brooklyn-server/pull/99

    Rest API location transformers use mutable map

    LocationConfig contains null values which Guava's ImmutableMap rejects with a NullPointerException.
    
    This fixes an error observed when deploying the "Template 1: Server" sample to localhost
then running `br application <id>` with the CLI. The output from the CLI was "500 Server
Error". The server logs contained:
    
    ```
    java.lang.NullPointerException: null value in entry: byon.machineSpecs=null
    	at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33)
~[com.google.guava-guava-16.0.1.jar:na]
    	at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:135) ~[com.google.guava-guava-16.0.1.jar:na]
    	at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:206) ~[com.google.guava-guava-16.0.1.jar:na]
    	at org.apache.brooklyn.rest.transform.LocationTransformer.copyConfig(LocationTransformer.java:128)
~[org.apache.brooklyn-brooklyn-rest-resources-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    	at org.apache.brooklyn.rest.transform.LocationTransformer.newInstance(LocationTransformer.java:189)
~[org.apache.brooklyn-brooklyn-rest-resources-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    	at org.apache.brooklyn.rest.resources.LocationResource.get(LocationResource.java:139)
~[org.apache.brooklyn-brooklyn-rest-resources-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    	at org.apache.brooklyn.rest.resources.LocationResource.get(LocationResource.java:132)
~[org.apache.brooklyn-brooklyn-rest-resources-0.10.0-SNAPSHOT.jar:0.10.0-SNAPSHOT]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_05]
    
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sjcorbett/brooklyn-server fix/location-spec

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-server/pull/99.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #99
    
----
commit 067c208fc3e23658dc757dcc5c203c6dab928482
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Date:   2016-04-05T11:25:46Z

    Rest API location transformers use mutable map
    
    LocationConfig contains null values which Guava's ImmutableMap rejects
    with a NullPointerException

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message