Check for a null CommandSupport when computing the display name.
This is a fix of issue #41739.
1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Tue Apr 06 13:52:14 2004 +0000
1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Tue Apr 06 14:40:27 2004 +0000
1.3 @@ -2813,11 +2813,14 @@
1.4 //System.out.println(preDisplayNameVar.getValue() + " " + rootFile.toString());
1.5 return preDisplayNameVar.getValue() + " " + rootFile.toString();
1.6 } else if (commandsRoot != null) {
1.7 - String VCSName = commandsRoot.getCommandSupport().getDisplayName();
1.8 - //System.out.println("VCSName = '"+VCSName+"'");
1.9 - if (VCSName != null && VCSName.length() > 0) {
1.10 - //System.out.println("VcsFileSystem.getDisplayName() = "+VCSName + " " + rootFile.toString());
1.11 - return VCSName + " " + rootFile.toString();
1.12 + CommandSupport cmdSupport = commandsRoot.getCommandSupport();
1.13 + if (cmdSupport != null) {
1.14 + String VCSName = cmdSupport.getDisplayName();
1.15 + //System.out.println("VCSName = '"+VCSName+"'");
1.16 + if (VCSName != null && VCSName.length() > 0) {
1.17 + //System.out.println("VcsFileSystem.getDisplayName() = "+VCSName + " " + rootFile.toString());
1.18 + return VCSName + " " + rootFile.toString();
1.19 + }
1.20 }
1.21 }
1.22 //System.out.println(g("LAB_FileSystemValid", rootFile.toString ()));