ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam StarTeamCheckout.java
Date Thu, 11 Nov 2004 18:06:35 GMT
sbailliez    2004/11/11 10:06:34

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/starteam
                        StarTeamCheckout.java
  Log:
  Fix a NPE that occurred apparently because Folder.list() can return null
  Thanks to Bob Evans
  PR: 31965
  
  Revision  Changes    Path
  1.27      +4 -1      ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
  
  Index: StarTeamCheckout.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- StarTeamCheckout.java	9 Mar 2004 16:48:37 -0000	1.26
  +++ StarTeamCheckout.java	11 Nov 2004 18:06:34 -0000	1.27
  @@ -580,7 +580,10 @@
               }
   
               String[] localFiles = localFolder.list();
  -
  +            // PR 31965 says that it can return null
  +            if (localFiles == null){
  +                return this;
  +            }
               for (int i = 0; i < localFiles.length; i++) {
                   java.io.File localFile =
                       new java.io.File(localFolder, localFiles[i]).getAbsoluteFile();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message