Re: HttpCookie.domainMatches("hostname.local", "hostname") return false

2011-03-14 Thread Sean Chou
Hi,
   Is there any update to this issue? If not, I have a simple patch as
follows:


diff -r e947a98ea3c1 src/share/classes/java/net/HttpCookie.java
--- a/src/share/classes/java/net/HttpCookie.javaThu Mar 10 17:11:08 2011
-0800
+++ b/src/share/classes/java/net/HttpCookie.javaMon Mar 14 16:02:14 2011
+0800
@@ -771,6 +771,10 @@
 host.equalsIgnoreCase(domain.substring(1)));
 }

+if (isLocalDomain && domain.startWith(host)){
+return true;
+}
+
 return false;
 }


2011/3/2 Chris Hegarty 

> On 03/ 2/11 01:50 AM, Sean Chou wrote:
>
>> Hi,
>>If there's no different opinions or objection, can someone raise a
>> bug on the Oracle bug system for me please?
>>
>
> Sorry, I though I replied to this.
>
> It would appear to be a bug. I filed CR 7023713,
> "HttpCookie.domainMatches("hostname.local", "hostname") should return true",
> for this issue.
>
> -Chris.
>
> Thanks.
>>
>>
>> 2011/2/22 Sean Chou > >
>>
>>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
>>
>>
>>
>>
>> --
>> Best Regards,
>> Sean Chou
>>
>>


-- 
Best Regards,
Sean Chou


hg: jdk7/tl/jdk: 7009794: misleading text in SSLHandshakeException exception message

2011-03-14 Thread xuelei . fan
Changeset: fa9d7e241517
Author:xuelei
Date:  2011-03-14 09:05 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/fa9d7e241517

7009794: misleading text in SSLHandshakeException exception message
Summary: update the warning message
Reviewed-by: weijun

! src/share/classes/sun/security/ssl/ClientHandshaker.java



hg: jdk7/tl/jdk: 7027288: (launcher) remove jkernel test from MiscTests

2011-03-14 Thread kumar . x . srinivasan
Changeset: b708c576f201
Author:ksrini
Date:  2011-03-14 10:36 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/b708c576f201

7027288: (launcher) remove jkernel test from MiscTests
Reviewed-by: mchung, herrick

! test/tools/launcher/MiscTests.java



hg: jdk7/tl/jdk: 2 new changesets

2011-03-14 Thread vincent . x . ryan
Changeset: 5c978a922711
Author:vinnie
Date:  2011-03-14 17:50 +
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/5c978a922711

6686215: Some mutables not defensively copied when deserializing 
java.security.CodeSource & Timestamp objects
Reviewed-by: mullan

! src/share/classes/java/security/CodeSource.java
! src/share/classes/java/security/Timestamp.java

Changeset: 2e473067520f
Author:vinnie
Date:  2011-03-14 18:13 +
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/2e473067520f

Merge




hg: jdk7/tl/langtools: 7026414: Types.asElement() returns null for ErrorType

2011-03-14 Thread jonathan . gibbons
Changeset: 307b065ff2af
Author:jjg
Date:  2011-03-14 11:33 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/langtools/rev/307b065ff2af

7026414: Types.asElement() returns null for ErrorType
Reviewed-by: darcy

! src/share/classes/com/sun/tools/javac/model/JavacTypes.java
! test/tools/javac/api/6557752/T6557752.java
! 
test/tools/javac/processing/model/element/TestMissingElement/TestMissingElement.java



hg: jdk7/tl/langtools: 7010608: the string 'error' should appear in error messages

2011-03-14 Thread jonathan . gibbons
Changeset: e2890b8369f7
Author:jjg
Date:  2011-03-14 11:42 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/langtools/rev/e2890b8369f7

7010608: the string 'error' should appear in error messages
Reviewed-by: mcimadamore

! src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
! test/tools/apt/Compile/golden.txt
! test/tools/javac/4846262/Test.out
! test/tools/javac/Diagnostics/6769027/T6769027.java
+ test/tools/javac/Diagnostics/7010608/Test.java
! test/tools/javac/diags/examples/CountError.java
! test/tools/javac/diags/examples/CountErrorPlural.java
! test/tools/javac/diags/examples/IdentifierExpected.java
! test/tools/javac/diags/examples/KindnameClass.java
! test/tools/javac/diags/examples/KindnameConstructor.java
! test/tools/javac/diags/examples/KindnameMethod.java
! test/tools/javac/diags/examples/KindnameVariable.java



hg: jdk7/tl/jdk: 7027362: Project Coin: warn of throwing InterruptedException in AutoCloseable.close javadoc

2011-03-14 Thread joe . darcy
Changeset: 1924a21184a6
Author:darcy
Date:  2011-03-14 11:45 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1924a21184a6

7027362: Project Coin: warn of throwing InterruptedException in 
AutoCloseable.close javadoc
Reviewed-by: jjb

! src/share/classes/java/lang/AutoCloseable.java



hg: jdk7/tl/langtools: 7026509: Cannot use JavaCompiler to create multiple CompilationTasks for partial compilations

2011-03-14 Thread jonathan . gibbons
Changeset: cb119107aeea
Author:jjg
Date:  2011-03-14 11:48 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/langtools/rev/cb119107aeea

7026509: Cannot use JavaCompiler to create multiple CompilationTasks for 
partial compilations
Reviewed-by: mcimadamore

! src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java
! src/share/classes/com/sun/tools/javac/api/JavacTool.java
+ test/tools/javac/api/TestJavacTask_Lock.java
+ test/tools/javac/api/TestJavacTask_Multiple.java
+ test/tools/javac/api/TestJavacTask_ParseAttrGen.java



hg: jdk7/tl/jdk: 7014637: Improve behavior of EnumSet Iterator.remove()

2011-03-14 Thread mike . duigou
Changeset: 7d1b13126574
Author:mduigou
Date:  2011-03-14 14:49 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/7d1b13126574

7014637: Improve behavior of EnumSet Iterator.remove()
Reviewed-by: mduigou, alanb
Contributed-by: Neil Richards 

! src/share/classes/java/util/JumboEnumSet.java
! src/share/classes/java/util/RegularEnumSet.java
+ test/java/util/EnumSet/LargeEnumIteratorRemoveResilience.java
+ test/java/util/EnumSet/SmallEnumIteratorRemoveResilience.java