Code Review 7030256: Cleanup/Remove code supporting old Windows versions (98, NT, 2000, etc)

2011-03-24 Thread Chris Hegarty

Alan, Michael,

The subject line says it all! Nice to be able to remove this old code 
that is no longer necessary. Hopefully this will make maintenance a 
little easier going forward.


http://cr.openjdk.java.net/~chegar/7030256/webrev.00/webrev/

Mike Duigou noticed I pushed this webrev to cr.openjdk yesterday and has 
already given feedback. Thanks Mike.


-Chris.


Re: Code Review 7030256: Cleanup/Remove code supporting old Windows versions (98, NT, 2000, etc)

2011-03-24 Thread Alan Bateman

Chris Hegarty wrote:

Alan, Michael,

The subject line says it all! Nice to be able to remove this old code 
that is no longer necessary. Hopefully this will make maintenance a 
little easier going forward.


http://cr.openjdk.java.net/~chegar/7030256/webrev.00/webrev/

Mike Duigou noticed I pushed this webrev to cr.openjdk yesterday and 
has already given feedback. Thanks Mike.


-Chris.
This looks a good cleanup to me. Lots of 95/98 crud in the repository 
and always hard to get time to clear it out.


I guess the only concern is that net.dll will now require iphlpapi.dll.

Minor comments:

src/windows/native/java/net/Inet6AddressImpl.c - you might need to 
re-aligned line 344.


src/windows/native/java/net/net_util_md.c line - cast to jint???

-Alan.


Re: Code Review 7030256: Cleanup/Remove code supporting old Windows versions (98, NT, 2000, etc)

2011-03-24 Thread Chris Hegarty

On 03/24/11 10:55 AM, Alan Bateman wrote:

Chris Hegarty wrote:

Alan, Michael,

The subject line says it all! Nice to be able to remove this old code
that is no longer necessary. Hopefully this will make maintenance a
little easier going forward.

http://cr.openjdk.java.net/~chegar/7030256/webrev.00/webrev/

Mike Duigou noticed I pushed this webrev to cr.openjdk yesterday and
has already given feedback. Thanks Mike.

-Chris.

This looks a good cleanup to me. Lots of 95/98 crud in the repository
and always hard to get time to clear it out.

I guess the only concern is that net.dll will now require iphlpapi.dll.


Yes, we will now have a dependency on iphlpapi.dll, but this dll is part 
of Windows since Windows 2000 and the functions we are using are all 
available on XP. Does this address your concern, or do you have another 
issue?



Minor comments:

src/windows/native/java/net/Inet6AddressImpl.c - you might need to
re-aligned line 344.


Got it. Thanks.


src/windows/native/java/net/net_util_md.c line - cast to jint???


I forgot to mention that I fixed a few compiler warning while I was 
here. Are you referring to the casting of SOCKET s to jint, line 982? 
SOCKET is an unsigned int pointer and needs an explicit cast. I thought 
it was safe, and is what is done in Java_sun_nio_ch_Net_socket0.


-Chris.


Re: Code Review 7030256: Cleanup/Remove code supporting old Windows versions (98, NT, 2000, etc)

2011-03-24 Thread Alan Bateman

Chris Hegarty wrote:


Yes, we will now have a dependency on iphlpapi.dll, but this dll is 
part of Windows since Windows 2000 and the functions we are using are 
all available on XP. Does this address your concern, or do you have 
another issue?
The concern is that we load yet another DLL at startup. It might be 
worth checking if it gets loaded already.



:

I forgot to mention that I fixed a few compiler warning while I was 
here. Are you referring to the casting of SOCKET s to jint, line 982? 
SOCKET is an unsigned int pointer and needs an explicit cast. I 
thought it was safe, and is what is done in Java_sun_nio_ch_Net_socket0.
NET_Socket is declared to return an int so I assume you meant to cast to 
int rather than jint.


-Alan.


Re: Code Review 7030256: Cleanup/Remove code supporting old Windows versions (98, NT, 2000, etc)

2011-03-24 Thread Chris Hegarty



On 03/24/11 11:49 AM, Alan Bateman wrote:

Chris Hegarty wrote:


Yes, we will now have a dependency on iphlpapi.dll, but this dll is
part of Windows since Windows 2000 and the functions we are using are
all available on XP. Does this address your concern, or do you have
another issue?

The concern is that we load yet another DLL at startup. It might be
worth checking if it gets loaded already.


You are right, before these changes iphlpapi.dll is not loaded unless 
NetworkInterface or ResolverConfigurationImpl are called. After these 
changes iphlpapi.dll is loaded once net.dll is loaded.


I think we should use specify the loading of these dll's to be delayed. 
I can confirm that with the below changes iphlpapi.dll is only loaded 
when necessary.


diff -r ef5bbbe0dd75 make/java/net/Makefile
--- a/make/java/net/MakefileMon Mar 21 22:02:00 2011 -0700
+++ b/make/java/net/MakefileThu Mar 24 15:27:38 2011 +
@@ -37,10 +37,6 @@ AUTO_FILES_JAVA_DIRS = java/net
 AUTO_FILES_JAVA_DIRS = java/net

 ifeq ($(PLATFORM), windows)
-# Windows 9x module only needed on 32-bit build
-ifeq ($(ARCH_DATA_MODEL), 32)
-   FILES_c += NetworkInterface_win9x.c
-endif
 FILES_c += NTLMAuthSequence.c
 FILES_c += NetworkInterface_winXP.c
 else
