hg: jdk8/tl/jdk: 8004925: java/net/Socks/SocksV4Test.java failing on all platforms

2012-12-13 Thread chris . hegarty
Changeset: 775b0050144a
Author:chegar
Date:  2012-12-13 09:55 +
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/775b0050144a

8004925: java/net/Socks/SocksV4Test.java failing on all platforms
Reviewed-by: alanb, dsamersoff

! test/java/net/Socks/SocksV4Test.java



8004963: URLConnection, downgrade normative reference to ${java.home}/lib/content-types.properties

2012-12-13 Thread Alan Bateman


As part of preparing for modules in the future [1], we need to look at 
configuration (and other) files in the JDK to see whether such files 
could eventually move to module-private locations.


One of the normative references to a file in ${java.home} is 
URLConnection where it specifies the location of the JDK's 
default/built-in MIME table map. I don't think I've ever come across 
anyone changing that file and thinking about, I don't think I've 
actually come across code using getFileNameMap either. In any case, I 
would like to propose that we remove the reference to this location. If 
anyone really wants to override the file then they can do so with the 
content.types.user.table property. I don't propose any implementation 
changes, the implementation will continue to look at the default file as 
before. The webrev with the changes is here:


http://cr.openjdk.java.net/~alanb/8004963/webrev/

Note that I've used the opportunity to remove a paragraph from the class 
description that refers to a field that was removed in JDK1.1.6. I don't 
think this is needed anymore.


Thanks,
Alan

[1] http://openjdk.java.net/jeps/162


Re: 8004963: URLConnection, downgrade normative reference to ${java.home}/lib/content-types.properties

2012-12-13 Thread Chris Hegarty

Looks fine to me.

-Chris.

On 12/13/2012 01:49 PM, Alan Bateman wrote:


As part of preparing for modules in the future [1], we need to look at
configuration (and other) files in the JDK to see whether such files
could eventually move to module-private locations.

One of the normative references to a file in ${java.home} is
URLConnection where it specifies the location of the JDK's
default/built-in MIME table map. I don't think I've ever come across
anyone changing that file and thinking about, I don't think I've
actually come across code using getFileNameMap either. In any case, I
would like to propose that we remove the reference to this location. If
anyone really wants to override the file then they can do so with the
content.types.user.table property. I don't propose any implementation
changes, the implementation will continue to look at the default file as
before. The webrev with the changes is here:

http://cr.openjdk.java.net/~alanb/8004963/webrev/

Note that I've used the opportunity to remove a paragraph from the class
description that refers to a field that was removed in JDK1.1.6. I don't
think this is needed anymore.

Thanks,
Alan

[1] http://openjdk.java.net/jeps/162


hg: jdk8/tl/jdk: 2 new changesets

2012-12-13 Thread sean . mullan
Changeset: c97618a3c8c2
Author:juh
Date:  2012-12-13 09:35 -0500
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c97618a3c8c2

7193792: sun/security/pkcs11/ec/TestECDSA.java failing intermittently
Reviewed-by: vinnie, wetmore

! test/ProblemList.txt
! test/sun/security/pkcs11/ec/TestECDSA.java

Changeset: 7b697da6626a
Author:mullan
Date:  2012-12-13 09:37 -0500
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/7b697da6626a

Merge




hg: jdk8/tl/jdk: 8004675: Inet6Address.getHostAddress should use string scope identifier where available

2012-12-13 Thread chris . hegarty
Changeset: 682d2d3ccff5
Author:chegar
Date:  2012-12-13 14:33 +
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/682d2d3ccff5

8004675: Inet6Address.getHostAddress should use string scope identifier where 
available
Summary: ...and some minor stylistic cleanup
Reviewed-by: khazra, dsamersoff, michaelm

! src/share/classes/java/net/Inet6Address.java
! src/share/native/java/net/Inet6Address.c
+ test/java/net/Inet6Address/StringScope.java



hg: jdk8/tl/jdk: 8003890: corelibs test scripts should pass TESTVMOPTS

2012-12-13 Thread chris . hegarty
Changeset: ae5d04dbacd6
Author:chegar
Date:  2012-12-13 14:47 +
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ae5d04dbacd6

8003890: corelibs test scripts should pass TESTVMOPTS
Reviewed-by: chegar, alanb
Contributed-by: Mark Sheppard 

