You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by scop <gi...@git.apache.org> on 2016/07/28 17:04:37 UTC

[GitHub] activemq-artemis pull request #680: Null pointer/check related fixes

GitHub user scop opened a pull request:

    https://github.com/apache/activemq-artemis/pull/680

    Null pointer/check related fixes

    

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

    $ git pull https://github.com/scop/activemq-artemis npe

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

    https://github.com/apache/activemq-artemis/pull/680.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 #680
    
----
commit 0cbef6141246870618fcafa15d203aa34efd0ff8
Author: Ville Skytt� <vi...@iki.fi>
Date:   2016-07-28T16:58:10Z

    ARTEMIS-611 Remove redundant null check

commit 975b8672fe9d8f311a9c1731e763fa28279ddef5
Author: Ville Skytt� <vi...@iki.fi>
Date:   2016-07-28T17:00:02Z

    Avoid NPE on testMultipleSenders null response

commit 70c02e6ac3dc4c83f487c8fc13dc3ed9c3fffb5a
Author: Ville Skytt� <vi...@iki.fi>
Date:   2016-07-28T17:02:04Z

    Avoid NPE if deleteDirectory fails to list files to clean up

----


---
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.
---

[GitHub] activemq-artemis pull request #680: Null pointer/check related fixes

Posted by scop <gi...@git.apache.org>.
Github user scop commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/680#discussion_r72696215
  
    --- Diff: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java ---
    @@ -63,10 +63,15 @@ public static final boolean deleteDirectory(final File directory) {
                 attempts++;
              }
     
    -         for (String file : files) {
    -            File f = new File(directory, file);
    -            if (!deleteDirectory(f)) {
    -               logger.warn("Failed to clean up file: " + f.getAbsolutePath());
    +         if (files == null) {
    +            logger.warn("Could not list files to clean up in: " + directory.getAbsolutePath());
    --- End diff --
    
    @johnament I don't know, but FWIW the "Failed to clean up file" one that already was and still is there is not (assuming I understand what a coded log message is...)


---
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.
---

[GitHub] activemq-artemis pull request #680: Null pointer/check related fixes

Posted by johnament <gi...@git.apache.org>.
Github user johnament commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/680#discussion_r72686371
  
    --- Diff: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FileUtil.java ---
    @@ -63,10 +63,15 @@ public static final boolean deleteDirectory(final File directory) {
                 attempts++;
              }
     
    -         for (String file : files) {
    -            File f = new File(directory, file);
    -            if (!deleteDirectory(f)) {
    -               logger.warn("Failed to clean up file: " + f.getAbsolutePath());
    +         if (files == null) {
    +            logger.warn("Could not list files to clean up in: " + directory.getAbsolutePath());
    --- End diff --
    
    should this a coded log message?


---
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.
---

[GitHub] activemq-artemis pull request #680: Null pointer/check related fixes

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/680


---
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.
---