public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: SocketPermission.implies() tweaks
@ 2006-09-06 12:06 Gary Benson
  0 siblings, 0 replies; only message in thread
From: Gary Benson @ 2006-09-06 12:06 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

Hi all,

This commit fixes the SocketPermission.implies() tests when
hostport is an empty string.  Oh, and I fixed a comment...

Cheers,
Gary

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2004 bytes --]

Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.1903
diff -u -r1.1903 ChangeLog
--- ChangeLog	6 Sep 2006 11:18:59 -0000	1.1903
+++ ChangeLog	6 Sep 2006 12:04:07 -0000
@@ -1,3 +1,8 @@
+2006-09-06  Gary Benson  <gbenson@redhat.com>
+
+	* gnu/testlet/java/net/SocketPermission/implies.java: Correctly
+	test cases with empty hostport strings.  Also fixed a comment.
+
 2006-09-06  David Gilbert  <david.gilbert@object-refinery.com>
 
 	* gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java
Index: gnu/testlet/java/net/SocketPermission/implies.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/implies.java,v
retrieving revision 1.5
diff -u -r1.5 implies.java
--- gnu/testlet/java/net/SocketPermission/implies.java	1 Sep 2006 08:30:01 -0000	1.5
+++ gnu/testlet/java/net/SocketPermission/implies.java	6 Sep 2006 12:04:07 -0000
@@ -40,7 +40,7 @@
   }
   
   private Test[] hosts = new Test[] {
-    new Test("", "", true),
+    new Test("", "", false),
     new Test("localhost", "localhost", true),
     new Test("127.0.0.1", "localhost", true),
     new Test("localhost", "127.0.0.1", true),
@@ -101,7 +101,7 @@
     new Test("[::FFFF:129.144.52.38]", "[::FFFF:129.144.52.38]", true),
     new Test("[::13.1.68.3]", "[::FFFF:13.1.68.3]", false),    
     new Test("[::FFFF:13.1.68.3]", "[::13.1.68.3]", false),
-    // IPv6-mapped IPv4 addresses
+    // IPv4-mapped IPv6 addresses
     new Test("[::FFFF:13.1.68.3]", "13.1.68.3", true),
     new Test("13.1.68.3", "[::FFFF:13.1.68.3]", true),
     new Test("[::FFFF:D01:4403]", "13.1.68.3", true),
@@ -237,7 +237,10 @@
     {
       x = host.x + port.x;
       y = host.y + port.y;
-      expect = host.expect && port.expect;
+      if (x.length() == 0 && y.length() == 0)
+	expect = true;
+      else
+	expect = host.expect && port.expect;
     }
   }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-06 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-06 12:06 FYI: SocketPermission.implies() tweaks Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).