RFR: 8022479: clean up warnings from sun.tools.asm

2013-08-07 Thread Stuart Marks
Hi, Please review the fix for this warnings cleanup bug. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8022479 (not yet available publicly, but should be shortly) Webrev: http://cr.openjdk.java.net/~smarks/reviews/8022479/webrev.0/ There are a few items of note. This is *very*

Re: RFR: 8022446: Fix serial warnings in java.util.stream

2013-08-07 Thread Paul Sandoz
On Aug 6, 2013, at 10:28 PM, Henry Jen henry@oracle.com wrote: Hi, Please review a webrev[1] clean up on serial warning, as we don't intend to serialize those tasks, we simply suppress those warnings. It would be nice if there is a way to undo serializable. [1]

Re: RFR JDK-8022442: Fix unchecked warnings in HashMap

2013-08-07 Thread Peter Levart
On 08/07/2013 12:23 AM, Dan Smith wrote: On Aug 6, 2013, at 2:43 PM, Remi Forax fo...@univ-mlv.fr wrote: On 08/06/2013 11:11 PM, Dan Smith wrote: Please review this warnings cleanup. Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8022442 (not yet visible) Webrev:

hg: jdk8/tl/langtools: 8020997: TreeMaker.AnnotationBuilder creates broken element literals with repeating annotations

2013-08-07 Thread vicente . romero
Changeset: f3deeccbf4cf Author:vromero Date: 2013-08-07 10:41 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/f3deeccbf4cf 8020997: TreeMaker.AnnotationBuilder creates broken element literals with repeating annotations Reviewed-by: jjg, jfranck !

hg: jdk8/tl/langtools: 8008274: javac should not reference/use sample code

2013-08-07 Thread vicente . romero
Changeset: c7dcf899 Author:vromero Date: 2013-08-07 11:04 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/c7dcf899 8008274: javac should not reference/use sample code Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/Main.java

hg: jdk8/tl/jdk: 7151062: [macosx] SCDynamicStore prints error messages to stderr

2013-08-07 Thread weijun . wang
Changeset: 906dd23334c1 Author:weijun Date: 2013-08-07 19:06 +0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/906dd23334c1 7151062: [macosx] SCDynamicStore prints error messages to stderr Reviewed-by: xuelei ! src/macosx/native/java/util/SCDynamicStoreConfig.m

Re: JVM application shutdown hooks

2013-08-07 Thread Laurent Bourgès
Dear core-libs members, I finally succeed in diagnosing my shutdown hook issue in Java Web Start environment: see Bug ID: 9005822. Could you please give ma feedback to my questions related to LogManager and StreamCloser shutdown hooks ? This library uses java.util.logging to log warnings and

Re: RFR [6961766]: PrintStream.write() should flush at most once

2013-08-07 Thread David Holmes
Ivan, On 7/08/2013 3:08 PM, Alan Bateman wrote: On 06/08/2013 09:38, Ivan Gerasimov wrote: Hello everybody! Would you please review a simple fix, suggested by someone on bugs.sun.com? j.i.PrintStream#write(char[]) calls out.flush() on each '\n' character found in the array. It's sufficient

hg: jdk8/tl/jdk: 8022483: Nashorn compatibility issues in jhat's OQL feature

2013-08-07 Thread sundararajan . athijegannathan
Changeset: 99f4319763a9 Author:sundar Date: 2013-08-07 18:16 +0530 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/99f4319763a9 8022483: Nashorn compatibility issues in jhat's OQL feature Reviewed-by: lagergren, attila, hannesw !

Re: RFR 8021820: Number of opened files used in select() is limited to 1024 [macosx]

2013-08-07 Thread Aleksej Efimov
Stuart, thank you for you comments, responses are below. New webrev: http://cr.openjdk.java.net/~aefimov/8021820/webrev.02/ http://cr.openjdk.java.net/%7Eaefimov/8021820/webrev.02/ -Aleksej On 08/06/2013 05:14 AM, Stuart Marks wrote: Hi Aleksej, Thanks for the update. I took a look at the

hg: jdk8/tl/jdk: 8013809: deadlock in SSLSocketImpl between between write and close