@@ -96,7 +92,9 @@ include $(BUILDDIR)/common/Library.gmk
 include $(BUILDDIR)/common/Library.gmk

 ifeq ($(PLATFORM), windows)
-  OTHER_LDLIBS = ws2_32.lib $(JVMLIB)
+  OTHER_LDLIBS = ws2_32.lib $(JVMLIB) \
+ secur32.lib iphlpapi.lib delayimp.lib \
+ /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll
 else
   OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) -ldl $(JVMLIB)



:

I forgot to mention that I fixed a few compiler warning while I was
here. Are you referring to the casting of SOCKET s to jint, line 982?
SOCKET is an unsigned int pointer and needs an explicit cast. I
thought it was safe, and is what is done in Java_sun_nio_ch_Net_socket0.

NET_Socket is declared to return an int so I assume you meant to cast to
int rather than jint.


D'oh. Got it. Thanks,

-Chris.



-Alan.


Re: Code Review 7030256: Cleanup/Remove code supporting old Windows versions (98, NT, 2000, etc)

2011-03-24 Thread Alan Bateman

Chris Hegarty wrote:

:

You are right, before these changes iphlpapi.dll is not loaded unless 
NetworkInterface or ResolverConfigurationImpl are called. After these 
changes iphlpapi.dll is loaded once net.dll is loaded.


I think we should use specify the loading of these dll's to be 
delayed. I can confirm that with the below changes iphlpapi.dll is 
only loaded when necessary.


diff -r ef5bbbe0dd75 make/java/net/Makefile
--- a/make/java/net/MakefileMon Mar 21 22:02:00 2011 -0700
+++ b/make/java/net/MakefileThu Mar 24 15:27:38 2011 +
@@ -37,10 +37,6 @@ AUTO_FILES_JAVA_DIRS = java/net
 AUTO_FILES_JAVA_DIRS = java/net

 ifeq ($(PLATFORM), windows)
-# Windows 9x module only needed on 32-bit build
-ifeq ($(ARCH_DATA_MODEL), 32)
-FILES_c += NetworkInterface_win9x.c
-endif
 FILES_c += NTLMAuthSequence.c
 FILES_c += NetworkInterface_winXP.c
 else
@@ -96,7 +92,9 @@ include $(BUILDDIR)/common/Library.gmk
 include $(BUILDDIR)/common/Library.gmk

 ifeq ($(PLATFORM), windows)
-  OTHER_LDLIBS = ws2_32.lib $(JVMLIB)
+  OTHER_LDLIBS = ws2_32.lib $(JVMLIB) \
+ secur32.lib iphlpapi.lib delayimp.lib \
+ /DELAYLOAD:secur32.dll /DELAYLOAD:iphlpapi.dll
 else
   OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) -ldl $(JVMLIB)

Thanks for doing this, this seems a good candidate for a delayed load. 
Thumbs up from me.


-Alan


hg: jdk7/tl/jdk: 7029823: (ann) test/java/lang/annotation/package-info.java no longer compiles

2011-03-24 Thread jim . holmlund
Changeset: 632a96f5752d
Author:jjh
Date:  2011-03-24 11:40 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/632a96f5752d

7029823: (ann) test/java/lang/annotation/package-info.java no longer compiles
Summary: Use @Deprecated instead of @java.lang.annotation.Documented
Reviewed-by: jjg, smarks

! test/java/lang/annotation/PackageMain.java
! test/java/lang/annotation/package-info.java



hg: jdk7/tl/langtools: 6597678: JavaCompiler.getStandardFileManager always uses default charset not the one that user specifies

2011-03-24 Thread jonathan . gibbons
Changeset: 83260b3305ac
Author:jjg
Date:  2011-03-24 16:14 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/langtools/rev/83260b3305ac

6597678: JavaCompiler.getStandardFileManager always uses default charset not 
the one that user specifies
Reviewed-by: mcimadamore

! src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java
! src/share/classes/com/sun/tools/javac/api/JavacTool.java
! 
src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
! src/share/classes/com/sun/tools/javac/util/JavacMessages.java
+ test/tools/javac/util/T6597678.java



hg: jdk7/tl/jdk: 7029680: fix test/sun/misc/Version/Version.java build parsing

2011-03-24 Thread stuart . marks
Changeset: f326a018fd3f
Author:smarks
Date:  2011-03-24 17:26 -0700
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/f326a018fd3f

7029680: fix test/sun/misc/Version/Version.java build parsing
Reviewed-by: ohair

! test/sun/misc/Version/Version.java



hg: jdk7/tl/jdk: 7023056: NPE from sun.security.util.ManifestEntryVerifier.verify during Maven build

2011-03-24 Thread weijun . wang
Changeset: 4a64eefbfd7a
Author:weijun
Date:  2011-03-25 11:58 +0800
URL:   http://hg.openjdk.java.net/jdk7/tl/jdk/rev/4a64eefbfd7a

7023056: NPE from sun.security.util.ManifestEntryVerifier.verify during Maven 
build
Reviewed-by: mullan

! src/share/classes/java/util/jar/JarVerifier.java
! src/share/classes/sun/security/util/ManifestEntryVerifier.java
+ test/java/util/jar/JarFile/MevNPE.java



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

2011-03-24 Thread Sean Chou
Hi Chris,

Is there any progress on this issue?

-- 
Best Regards,
Sean Chou