OSDN Git Service

2005-04-22 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Apr 2005 17:43:50 +0000 (17:43 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Apr 2005 17:43:50 +0000 (17:43 +0000)
        * gnu/gcj/runtime/NameFinder.java (close): IN, OUT, and PROC can all
        be null, check for that case and don't deference it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98573 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/ChangeLog
libjava/gnu/gcj/runtime/NameFinder.java

index b85cdf2..1a9c0ba 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-22  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * gnu/gcj/runtime/NameFinder.java (close): IN, OUT, and PROC can all
+       be null, check for that case and don't deference it.
+
 2005-04-22  Sven de Marothy  <sven@physto.se>
 
        * java/util/logging/LogManager.java: Reformatted.
index 5469f08..4c629bb 100644 (file)
@@ -86,12 +86,14 @@ public class NameFinder
     {
       try
       {
-       in.close();
-       out.close();
+       if (in != null)
+         in.close();
+       if (out != null)
+         out.close();
       }
       catch (IOException x) {}
-
-      proc.destroy();
+      if (proc != null)
+       proc.destroy();
     }
   }