classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Patch: minor URLStreamHandler cleanup


From: Anthony Green
Subject: [cp-patches] Patch: minor URLStreamHandler cleanup
Date: Wed, 14 Sep 2005 18:03:51 -0700

All this does is remove a redundant null pointer check.  This could
never be null since we would have thrown an exception a couple of lines
before (see the first line of the patch).

Ok?

AG


2005-09-14  Anthony Green  <address@hidden>

        * java/net/URLStreamHandler.java: Remove redundant null pointer
        check.


Index: java/net/URLStreamHandler.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/net/URLStreamHandler.java,v
retrieving revision 1.33
diff -u -r1.33 URLStreamHandler.java
--- java/net/URLStreamHandler.java      2 Jul 2005 20:32:39 -0000       1.33
+++ java/net/URLStreamHandler.java      15 Sep 2005 00:20:46 -0000
@@ -511,7 +511,7 @@
     int size = protocol.length() + authority.length() + file.length() + 24;
     StringBuffer sb = new StringBuffer(size);
 
-    if (protocol != null && protocol.length() > 0)
+    if (protocol.length() > 0)
       {
        sb.append(protocol);
        sb.append(":");






reply via email to

[Prev in Thread] Current Thread [Next in Thread]