2013-08-07 Thread xuelei . fan
Changeset: 8c7cf4926157 Author:xuelei Date: 2013-08-07 06:42 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8c7cf4926157 8013809: deadlock in SSLSocketImpl between between write and close Reviewed-by: wetmore ! src/share/classes/sun/security/ssl/SSLSocketImpl.java

Re: RFR : 6799426 : (xs) Add constructor PriorityQueue(Comparator)

2013-08-07 Thread Doug Lea
On 07/25/13 10:15, Doug Lea wrote: On 07/24/13 19:30, Martin Buchholz wrote: PriorityQueue is unusual in that Doug maintains a copy in jsr166 CVS even though it is a non-thread-safe collection. I think it makes sense, because PriorityQueue and PriorityBlockingQueue have parallel APIs and

RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-07 Thread Peter Levart
Hi, I propose a patch for the following and related bugs: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8011940 Here's the 1st webrev: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.01/ The patch eliminates classic synchronization by using optimistic concurrent

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-07 Thread Aleksey Shipilev
Hi Peter, On 08/07/2013 08:18 PM, Peter Levart wrote: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.01/ Yeah, looks familiar. The install loop is very complicated though, can we simplify it? It seems profitable to move the retry loop up into annotationData(): you then don't

Re: Remove superfluous @test tags from SpliteratorTraversingAndSplittingTest

2013-08-07 Thread Stuart Marks
Yes, this is quite easy to reproduce with jtreg-4.1-b06. I haven't tried the latest sources but I don't think there's been so much change that this would be different using the tip of the jtreg source tree. It's not clear to me what the behavior ought to be if a single test file has more than

hg: jdk8/tl/jdk: 8022454: Fixed various serializations and deprecation warnings in java.util, java.net and sun.tools

2013-08-07 Thread joe . darcy
Changeset: c1f129f62f36 Author:lagergren Date: 2013-08-07 08:08 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c1f129f62f36 8022454: Fixed various serializations and deprecation warnings in java.util, java.net and sun.tools Reviewed-by: darcy Contributed-by:

Re: RFR: 8022479: clean up warnings from sun.tools.asm

2013-08-07 Thread Lance Andersen - Oracle
Hi Stuart, On the surface the changes look fine, including what you did for SwitchData. Certainly another pair of eyes would be good also on this. Best Lance On Aug 7, 2013, at 2:28 AM, Stuart Marks wrote: Hi, Please review the fix for this warnings cleanup bug. Bug:

Re: RFR JDK-8022442: Fix unchecked warnings in HashMap

2013-08-07 Thread Rémi Forax
On 08/07/2013 10:57 AM, Peter Levart wrote: On 08/07/2013 12:23 AM, Dan Smith wrote: On Aug 6, 2013, at 2:43 PM, Remi Forax fo...@univ-mlv.fr fo...@univ-mlv.fr wrote: On 08/06/2013 11:11 PM, Dan Smith wrote: Please review this warnings cleanup. Bug:

RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Dan Xu
Hi All, Please review the simple warning fix in src/share/classes/sun/invoke/anon/ConstantPoolPatch.java. webrev: http://cr.openjdk.java.net/~dxu/8022554/webrev/ Thanks, -Dan

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Lance Andersen - Oracle
looks fine Dan On Aug 7, 2013, at 1:49 PM, Dan Xu wrote: Hi All, Please review the simple warning fix in src/share/classes/sun/invoke/anon/ConstantPoolPatch.java. webrev: http://cr.openjdk.java.net/~dxu/8022554/webrev/ Thanks, -Dan Lance Andersen| Principal Member of Technical

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Mike Duigou
Why not have Class?[] on the left side as well? Mike On Aug 7 2013, at 10:49 , Dan Xu wrote: Hi All, Please review the simple warning fix in src/share/classes/sun/invoke/anon/ConstantPoolPatch.java. webrev: http://cr.openjdk.java.net/~dxu/8022554/webrev/ Thanks, -Dan

Re: RFR [6961766]: PrintStream.write() should flush at most once

