Re: RFC: draft API for JEP 269 Convenience Collection Factories

2015-10-17 Thread Ivan Gerasimov
Thank you Stuart for yours comments! On 17.10.2015 20:23, Stuart Marks wrote: On 10/14/15 5:56 AM, Ivan Gerasimov wrote: Map m1 = MyCollections. ofKeys( 1, 2, 3, 4, 5) .vals( 'a', 'b', 'c', 'd', 'e');

Re: RFC: draft API for JEP 269 Convenience Collection Factories

2015-10-17 Thread Stuart Marks
On 10/10/15 6:55 AM, Remi Forax wrote: There is an issue with LinkedHashMap (resp LinkedHashSet), it inherits from HashMap /facepalm/, and static methods are accessible through class inheritance /facepalm/. So if LinkedHashMap doesn't declare some methods of(), LinkedHashMap.of("foo") will

Re: RFC: draft API for JEP 269 Convenience Collection Factories

2015-10-17 Thread Andrew Haley
On 10/17/2015 05:46 PM, Stuart Marks wrote: > (I view calling an "inherited" class static method to be poor coding style, > but > neither javac nor NetBeans warns about it.) That surely can be fixed. Should we start a feature request? Andrew.

Re: RFC: draft API for JEP 269 Convenience Collection Factories

2015-10-17 Thread Andrew Haley
On 10/17/2015 05:46 PM, Stuart Marks wrote: > (I view calling an "inherited" class static method to be poor coding style, > but > neither javac nor NetBeans warns about it.) That surely can be fixed. Should we start a feature request? Andrew.

Re: RFC: draft API for JEP 269 Convenience Collection Factories

2015-10-17 Thread Stuart Marks
On 10/14/15 5:56 AM, Ivan Gerasimov wrote: Map m1 = MyCollections. ofKeys( 1, 2, 3, 4, 5) .vals( 'a', 'b', 'c', 'd', 'e'); Yes, we considered a bunch of different alternatives. It looks like you're

Re: RFC: draft API for JEP 269 Convenience Collection Factories

2015-10-17 Thread Stephen Colebourne
On 14 October 2015 at 18:56, Kevin Bourrillion wrote: > Note that we have empirically learned through our Lists/Sets/Maps factory > classes that varargs factory methods for mutable collections are almost > entirely useless. Having taken a few days to think it over, I

Re: JEP 276: Dynamic Linking of Language-Defined Object Models

2015-10-17 Thread Martijn Verburg
This looks very, very promising. Would it help to get the language maintainers of the most popular scripting/dynamic JVM languages involved ASAP? Happy to contact Groovy, Clojure, Scala, JRuby folks (although I suspect many of them are on this list). Cheers, Martijn On 16 October 2015 at

Re: JEP 276: Dynamic Linking of Language-Defined Object Models

2015-10-17 Thread Andrew Haley
On 10/17/2015 12:30 PM, Martijn Verburg wrote: > This looks very, very promising. Yea, fantastic. How did I manage to miss that one? According to the JEP the functionality is in Java 8 already and used by Nashorn, so it should be easy for language implementers to kick the tyres. Andrew.

Re: RFR [9] 8139706: JarFile.getBytes could use InputStream.readNBytes

2015-10-17 Thread Claes Redestad
On 2015-10-17 01:37, Xueming Shen wrote: On 10/16/2015 3:20 PM, Claes Redestad wrote: On 2015-10-16 18:48, Xueming Shen wrote: looks fine. though it might be better to simply check len != b.length, as it's still possible that reallAllBytes returns a byte[] with length > len, if the entry is

Re: RFC: draft API for JEP 269 Convenience Collection Factories

2015-10-17 Thread Stuart Marks
On 10/14/15 10:56 AM, Kevin Bourrillion wrote: (Sorry that Guava questions were asked and I didn't notice this thread sooner.) Hi Kevin, thanks for this feedback. It's still timely, as it's helping to improve the proposal. Note that we have empirically learned through our Lists/Sets/Maps