Re: Covariant overrides on the Buffer Hierachy

2014-04-21 Thread Zhong Yu
On Mon, Apr 21, 2014 at 7:07 AM, Ulf Zibis wrote: > So to me, this is clearly a language matter, not to solve by tricky > footprint and/or performance lasting code on APIs: > People want a _smart syntax_ for consecutive method invocations on the same > object, that's all! Amen to that! However I

review request: 8035782 : sun/launcher/LauncherHelper$FXHelper loaded unnecessarily

2014-04-21 Thread Neil Toda
Webrev http://cr.openjdk.java.net/~ntoda/8035782/ for bug https://bugs.openjdk.java.net/browse/JDK-8035782 The file : ./jdk/src/share/classes/sun/launcher/LauncherHelper.java has been modified so that the inner class FXHelper is not loaded unnecessarily. FXHelper, which is needed to

Re: RFR: 8041331 Cleanup files for jtreg and windows

2014-04-21 Thread Stuart Marks
On 4/21/14 1:58 PM, Lance Andersen wrote: Need a reviewer for some additional updates of the SQLException tests I pushed on Friday so that they play nicer WRT clean up on windows with some tools. Did some minor refactoring as part of this to address some of Roger's earlier comments seeing I

try-with-resources on arbitrary multiple files?

2014-04-21 Thread Wang Weijun
If I copy a file to another I can try (src = open(ifile); dest = open(ofile)) { while (!src.EOF) dest.write(src.read()); } but what if there are multiple destinations? Is there something like try (src = open(ifile); manager = new CloseableManager()) { for (ofile: ofiles) { ma

StringBuilder instead of StringBuffer in java.util package

2014-04-21 Thread Otávio Gonçalves de Santana
diff -r 57c1da89ae1a src/share/classes/java/util/prefs/Base64.java --- a/src/share/classes/java/util/prefs/Base64.java Wed Apr 16 12:32:36 2014 -0700 +++ b/src/share/classes/java/util/prefs/Base64.java Mon Apr 21 20:20:57 2014 -0300 @@ -57,7 +57,7 @@ int numFullGroups = aLen/3; in

Re: Covariant overrides on the Buffer Hierachy

2014-04-21 Thread David M. Lloyd
On 04/21/2014 04:51 PM, Richard Warburton wrote: Hi Peter, I'm suggesting this alternative, because Buffer methods can stay final in this case. This is more JIT-friendly. And, if I'm not mistaken, client code compiled using JDK8 onto which this API change was backported, would st

Re: Covariant overrides on the Buffer Hierachy

2014-04-21 Thread Richard Warburton
Hi Peter, > I'm suggesting this alternative, because Buffer methods can stay final in > this case. This is more JIT-friendly. And, if I'm not mistaken, client code > compiled using JDK8 onto which this API change was backported, would still > run with JDK8 (or JDK7 when compiled with -target 1.7)

RFR: 8041331 Cleanup files for jtreg and windows

2014-04-21 Thread Lance Andersen
Need a reviewer for some additional updates of the SQLException tests I pushed on Friday so that they play nicer WRT clean up on windows with some tools. Did some minor refactoring as part of this to address some of Roger's earlier comments seeing I had to touch the tests. The webrev is at http

Re: Error: ~Documents/hg-workspaces/openjdk9/dev/jdk/test/TEST.groups: group jdk_other: file not found: demo/zipfs

2014-04-21 Thread Chris Hegarty
On 04/21/2014 08:54 PM, Lance Andersen wrote: I am not seeing a demo/zipfs in my workspace. I assume that TEST.groups should be updated and if so I can take care of it? Looks like the jdk_other group should be updated to include 'jdk/nio/zipfs' ( and remove demo/zipfs ), given Shermans rece

Error: ~Documents/hg-workspaces/openjdk9/dev/jdk/test/TEST.groups: group jdk_other: file not found: demo/zipfs

2014-04-21 Thread Lance Andersen
I am not seeing a demo/zipfs in my workspace. I assume that TEST.groups should be updated and if so I can take care of it? Best Lance Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 lance.ander...@oracle.com

Conditions with that always returns true is 'if' necessary?

2014-04-21 Thread Otávio Gonçalves de Santana
Hello everyone, one question. Conditions that always returns true, is 'if' necessary? I found one. diff -r 57c1da89ae1a src/share/classes/java/lang/invoke/BoundMethodHandle.java --- a/src/share/classes/java/lang/invoke/BoundMethodHandle.java Wed Apr 16 12:32:36 2014 -0700 +++ b/src/share/classes/j

Re: Covariant overrides on the Buffer Hierachy

2014-04-21 Thread Ulf Zibis
Hi Peter, Am 21.04.2014 13:10, schrieb Peter Levart: Since the public part of Buffer type hierarchy is (mostly) just two-level, an alternative would be to generify java.nio.Buffer: Hey wow, some time ago I also tried to find a compiling and working code in that sense, but I stranded. But wha

Re: Covariant overrides on the Buffer Hierachy

2014-04-21 Thread Peter Levart
On 04/20/2014 08:56 PM, Richard Warburton wrote: Hi, It looks to me like there are no obvious problems with changing the buffer subclasses to use covariant overrides. As Alan mentioned, one API was modified this way in 7, by Martin Buchholz. The discussion threads for this change are [2] and [

Re: [9] Review request for 8029451: Tidy warnings cleanup for java.util package; minor changes in java.nio, java.sql

2014-04-21 Thread alexander stepanov
thanks! On 18.04.2014 23:47, Lance Andersen wrote: looks fine On Apr 18, 2014, at 10:04 AM, alexander stepanov > wrote: Hello, Could you please review the fix for the following bug: https://bugs.openjdk.java.net/browse/JDK-8029451 Webrev correspondin