2013-08-07 Thread Ivan Gerasimov
Hello David! Thanks for review. Yes - this is NOT A BUG this is the spec for this class: Optionally, a PrintStream can be created so as to flush automatically; this means that the flush method is automatically invoked after a byte array is written, one of the println methods is invoked, or

Re: RFR 8022126: Remove throws SocketException from DatagramPacket constructors accepting SocketAddress

2013-08-07 Thread Matthew Hall
On Tue, Aug 06, 2013 at 06:18:39PM +0100, Michael McMahon wrote: Documenting in release notes is okay too, but I suspect developers are not likely to look there at first anyway. Thinking aloud, it would be nice if some kind of annotation could be associated with the affected constructors

FileVisitor / Are we feature frozen yet?

2013-08-07 Thread Ben Evans
Hi, I have a suggestion for a point lambdafication change which I don't think anyone's proposed yet. (As usual, if my Google-fu has failed me, please point me at the relevant discussion). In java.nio.file we have the FileVisitor interface, which defines 4 methods. We also have the

Re: FileVisitor / Are we feature frozen yet?

2013-08-07 Thread Ben Evans
On Files? Yes, that does indeed look suspiciously like it'll cover the current use cases I have. Let me check come back if not. Ben On Tue, Aug 6, 2013 at 3:15 PM, Alan Bateman alan.bate...@oracle.comwrote: On 06/08/2013 06:39, Ben Evans wrote: Hi, I have a suggestion for a point

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Joe Darcy
I agree with Mike; Class?[] should be used on both sides. Cheers, -Joe On 08/07/2013 10:53 AM, Mike Duigou wrote: Why not have Class?[] on the left side as well? Mike On Aug 7 2013, at 10:49 , Dan Xu wrote: Hi All, Please review the simple warning fix in

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Dan Xu
Thanks for your review! I was thinking of that. But without Class?[] on the left, the compiler just worked fine. Here is a simple example, //Main.java import java.util.*; public class Main { public static final Class[] TEST_CLASS = new Class?[16]; public static final List[]

Re: RFR JDK-8022442: Fix unchecked warnings in HashMap

2013-08-07 Thread Brent Christian
Hi, I did a before/after run with the changes using Doug Lea's MapCheck microbenchmark [1]. I tested java.util.HashMap with Object, String, and Integer types. It should be mentioned this was a quick check for any major performance changes: 2 iterations, run by hand on my own (relatively

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Joe Darcy
Hi Dan, Even if the compiler does not complain, using Class or Class[] is using a raw type and raw types should generally be viewed as unacceptable in modern code. Cheers, -Joe On 08/07/2013 11:36 AM, Dan Xu wrote: Thanks for your review! I was thinking of that. But without Class?[] on

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Dan Xu
I see, Thanks! I have updated my changeto http://cr.openjdk.java.net/~dxu/8022554/webrev1/. -Dan On 08/07/2013 11:46 AM, Joe Darcy wrote: Hi Dan, Even if the compiler does not complain, using Class or Class[] is using a raw type and raw types should generally be viewed as unacceptable in

Re: RFR: 8022479: clean up warnings from sun.tools.asm

2013-08-07 Thread Joe Darcy
Hi Stuart, I believe the code in its current state out in review is a good trade-off of effort needed to address the warnings vs improvement in the quality of the code. Certainly the code would benefit from a larger cleanup, but I agree that is not warranted at this point. Longer term, say

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Joe Darcy
Amended version approved to go back. Thanks, -Joe On 08/07/2013 11:54 AM, Dan Xu wrote: I see, Thanks! I have updated my changeto http://cr.openjdk.java.net/~dxu/8022554/webrev1/. -Dan On 08/07/2013 11:46 AM, Joe Darcy wrote: Hi Dan, Even if the compiler does not complain, using Class or

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Remi Forax
On 08/07/2013 08:59 PM, Joe Darcy wrote: Amended version approved to go back. Thanks, -Joe As one of the guys involved in the design of this API :) I'm Ok with this change. Rémi On 08/07/2013 11:54 AM, Dan Xu wrote: I see, Thanks! I have updated my changeto