! test/com/oracle/net/sanity.sh
! test/com/sun/corba/cachedSocket/7056731.sh
! test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh
! test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh
! 
test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh
! test/com/sun/tools/attach/ApplicationSetup.sh
! test/com/sun/tools/attach/BasicTests.sh
! test/com/sun/tools/attach/PermissionTests.sh
! test/com/sun/tools/attach/ProviderTests.sh
! test/com/sun/tools/extcheck/TestExtcheckArgs.sh
! test/demo/zipfs/basic.sh
! test/java/io/File/GetXSpace.sh
! test/java/io/File/MacPathTest.sh
! test/java/io/File/basic.sh
! test/java/io/FileOutputStream/FileOpen.sh
! test/java/io/Serializable/class/run.sh
! test/java/io/Serializable/evolution/AddedExternField/run.sh
! test/java/io/Serializable/evolution/RenamePackage/run.sh
! test/java/io/Serializable/maskSyntheticModifier/run.sh
! test/java/io/Serializable/packageAccess/run.sh
! test/java/io/Serializable/resolveClass/consTest/run.sh
! test/java/io/Serializable/resolveClass/deserializeButton/run.sh
! test/java/io/Serializable/subclass/run.sh
! test/java/io/Serializable/superclassDataLoss/run.sh
! test/java/io/Serializable/unnamedPackageSwitch/run.sh
! test/java/lang/Class/forName/NonJavaNames.sh
! test/java/lang/ClassLoader/Assert.sh
! test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh
! test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh
! test/java/lang/ClassLoader/getdotresource.sh
! test/java/lang/Runtime/exec/setcwd.sh
! test/java/lang/StringCoding/CheckEncodings.sh
! test/java/lang/System/finalization/FinExit.sh
! test/java/lang/annotation/loaderLeak/LoaderLeak.sh
! test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh
! test/java/net/Authenticator/B4933582.sh
! test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh
! test/java/net/InetAddress/ptr/lookup.sh
! test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.sh
! test/java/net/Socket/OldSocketImpl.sh
! test/java/net/URL/B5086147.sh
! test/java/net/URL/runconstructor.sh
! test/java/net/URLClassLoader/B503.sh
! test/java/net/URLClassLoader/getresourceasstream/test.sh
! test/java/net/URLClassLoader/sealing/checksealed.sh
! test/java/net/URLConnection/6212146/test.sh
! test/java/net/URLConnection/UNCTest.sh
! test/java/nio/Buffer/LimitDirectMemory.sh
! test/java/nio/channels/AsynchronousChannelGroup/run_any_task.sh
! test/java/nio/channels/spi/AsynchronousChannelProvider/custom_provider.sh
! test/java/nio/charset/Charset/default.sh
! test/java/nio/charset/coders/CheckSJISMappingProp.sh
! test/java/nio/charset/spi/basic.sh
! test/java/nio/file/Files/delete_on_close.sh
! test/java/nio/file/Files/walkFileTree/walk_file_tree.sh
! test/java/nio/file/Path/MacPathTest.sh
! test/java/rmi/activation/Activatable/extLoadedImpl/ext.sh
! test/java/rmi/registry/readTest/readTest.sh
! test/java/rmi/reliability/benchmark/runSerialBench.sh
! test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh
! test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh
! test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh
! test/java/security/Security/signedfirst/Dyn.sh
! test/java/security/Security/signedfirst/Static.sh
! test/java/security/cert/CertificateFactory/slowstream.sh
! test/java/util/Currency/PropertiesTest.sh
! test/java/util/Locale/LocaleCategory.sh
! test/java/util/Locale/LocaleProviders.sh
! test/java/util/PluggableLocale/ExecTest.sh
! test/java/util/ResourceBundle/Bug6299235Test.sh
! test/java/util/ResourceBundle/Control/MissingResourceCauseTest.sh
! test/java/util/ServiceLoader/basic.sh
! test/java/util/TimeZone/OldIDMappingTest.sh
! test/java/util/TimeZone/TimeZoneDatePermissionCheck.sh
! test/java/util/prefs/CheckUserPrefsStorage.sh
! test/java/util/prefs/PrefsSpi.sh
! test/java/util/spi/ResourceBundleControlProvider/UserDefaultControlTest.sh
! test/java/util/zip/3GBZipFiles.sh
! test/java/util/zip/ZipFile/deletetempjar.sh
! test/javax/crypto/SecretKeyFactory/FailOverTest.sh
! test/javax/print/applet/AppletPrintLookup.sh
! test/javax/script/ProviderTest.sh
! test/javax/security/auth/Subject/doAs/Test.sh
! test/lib/security/java.policy/Ext_AllPolicy.sh
! test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.sh
! test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh
! test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh
! test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh
! test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh
! test/sun/management/jmxremote/startstop/JMXStartStopTest.sh
! test/sun/misc/Cleaner/exitOnThrow.sh
! test/sun/net/InetAddress/nameservice/dns/cname.sh
! test/sun/n

