Re: Socket InputStream.available may return a positive value after shutdown
δΊ 2011-2-17 17:30, Alan Bateman ει: Jing LV wrote: Thanks Alan! I try to follow this issue but has no luck on bugs.sun.com with the number 7014860. Am I miss something? I suspect there is a problem on bugs.sun.com as it doesn't seem to be showing any bugs. I noticed a "maintenance in progress" (or a message to that effect )a few days ago so maybe something is broken. Let me see if I can find out. -Alan. Thanks Alan - any luck till now? -- Best Regards, Jimmy, Jing LV
Re: Socket InputStream.available may return a positive value after shutdown
Jing LV wrote: Thanks Alan - any luck till now? Yes, it's there: http://bugs.sun.com/view_bug.do?bug_id=7014860
Re: SocketPermission's implies() interesting behavior
On 02/22/11 03:00 AM, Charles Lee wrote: : Hi, A quick patch could be: diff --git src/share/classes/java/net/SocketPermission.java src/share/classes/java/net/SocketPermission.java --- src/share/classes/java/net/SocketPermission.java +++ src/share/classes/java/net/SocketPermission.java @@ -817,8 +817,13 @@ if (thisHost == null) return false; - else - return thisHost.equalsIgnoreCase(thatHost); + else { + if (this.wildcard) { + return thatHost.endsWith(this.cname); + } else { + return thisHost.equalsIgnoreCase(thatHost); + } + } } I filed CR 7021280: "SocketPermission trustProxy should accept wildcards" for this issue. I'll apply the patch to my JDK7 personal repo and run some initial tests. -Chris.
HttpCookie.domainMatches("hostname.local", "hostname") return false
Hi, I find that HttpCookie.domainMatches("hostname.local", "hostname") returns false, which may be a bug. According to spec, the effective host name of "hostname" is "hostname.local", which is string exactly the same with the first parameter. Thus the method should return true for this invocation. I attached the simple testcase here: // Testcase import java.net.HttpCookie; public class DomainMatchTest{ public static void main(String args[]){ // "true" should be printed, but get "false". System.out.println(HttpCookie.domainMatches("hostname.local", "hostname")); } } // End of testcase Any comments? -- Best Regards, Sean Chou
hg: jdk7/tl/jdk: 3 new changesets
Changeset: dbdafe65af60 Author:alanb Date: 2011-02-21 13:54 + URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/dbdafe65af60 7020517: (fs) FileStore.equals returns true if both volumes have the same serial number Reviewed-by: chegar ! src/windows/classes/sun/nio/fs/WindowsFileStore.java ! test/java/nio/file/FileStore/Basic.java Changeset: d7cb44a4d08a Author:alanb Date: 2011-02-22 10:19 + URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/d7cb44a4d08a Merge Changeset: 9d8a0369b906 Author:alanb Date: 2011-02-22 12:04 + URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/9d8a0369b906 7020888: (file) Miscellaneous and trivial clean-ups (typos and opportunities to use suppressed exceptions) Reviewed-by: mduigou, chegar ! src/share/classes/java/io/BufferedReader.java ! src/share/classes/java/io/BufferedWriter.java ! src/share/classes/java/io/File.java ! src/share/classes/java/io/FilterOutputStream.java ! src/share/classes/java/io/PushbackInputStream.java ! src/share/classes/java/io/PushbackReader.java ! src/share/classes/java/nio/channels/AsynchronousFileChannel.java ! src/share/classes/java/nio/channels/SocketChannel.java ! src/share/classes/java/nio/file/CopyMoveHelper.java ! src/share/classes/java/nio/file/Files.java ! src/share/classes/sun/nio/ch/FileChannelImpl.java ! src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java ! src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java ! test/java/lang/ProcessBuilder/Basic.java
hg: jdk7/tl/jdk: 7021327: Changes for 7020888 included changes to other files in error
Changeset: bac152c6491a Author:alanb Date: 2011-02-22 14:28 + URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/bac152c6491a 7021327: Changes for 7020888 included changes to other files in error Reviewed-by: chegar ! src/share/classes/java/io/BufferedReader.java ! src/share/classes/java/io/BufferedWriter.java ! src/share/classes/java/io/FilterOutputStream.java ! src/share/classes/java/io/PushbackInputStream.java ! src/share/classes/java/io/PushbackReader.java ! test/java/lang/ProcessBuilder/Basic.java
hg: jdk7/tl/jdk: 6702400: ChunkedInputStream expecting -1 from int read, but int->char comparision is wrong
Changeset: b853414b8eef Author:michaelm Date: 2011-02-22 14:44 + URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b853414b8eef 6702400: ChunkedInputStream expecting -1 from int read, but int->char comparision is wrong Reviewed-by: chegar ! src/share/classes/sun/net/httpserver/ChunkedInputStream.java
hg: jdk7/tl/jdk: 6604496: Support for CKM_AES_CTR (counter mode)
Changeset: 75216854fb53 Author:valeriep Date: 2011-02-22 12:01 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/75216854fb53 6604496: Support for CKM_AES_CTR (counter mode) Summary: Enhanced SunPKCS11 provider to support AES/CTR/NoPadding transformation. Reviewed-by: vinnie ! src/share/classes/sun/security/pkcs11/P11Cipher.java ! src/share/classes/sun/security/pkcs11/SunPKCS11.java + src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java ! src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java ! src/share/classes/sun/security/pkcs11/wrapper/PKCS11Constants.java ! src/share/native/sun/security/pkcs11/wrapper/p11_convert.c + src/share/native/sun/security/pkcs11/wrapper/pkcs-11v2-20a3.h ! src/share/native/sun/security/pkcs11/wrapper/pkcs11wrapper.h ! test/sun/security/pkcs11/Cipher/TestSymmCiphers.java ! test/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java
hg: jdk7/tl/jdk: 7021209: convert lang, math, util to use try-with-resources
Changeset: 84e339f1033b Author:smarks Date: 2011-02-22 15:34 -0800 URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/84e339f1033b 7021209: convert lang, math, util to use try-with-resources Reviewed-by: alanb, darcy, naoto ! src/share/classes/java/lang/Package.java ! src/share/classes/java/util/Currency.java ! src/share/classes/sun/util/calendar/LocalGregorianCalendar.java ! src/solaris/classes/java/util/prefs/FileSystemPreferences.java ! test/java/lang/Character/CheckScript.java ! test/java/lang/Runtime/shutdown/ShutdownHooks.java ! test/java/lang/instrument/BootClassPath/Setup.java ! test/java/lang/instrument/ilib/Inject.java ! test/java/math/BigInteger/BigIntegerTest.java ! test/java/util/Currency/ValidateISO4217.java ! test/java/util/Formatter/FailingConstructors.java ! test/java/util/Locale/LocaleEnhanceTest.java ! test/java/util/ResourceBundle/Bug6204853.java ! test/java/util/Scanner/FailingConstructors.java