Re: RFR: JDK-8022554 -- Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread Dan Xu
Thank you for your review! -Dan On 08/07/2013 12:08 PM, Remi Forax wrote: On 08/07/2013 08:59 PM, Joe Darcy wrote: Amended version approved to go back. Thanks, -Joe As one of the guys involved in the design of this API :) I'm Ok with this change. Rémi On 08/07/2013 11:54 AM, Dan Xu

hg: jdk8/tl/jdk: 8022554: Fix Warnings in sun.invoke.anon Package

2013-08-07 Thread dan . xu
Changeset: d1c82d5bee3f Author:dxu Date: 2013-08-07 12:13 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/d1c82d5bee3f 8022554: Fix Warnings in sun.invoke.anon Package Reviewed-by: darcy, mduigou, lancea ! src/share/classes/sun/invoke/anon/ConstantPoolPatch.java

RFR: 8015068 : (m) Use jtreg -exclude for problemlist.txt processing

2013-08-07 Thread Mike Duigou
Hello all; This changesest simplifies how the the jdk/test/Makefile processes excluded tests. Previously the test exclusions were pre-processed by scripts in the Makefile before being passed to JTReg. JTReg will now the all the processing. The change depends upon improvements in JTReg since

hg: jdk8/tl/langtools: 7198274: RFE : Javadoc Accessibility : Use CSS styles rather than strong or i tags

2013-08-07 Thread bhavesh . x . patel
Changeset: 8c55df2442c1 Author:bpatel Date: 2013-08-07 15:00 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/8c55df2442c1 7198274: RFE : Javadoc Accessibility : Use CSS styles rather than strong or i tags Reviewed-by: jjg !

hg: jdk8/tl/langtools: 4749567: stddoclet: Add CSS style for setting header/footer to be italic

2013-08-07 Thread bhavesh . x . patel
Changeset: 33294f02c9a5 Author:bpatel Date: 2013-08-07 16:09 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/33294f02c9a5 4749567: stddoclet: Add CSS style for setting header/footer to be italic Reviewed-by: jjg !

Re: RFR: 8022479: clean up warnings from sun.tools.asm

2013-08-07 Thread Stuart Marks
Thanks for the reviews, guys. I think you meant, long term we should look to providing this functionality in some other way **and throw all of these packages into the trash!** :-) s'marks On 8/7/13 11:56 AM, Joe Darcy wrote: Hi Stuart, I believe the code in its current state out in review

Re: Possible HashMap update

2013-08-07 Thread Brent Christian
Hi, Doug I like this approach. The subclassing used for nodes/entries and trees looks good, given the constraints. The before/after references that HashMap.TreeNode inherits from LinkedHashMap.Entry are superfluous when trees are used by a HashMap, but IMO we can live with that as trees in

RFR: 8022547: [verifier] move DefaultMethodRegressionTests.java to jdk

2013-08-07 Thread Kumar Srinivasan
Hello, Testing this functionality in langtools does not seem to be the appropriate location, and the teams have decided to move it to jdk/test/vm/verifier, which seems to be the logical place. I have modified the test to remove testng dependencies, also added a variant which involves

RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-07 Thread Ivan Gerasimov
Hello everybody! Some methods of NetworkInterface class were reported to leak memory. http://bugs.sun.com/view_bug.do?bug_id=JDK-8022584 (not yet available.) Examples are isUp() and isLoopback(). Affected versions of jdk are 6, 7 and 8 Would you please review a simple fix that removes the

Remove superfluous @test tags from SpliteratorTraversingAndSplittingTest

