harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r832473 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
Date Tue, 03 Nov 2009 16:54:35 GMT
Author: tellison
Date: Tue Nov  3 16:54:34 2009
New Revision: 832473

URL: http://svn.apache.org/viewvc?rev=832473&view=rev
Log:
Give param a slightly more helpful name.
Host name checking is case insensitive.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java?rev=832473&r1=832472&r2=832473&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketPermission.java
Tue Nov  3 16:54:34 2009
@@ -142,7 +142,7 @@
      * Compares the argument {@code o} to this instance and returns {@code true}
      * if they represent the same permission using a class specific comparison.
      *
-     * @param o
+     * @param other
      *            the object to compare with this {@code SocketPermission}
      *            instance.
      * @return {@code true} if they represent the same permission, {@code false}
@@ -150,16 +150,16 @@
      * @see #hashCode
      */
     @Override
-    public boolean equals(Object o) {
-        if (this == o) {
+    public boolean equals(Object other) {
+        if (this == other) {
             return true;
         }
-        if (o == null || this.getClass() != o.getClass()) {
+        if (other == null || this.getClass() != other.getClass()) {
             return false;
         }
-        SocketPermission sp = (SocketPermission) o;
-        if (!hostName.equals(sp.hostName)) {
-            if (getIPString() == null || !ipString.equals(sp.getIPString())) {
+        SocketPermission sp = (SocketPermission) other;
+        if (!hostName.equalsIgnoreCase(sp.hostName)) {
+            if (getIPString() == null || !ipString.equalsIgnoreCase(sp.getIPString())) {
                 return false;
             }
         }



Mime
View raw message