Re: Optional.isEmpty()

2017-04-24 Thread Andrew Dinn
On 22/04/17 14:31, Jonathan Bluett-Duncan wrote: > Your reasoning has personally convinced me that a method like `isEmpty()` > would pull its weight. However, at the risk of bikeshedding, I think it > should be named differently, as `isEmpty()` immediately makes me think that > `findModule()` retur

Re: JDK 9 RFR of JDK-8174171: Move spliterator testing of BitSet into big memory tests BitSetStreamTest

2017-04-24 Thread Amy Lu
On 4/22/17 1:18 AM, Paul Sandoz wrote: On 20 Apr 2017, at 23:14, Hamlin Li wrote: Thank you for explanation Amy. you still need a reviewer. +1 It would be nice as a follow on for the test to be smart and only run certain tests when there is enough memory, or split the test further. Paul.

RFR: 8178298 (LdapLoginModule)Migrate the JNDI properties technote to javadoc doc-files

2017-04-24 Thread Vyom Tewari
Hi All, Please review the simple doc fix. Webrev : http://cr.openjdk.java.net/~vtewari/8178298/webrev0.0/index.html Bugid : https://bugs.openjdk.java.net/browse/JDK-8178298 Note, this patch depends on "JDK-8178725". Thanks, Vyom

Re: Optional.isEmpty()

2017-04-24 Thread dalibor topic
On 24.04.2017 10:26, Andrew Dinn wrote: Ah, bike-shedding! Personally, I much prefer isAbsent() to isNotPresent(), presence and absence being a historically well-sanctioned English language pairing. [n.b. I'll grant that my preference for C18th literature over Comp Sci argot might have swayed

Re: Optional.isEmpty()

2017-04-24 Thread Sander Mak
> On 22 Apr 2017, at 11:40, Peter Levart wrote: >return cf.findModule(target).isEmpty(); > > What do you think? Would this pull its weight? If I had a nickel for each time I started typing .isEm.., I'd have a respectable nickel collection. Big +1 from me. Sander

[JDK 10] RFR: 8179222 SimpleConsoleLogger should protect against MissingResourceException

2017-04-24 Thread Daniel Fuchs
Hi, Please find below a patch for: 8179222 SimpleConsoleLogger should protect against MissingResourceException https://bugs.openjdk.java.net/browse/JDK-8179222 webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8179222/webrev.00/ java.util.logging Formatters will traditionally catch Mi

Re: [JDK 10] RFR: 8179222 SimpleConsoleLogger should protect against MissingResourceException

2017-04-24 Thread Naoto Sato
Hi Daniel, The change looks good to me. EmptyResourceBundle could just return null in handleGetObject(), and Collections.emptyEnumeration() in getKeys(), without having empty map field. Naoto On 4/24/17 8:38 AM, Daniel Fuchs wrote: Hi, Please find below a patch for: 8179222 SimpleConsoleL

Re: [JDK 10] RFR: 8179222 SimpleConsoleLogger should protect against MissingResourceException

2017-04-24 Thread Daniel Fuchs
On 24/04/2017 16:51, Naoto Sato wrote: Hi Daniel, The change looks good to me. EmptyResourceBundle could just return null in handleGetObject(), and Collections.emptyEnumeration() in getKeys(), without having empty map field. Thanks Naoto. Updated webrev: http://cr.openjdk.java.net/~dfuchs/web

Re: [JDK 10] RFR: 8179222 SimpleConsoleLogger should protect against MissingResourceException

2017-04-24 Thread Naoto Sato
+1 Naoto On 4/24/17 9:10 AM, Daniel Fuchs wrote: On 24/04/2017 16:51, Naoto Sato wrote: Hi Daniel, The change looks good to me. EmptyResourceBundle could just return null in handleGetObject(), and Collections.emptyEnumeration() in getKeys(), without having empty map field. Thanks Naoto. Up

Re: Optional.isEmpty()

2017-04-24 Thread Anthony Vanelverdinghe
Hi Peter I'd say no: it's merely the negation of an existing method, and given that the bar for adding methods to Optional is set very high (see e.g. [1] and [2]), I don't see how this one would meet it. Moreover, I don't see any issues with simply writing: return !cf.findModule(target).

Re: Optional.isEmpty()

2017-04-24 Thread Roger Riggs
Hi, IMHO,boolean isEmpty() would be a good complement to the existing empty() method. $.02, Roger On 4/24/2017 1:15 PM, Anthony Vanelverdinghe wrote: Hi Peter I'd say no: it's merely the negation of an existing method, and given that the bar for adding methods to Optional is set very high

JDK 9 test-only RFR of 8179247: java/util/zip/TestExtraTime.java: add some instrumentation which might illuminate the failure of 2016-09-14

2017-04-24 Thread Brian Burkhalter
This might not be enough or might be totally unnecessary but could prove useful. https://bugs.openjdk.java.net/browse/JDK-8179247 http://cr.openjdk.java.net/~bpb/8179247/webrev.00/ Thanks, Brian

Re: JDK 9 test-only RFR of 8179247: java/util/zip/TestExtraTime.java: add some instrumentation which might illuminate the failure of 2016-09-14

2017-04-24 Thread Amy Lu
I noticed something else: 148 Path zpath = Paths.get(System.getProperty("test.dir", "."), 272 Path zpath = Paths.get(System.getProperty("test.dir", "."), Is it better to use "user.dir" instead of "test.dir" here? Thanks,Amy On 4/25/17 6:08 AM, Brian Burkhalter wrote: This

Accessing module internals from bytecode rewriting agent

2017-04-24 Thread Martin Buchholz
We've been playing with byteman. If I have a simple rule that accesses a private field, RULE trace java.util.PriorityQueue_add CLASS java.util.PriorityQueue METHOD add AT EXIT IF true DO traceln(java.util.Arrays.toString($0.queue)) ENDRULE Then with jdk8 I get output like: [1, 2, 3] but in jd

Re: Accessing module internals from bytecode rewriting agent

2017-04-24 Thread Alan Bateman
On 25/04/2017 04:26, Martin Buchholz wrote: : java.lang.IllegalArgumentException: illegal lookupClass: class java.util.PriorityQueue Bytecode rewriting agents have the power to inject code into classes; they should somehow also be able to reflectively inspect those same classes! But how? We r

Re: Accessing module internals from bytecode rewriting agent

2017-04-24 Thread Alan Bateman
On 25/04/2017 07:22, Jeremy Manson wrote: : The instrument API specifically supports a Boot-Class-Path attribute in the MANIFEST, as well as Instrumentation.appendToBootStrapClassLoaderSearch. I had been using that as a way to make it possible to rewrite JDK internals (add allocation instrumen

Re: Accessing module internals from bytecode rewriting agent

2017-04-24 Thread Jeremy Manson
Thanks, Alan. I don't use byteman, and my agent wasn't working out of the box to redefine JDK classes... I guess I can keep digging. Jeremy On Mon, Apr 24, 2017 at 11:35 PM, Alan Bateman wrote: > On 25/04/2017 07:22, Jeremy Manson wrote: > > : >> >> The instrument API specifically supports a

Re: Accessing module internals from bytecode rewriting agent

2017-04-24 Thread Alan Bateman
On 25/04/2017 07:29, Jeremy Manson wrote: Ah, then it sounds as if I just don't know what I'm doing. Any pointers? This should help: http://download.java.net/java/jdk9/docs/api/java/lang/instrument/Instrumentation.html#redefineModule-java.lang.Module-java.util.Set-java.util.Map-java.util.Map