Set.of() and List.of() look very attractive; Map.of() looks very ugly.
I would much prefer to write something like
Map.of(
Map.pair(key, value),
Map.pair(key, value),
Map.pair(key, value)
);
and have no limit on the number of pairs. (Don't care how it works
internally...)
The last thing
In my own product (Saxon) I have a class CharSlice which is pretty much
identical to your CharSubSequenceView. So yes, I think it is useful.
Michael Kay
Saxonica
m...@saxonica.com
+44 (0118) 946 5893
On 17 Jul 2014, at 01:09, Mike Duigou mike.dui...@oracle.com wrote:
Hello all;
In Java
I note that with the basic proposal, HashSet.of and indeed
NavigableSet.of still work. They just do the wrong thing.
Tom
On 17 Jul 2014, at 08:21, Michael Kay m...@saxonica.com wrote:
Set.of() and List.of() look very attractive; Map.of() looks very ugly.
I would much prefer to write something like
Map.of(
Map.pair(key, value),
Map.pair(key, value),
Map.pair(key, value)
);
Another style that would
On 07/17/2014 04:05 AM, Paul Benedict wrote:
Regarding why you didn't choose a straight vararg solution, I prefer
you do allow any number of key/values as long as you throw an
exception if the array is not an even sized.
You can not extract/infer the type of the key and the type of the value
Hi Mandy,
minor:
JdepsTask.java:977 could be refactored to use putIfAbsent
I wonder whether the summary table at the end should contain a warning
for all the usage of jdk internals that have no replacement?
Otherwise looks good! I like the output much better :-)
best regards,
-- daniel
On
There is again another little optimization possible:
instead
hasSurr = true;
we could use
first = ~first;
and save variable hasSurr.
If there is register pressure (especially on older CPUs), this might be a
performance advantage.
Also I think we should not grow the result array for
Additionally I think, instead of retrieving
String lang = locale.getLanguage()
multiple times in chain, we could pass lang to the methods instead locale.
-Ulf
Am 17.07.2014 11:54, schrieb Ulf Zibis:
There is again another little optimization possible:
instead
hasSurr = true;
we could
Hello,
let's consider following excerpt:
149 * It is possible for intermediate sums of finite values to
150 * overflow into opposite-signed infinities; if that occurs, the
151 * final sum will be NaN even if the recorded values are all
152 * finite.
It says about
On 7/17/2014 2:41 AM, Daniel Fuchs wrote:
Hi Mandy,
minor:
JdepsTask.java:977 could be refactored to use putIfAbsent
ok.
I wonder whether the summary table at the end should contain a warning
for all the usage of jdk internals that have no replacement?
It's intentional. The list shown
Hi Mike,
while nicely abstracting the problem, promoting developers to
re-introduce some of the leakiness that the 7u6 String changes helped
remove is something I think we should be wary of. If anything I think
such an object should not be Serializable; maybe even have hashCode()
throw
Hi everybody,
here is a request for review for
8038970: Deprivilege JAX-WS/JAF code
JBS: https://bugs.openjdk.java.net/browse/JDK-8038970
webrev: http://cr.openjdk.java.net/~mkos/8038970/jaxws.04/
This is first part of changes - after this also jdk build will have to
be changed.
Changeset has
On Jul 16, 2014, at 6:28 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com
wrote:
http://cr.openjdk.java.net/~vlivanov/8050877/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8050877
Improved MethodHandleImpl.makePairwiseConvert ValueConversions.unbox and
small cleanups in related
On 7/17/2014 8:12 AM, Miroslav Kos wrote:
Hi everybody,
here is a request for review for
8038970: Deprivilege JAX-WS/JAF code
JBS: https://bugs.openjdk.java.net/browse/JDK-8038970
webrev: http://cr.openjdk.java.net/~mkos/8038970/jaxws.04/
FYI. The href at the above links were wrong.
On Jul 16, 2014, at 6:44 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com
wrote:
http://cr.openjdk.java.net/~vlivanov/8050884/webrev.00/
https://bugs.openjdk.java.net/browse/JDK-8050884
Replace ValueConversions.identity() functions with intrinsics.
Testing: jdk/java/lang/invoke,
On Jul 16, 2014, at 6:57 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com
wrote:
http://cr.openjdk.java.net/~vlivanov/8050887/webrev.00
https://bugs.openjdk.java.net/browse/JDK-8050887
Intrinsify MethodHandles.constant() for default values.
Testing: jdk/java/lang/invoke,
Hello,
On 07/17/2014 04:33 AM, Georgiy Rakov wrote:
Hello,
let's consider following excerpt:
149 * It is possible for intermediate sums of finite values to
150 * overflow into opposite-signed infinities; if that occurs, the
151 * final sum will be NaN even if the recorded
Let's fix the regression first, before make any more optimization :-)
-Sherman
On 07/17/2014 02:54 AM, Ulf Zibis wrote:
There is again another little optimization possible:
instead
hasSurr = true;
we could use
first = ~first;
and save variable hasSurr.
If there is register pressure
On Jul 16, 2014, at 5:46 PM, Stuart Marks stuart.ma...@oracle.com wrote:
Hi all,
Please review this draft JEP for Convenience Factory Methods for Collections:
https://bugs.openjdk.java.net/browse/JDK-8048330
Brief background: several times over the years there have been proposals to
The motivation section ought to more directly survey what we have now:
- Collections.emptyList/emptySet/emptyMap
- Collections.singletonList/singleton/singletonMap
- Arrays.asList
- EnumSet.of (varargs, plus some overloads)
- Stream.empty and Stream.of (singleton plus varargs)
- Constructors that,
2014/7/15 22:58 -0700, paul.san...@oracle.com:
There was discussion here:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-April/026458.html
https://bugs.openjdk.java.net/browse/JDK-4774077
http://cr.openjdk.java.net/~rwarburton/buffer-overrides-1/
The patch looks good.
On 7/17/14 12:21 AM, Michael Kay wrote:
Set.of() and List.of() look very attractive; Map.of() looks very ugly.
The proposed Map.of() API offends our sensibilities as programmers, because of
its repetition and its lack of generality. I think that's what you mean by
ugly. There is a indeed
On 7/17/14 12:46 AM, Tom Hawtin wrote:
I note that with the basic proposal, HashSet.of and indeed NavigableSet.of still
work. They just do the wrong thing.
I should have made more clear in the JEP that the proposed APIs are static
methods on the List/Map/Set interfaces, not default methods.
Hello all;
While investigating another issue I ran across some code in
java.nio.StringCharBuffer.toString(int, int) which might be possible to
improve. Currently the implementation calls toString() on the source
CharSequence and then uses String.substring to create the desired range. For
the
On 7/17/14 10:17 AM, Steven Schlansker wrote:
This is fantastic, I think a large number of developers will cheer as more and
more of Guava
makes it into core libs :)
Great!
One thing I notice is that you take a lot of care to not specify how the Map or
Set will be implemented.
This could
Hi Dan, thanks for the feedback.
On 7/17/14 10:40 AM, Dan Smith wrote:
The motivation section ought to more directly survey what we have now:
- Collections.emptyList/emptySet/emptyMap
- Collections.singletonList/singleton/singletonMap
- Arrays.asList
- EnumSet.of (varargs, plus some overloads)
On Jul 16, 2014, at 11:20 AM, Peter Levart peter.lev...@gmail.com wrote:
An alternative could be:
public Throwable throwIfUnchecked() {
if (this instanceof RuntimeException) throw (RuntimeException) this;
if (this instanceof Error) throw (Error) this;
return this;
}
Then use it
We should define different notations for static and instance methods.
For example, List.of and List::of, although I admit it is quite confusing.
--Max
On Jul 18, 2014, at 5:56, Stuart Marks stuart.ma...@oracle.com wrote:
On 7/17/14 12:46 AM, Tom Hawtin wrote:
I note that with the basic
FTR, I captured this issue:
https://bugs.openjdk.java.net/browse/JDK-8051294
(Wish they were all so easy to catch.)
— John
On Jul 17, 2014, at 5:12 PM, John Rose john.r.r...@oracle.com wrote:
On Jul 16, 2014, at 11:20 AM, Peter Levart peter.lev...@gmail.com wrote:
An alternative could
On 17/07/2014 22:56, Stuart Marks wrote:
On 7/17/14 12:46 AM, Tom Hawtin wrote:
I note that with the basic proposal, HashSet.of and indeed
NavigableSet.of still
work. They just do the wrong thing.
I should have made more clear in the JEP that the proposed APIs are
static methods on the
This is a regression caused by JDK-8038177 that changed
sun.nio.cs.ext.ExtendedCharsets to use lambda. It turns out that
ExtendedCharsets is loaded during the initialization of the extension
class loader when opening jre/lib/ext/meta-index on windows with system
locale loading extended charsets
Hi Mandy,
On 18/07/2014 2:57 PM, Mandy Chung wrote:
On 7/17/2014 9:56 PM, Mandy Chung wrote:
This is a regression caused by JDK-8038177 that changed
sun.nio.cs.ext.ExtendedCharsets to use lambda. It turns out that
ExtendedCharsets is loaded during the initialization of the extension
class
32 matches
Mail list logo