Re: Infinite Loop in KeepAliveStream

2012-12-13 Thread Chris Hegarty

I think what you suggested should work. But how about a simpler version?


 if (expected > count) {
 long nskip = expected - count;
 if (nskip <= available()) {
-long n = 0;
-while (n < nskip) {
-nskip = nskip - n;
-n = skip(nskip);
+while (nskip > 0 && available() > 0) {
+skip(nskip);
+nskip = expected - count;
 }


-Chris

On 12/13/2012 12:49 AM, Martin Buchholz wrote:



On Tue, Dec 11, 2012 at 7:40 AM, Chris Hegarty mailto:[email protected]>> wrote:

Hi Martin,

Thank you for reporting this issue. I filed 8004863: "Infinite Loop
in KeepAliveStream", to track it.

I put together a small test to reproduce the problem (inline below).
It is racey, but shows the problem most of the time on my machine.

I tried your suggested patch, but found that there were cases where
not enough data was being read off the stream, when it was being
closed. This causes a problem for subsequent requests on that
stream. The suggested patch below resolves this, and should also
resolve the problem you are seeing ( patch against jdk8 ).

Is this something that you want to run with, or would you prefer for
me to get it into jdk8?

diff -r fda257689786
src/share/classes/sun/net/www/__http/KeepAliveStream.java
--- a/src/share/classes/sun/net/__www/http/KeepAliveStream.java
Mon Dec 10 10:52:11 2012 +0900
+++ b/src/share/classes/sun/net/__www/http/KeepAliveStream.java
Tue Dec 11 15:30:50 2012 +
@@ -83,10 +83,9 @@ class KeepAliveStream extends MeteredStr
  if (expected > count) {
  long nskip = expected - count;

  if (nskip <= available()) {
-long n = 0;
-while (n < nskip) {
-nskip = nskip - n;
-n = skip(nskip);
+while (nskip > 0) {
+skip(nskip);
+nskip = expected - count;
  }


I'm still having a hard time understanding the code.  It looks to me
like the above still has issues if there is an asynchronous close in
this loop.  In that case skip() will make no progress and always return
0, and we will continue to see nskip > 0.

How about (completely untested)

  if (expected > count) {
  long nskip = (long) (expected - count);
  if (nskip <= available()) {
-long n = 0;
-while (n < nskip) {
-nskip = nskip - n;
-n = skip(nskip);
-}
+do {} while ((nskip = (long) (expected - count)) > 0L
+ && skip(Math.min(nskip, available()))
 > 0L);
  } else if (expected <=
KeepAliveStreamCleaner.MAX_DATA_REMAINING && !hurried) {
  //put this KeepAliveStream on the queue so that
the data remaining
  //on the socket can be cleanup asyncronously.



hg: jdk8/tl/langtools: 8001114: Container annotation is not checked for semantic correctness

2012-12-13 Thread jonathan . gibbons
Changeset: 376d6c1b49e5
Author:jfranck
Date:  2012-12-03 11:16 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/langtools/rev/376d6c1b49e5

8001114: Container annotation is not checked for semantic correctness
Reviewed-by: jjg

! src/share/classes/com/sun/tools/javac/code/Annotations.java
! src/share/classes/com/sun/tools/javac/comp/Annotate.java
! src/share/classes/com/sun/tools/javac/comp/Check.java
! src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
! src/share/classes/com/sun/tools/javac/resources/compiler.properties
! test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.java
! test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.out
! test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.java
! test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.out
! test/tools/javac/annotations/repeatingAnnotations/NoRepeatableAnno.out
+ 
test/tools/javac/annotations/repeatingAnnotations/RepeatingTargetNotAllowed.java
+ 
test/tools/javac/annotations/repeatingAnnotations/RepeatingTargetNotAllowed.out
! test/tools/javac/diags/examples/ContainedByNonDefault.java
+ test/tools/javac/diags/examples/InvalidDuplicateAnnotation.java



hg: jdk8/tl/jdk: 8003632: HPROF class file version java.lang.RuntimeException errors

2012-12-13 Thread david . holmes
Changeset: 8d7323a9d8ed
Author:dholmes
Date:  2012-12-13 21:18 -0500
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8d7323a9d8ed

8003632: HPROF class file version java.lang.RuntimeException errors
Reviewed-by: mchung, lancea

! src/share/javavm/export/classfile_constants.h