You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2009/10/01 13:59:25 UTC
svn commit: r820621 - in /harmony/enhanced/classlib/trunk/modules/luni:
make/findbugs-exclude-filter.xml src/main/java/java/net/InetAddress.java
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);
}