FileObject.getParent may be null, preventing NPE
authorJan Lahoda <jlahoda@netbeans.org>
Tue, 10 Jul 2012 21:14:29 +0200
changeset 825c1664a34b430
parent 824 22e809871308
child 826 39a5b50f3e10
FileObject.getParent may be null, preventing NPE
remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/options/CustomizeRemoteIndex.java
     1.1 --- a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/options/CustomizeRemoteIndex.java	Tue Jul 10 21:13:20 2012 +0200
     1.2 +++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/options/CustomizeRemoteIndex.java	Tue Jul 10 21:14:29 2012 +0200
     1.3 @@ -483,7 +483,7 @@
     1.4                      boolean found = matches(folder, random);
     1.5  
     1.6                      if (!found) {
     1.7 -                        if (matches(folder.getParent(), random)) {
     1.8 +                        if (folder.getParent() != null && matches(folder.getParent(), random)) {
     1.9                              checkingIndexURLWarning.set("The given folder is unlikely to match the index content, parent folder does.");
    1.10                          } else {
    1.11                              StringBuilder matchingChildren = new StringBuilder();