2013-08-07 Thread Jonathan Gibbons
Chris, It might point to a bug in jtreg, or just bad jtreg meta-data. : ls one ... HelloWorld.java : cat one/HelloWorld.java /* * @test * @bug 8765432 */ /* * @test */ public class HelloWorld { public static void main(String[] args) {

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-07 Thread Alan Bateman
(cc'ing net-dev). The change looks okay to me. One suggestion (while you are there) is to check the return from GetStringUTFChars so that the name returns when it fails with NULL. -Alan. On 07/08/2013 17:46, Ivan Gerasimov wrote: Hello everybody! Some methods of NetworkInterface class

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-07 Thread Ivan Gerasimov
Thanks Alan! I've checked that and it turns out that GetStringUTFChars cannot return NULL. For allocation of the result string it calls AllocateHeap() with the default EXIT_OOM fail strategy. Thus, in case of being unable to allocate memory it simply stops VM. Sincerely yours, Ivan On

Re: RFR: 8015068 : (m) Use jtreg -exclude for problemlist.txt processing

2013-08-07 Thread Alan Bateman
On 07/08/2013 14:44, Mike Duigou wrote: Hello all; This changesest simplifies how the the jdk/test/Makefile processes excluded tests. Previously the test exclusions were pre-processed by scripts in the Makefile before being passed to JTReg. JTReg will now the all the processing. The change

hg: jdk8/tl/jdk: 8022479: clean up warnings from sun.tools.asm

2013-08-07 Thread stuart . marks
Changeset: 8c50c27418d3 Author:smarks Date: 2013-08-07 16:29 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8c50c27418d3 8022479: clean up warnings from sun.tools.asm Reviewed-by: lancea, darcy ! src/share/classes/sun/tools/asm/Assembler.java !

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-07 Thread David Holmes
On 8/08/2013 11:20 AM, Ivan Gerasimov wrote: Thanks Alan! I've checked that and it turns out that GetStringUTFChars cannot return NULL. For allocation of the result string it calls AllocateHeap() with the default EXIT_OOM fail strategy. Thus, in case of being unable to allocate memory it simply

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-07 Thread Alan Bateman
On 07/08/2013 18:20, Ivan Gerasimov wrote: Thanks Alan! I've checked that and it turns out that GetStringUTFChars cannot return NULL. For allocation of the result string it calls AllocateHeap() with the default EXIT_OOM fail strategy. Thus, in case of being unable to allocate memory it

Re: RFR 8021820: Number of opened files used in select() is limited to 1024 [macosx]

2013-08-07 Thread Stuart Marks
Hi Aleksej, Thanks for the update. The situation is a bit twisted. I picked up a couple clues from David Holmes and Jon Gibbons. The NoClassDefFoundError occurs when the JVM has hit its resource limit for the number of open files, *and* it is being run in a development environment with

Re: RFR [6961766]: PrintStream.write() should flush at most once

2013-08-07 Thread David Holmes
Hi Ivan, On 8/08/2013 3:53 AM, Ivan Gerasimov wrote: Hello David! Thanks for review. Yes - this is NOT A BUG this is the spec for this class: Optionally, a PrintStream can be created so as to flush automatically; this means that the flush method is automatically invoked after a byte array

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-07 Thread Ivan Gerasimov
David, Alan, I added checking for NULL results and throwing OOMException if necessary. I've also added some spaces along the code to improve indentation. Would you please review the updated webrev? http://washi.ru.oracle.com/~igerasim/webrevs/8022584/1/webrev/ Sincerely yours, Ivan On

Re: RFR: 8015068 : (m) Use jtreg -exclude for problemlist.txt processing

2013-08-07 Thread Mike Duigou
On 2013-08-07, at 18:22, Alan Bateman alan.bate...@oracle.com wrote: On 07/08/2013 14:44, Mike Duigou wrote: Hello all; This changesest simplifies how the the jdk/test/Makefile processes excluded tests. Previously the test exclusions were pre-processed by scripts in the Makefile

hg: jdk8/tl/jdk: 8015986: Incorrect Localization of HijrahChronology

2013-08-07 Thread masayoshi . okutsu
Changeset: 0beaa65c90c8 Author:okutsu Date: 2013-08-08 13:51 +0900 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0beaa65c90c8 8015986: Incorrect Localization of HijrahChronology Reviewed-by: naoto Contributed-by: scolebou...@joda.org, roger.ri...@oracle.com !

Re: RFR [8022584] Memory leak in some NetworkInterface methods

2013-08-07 Thread David Holmes
Ivan, On 8/08/2013 2:05 PM, Ivan Gerasimov wrote: David, Alan, I added checking for NULL results and throwing OOMException if necessary. You don't need to throw it yourself: JNU_ThrowOutOfMemoryError(env, NULL); Assuming a correct VM implementation if NULL is returned then an OOME