Commit 6d2cf1d8 by Tom Tromey Committed by Tom Tromey

* java/net/SocketPermission.java (hashCode): Rewrote.

From-SVN: r59843
parent 9e1ab8c1
2002-12-04 Tom Tromey <tromey@redhat.com> 2002-12-04 Tom Tromey <tromey@redhat.com>
* Makefile.in: Rebuilt. * java/net/SocketPermission.java (hashCode): Rewrote.
* Makefile.am (nat_source_files): Added natVMSecurityManager,
natResourceBundle.
* java/util/ResourceBundle.java (Security): Removed.
(getCallingClassLoader): Now native.
* java/util/natResourceBundle.cc: New file.
* java/lang/natVMSecurityManager.cc: New file.
* java/lang/VMSecurityManager.java (getClassContext): Now native.
2002-12-03 Mark Wielaard <mark@klomp.org> 2002-12-03 Mark Wielaard <mark@klomp.org>
......
/* SocketPermission.java -- Class modeling permissions for socket operations /* SocketPermission.java -- Class modeling permissions for socket operations
Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -166,12 +166,11 @@ public final class SocketPermission extends Permission ...@@ -166,12 +166,11 @@ public final class SocketPermission extends Permission
public int hashCode() public int hashCode()
{ {
int hash = 100; int hash = 100;
if (hostport != null)
// FIXME: Get a real hash function hash += hostport.hashCode();
for (int i = 0; i < hostport.length(); i++) if (actions != null)
hash = hash + (int) hostport.charAt(i) * 7; hash += actions.hashCode();
return hash;
return (hash);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment