harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r820621 - in /harmony/enhanced/classlib/trunk/modules/luni: make/findbugs-exclude-filter.xml src/main/java/java/net/InetAddress.java
Date Thu, 01 Oct 2009 11:59:25 GMT
Author: tellison
Date: Thu Oct  1 11:59:25 2009
New Revision: 820621

URL: http://svn.apache.org/viewvc?rev=820621&view=rev
Log:
Explain why InetAddress#readResolve() is private.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/make/findbugs-exclude-filter.xml
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/make/findbugs-exclude-filter.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/make/findbugs-exclude-filter.xml?rev=820621&r1=820620&r2=820621&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/make/findbugs-exclude-filter.xml (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/make/findbugs-exclude-filter.xml Thu Oct
 1 11:59:25 2009
@@ -18,6 +18,11 @@
 
 <!-- Exclusion filter for running FindBugs against Apache Harmony -->
 
+    <!--
+      Format and code information is available here
+      http://findbugs.sourceforge.net/manual/filter.html
+    -->
+
 <FindBugsFilter>
      
        <!-- Number classes should be able to call Number constructors -->
@@ -102,6 +107,13 @@
        <Bug code="EI2, EI" />
      </Match>
      
+     <!-- Spec requires that InetAddress readResolve is private -->
+     <Match>
+       <Class name="java.net.InetAddress" />
+       <Method name="readResolve" />
+       <Bug code="Se" />
+     </Match>
+     
      <!-- Method is not static in the spec, so can't change it -->
      <Match>
        <Class name="java.net.URLConnection" />

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java?rev=820621&r1=820620&r2=820621&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/InetAddress.java Thu
Oct  1 11:59:25 2009
@@ -1368,6 +1368,10 @@
         family = fields.get("family", 2); //$NON-NLS-1$
     }
 
+    /*
+     * The spec requires that if we encounter a generic InetAddress in
+     * serialized form then we should interpret it as an Inet4 address.
+     */
     private Object readResolve() throws ObjectStreamException {
         return new Inet4Address(ipaddress, hostName);
     }



Mime
View raw message