[ 
https://issues.apache.org/jira/browse/GEODE-3033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037626#comment-16037626
 ] 

ASF GitHub Bot commented on GEODE-3033:
---------------------------------------

GitHub user YehEmily opened a pull request:

    https://github.com/apache/geode/pull/561

    GEODE-3033: Fixing NPE when jarFileNames is null in 
ClusterConfigurationLoader

    Thank you for submitting a contribution to Apache Geode.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in 
the commit message?
    
    - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically `develop`)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    - [ ] Does `gradlew build` run cleanly?
    
    - [ ] Have you written or updated unit tests to verify your changes?
    
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and
    submit an update to your PR as soon as possible. If you need help, please 
send an
    email to [email protected].


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

    $ git pull https://github.com/YehEmily/geode GEODE-3033

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

    https://github.com/apache/geode/pull/561.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 #561
    
----
commit b0044cdc9e7fbfc8db421b1af0d511df77fdbc1a
Author: YehEmily <[email protected]>
Date:   2017-06-05T21:21:31Z

    GEODE-3033: Fixing NPE when jarFileNames is null in 
ClusterConfigurationLoader

----


> NPE when jarFileNames is null in ClusterConfigurationLoader
> -----------------------------------------------------------
>
>                 Key: GEODE-3033
>                 URL: https://issues.apache.org/jira/browse/GEODE-3033
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh
>            Reporter: Emily Yeh
>            Assignee: Emily Yeh
>
> (Copied from original email by Barry Oglesby)
> I got this NPE attempting to roll from 9.0.4 to develop (starting a develop 
> server using a 9.0.4 locator):
> {code}
> Exception in thread "main" java.lang.NullPointerException
>       at java.util.Arrays.stream(Arrays.java:5004)
>       at java.util.stream.Stream.of(Stream.java:1000)
>       at 
> org.apache.geode.internal.cache.ClusterConfigurationLoader.deployJarsReceivedFromClusterConfiguration(ClusterConfigurationLoader.java:75)
>       at 
> org.apache.geode.internal.cache.GemFireCacheImpl.deployJarsReceivedFromClusterConfiguration(GemFireCacheImpl.java:1033)
>       at 
> org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1150)
>       at 
> org.apache.geode.internal.cache.GemFireCacheImpl.basicCreate(GemFireCacheImpl.java:758)
>       at 
> org.apache.geode.internal.cache.GemFireCacheImpl.create(GemFireCacheImpl.java:745)
>       at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:
> {code}    
> In this case, jarFileNames is null, so this line fails:
> {code}logger.info("Got response with jars: {}", 
> Stream.of(jarFileNames).collect(joining(",")));{code}
> Moving the logger message inside the null checks fixes the issue:
> {code}if (jarFileNames != null && jarBytes != null) {
>   logger.info("Got response with jars: {}", 
> Stream.of(jarFileNames).collect(joining(",")));{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to