Hi Rémi,
I don't want to be pedantic, but I see this as an anti-pattern. You
would create an Optional just to immediately call orElse() on it. That's
not how Optional should be used. (But you know that.)
It's described in Recipe 12 of this Java Magazine article, for instance:
https://blogs.o
On 3/24/21 12:09 PM, Rémi Forax wrote:
On Wed, 24 Mar 2021 09:56:16 GMT, Patrick Concannon
wrote:
Hi,
Could someone please review my code for updating the code in the `java.time`
package to make use of the `instanceof` pattern variable?
Kind regards,
Patrick
src/java.base/share/classe
Hi Sergey,
I was also wondering why TreeMap doesn't just use a default comparator
and always checks for null instead.
The problem with your patch is that deserialized TreeMap instances which
were serialized from a previous version would still have the comparator
set to null, thus resulting in a N
Hi Sergey and Sergey ;),
that's totally correct! Serialization really is a beast sometimes, you
have to take care that instances that have been serialized even with
Java 1.2 still get deserialized correctly in the current version.
So it's not sufficient to only look at the constructors when the c
Hi Nir,
at first I thought "Wow, it would be really cool to have that method in
Iterable! Why isn't it there already?"
But after thinking about it, I'm now convinced that it would be a bad
idea. Because it extends the scope of this small, tiny Iterable
interface to something bigger which it
Hi Steven!
Sorry for coming back so lately; the main reason is that I can't answer
your question. The issue you are describing indeed is a bit weird, and I
can only speculate that it's like this because LambdaMetaFactory was
mainly designed to be used in bootstrap methods for invokedynamic cal
Hi Steven!
On 1/19/22 2:23 AM, Steven Schlansker wrote:
Interestingly, that wasn't what I found. At least as of Java 14, the
Metafactory generation approach (as limited as my first pass was) was
competitive with CGLib hand-generated code in many (but not all) cases, and
significantly faster
On 4/7/22 19:27, Kasper Nielsen wrote:
nope, see my previous mail to Ceki, the VM is cheating here if it can
inline the call to MethodHandles.lookup()
Does how the VM cheats really matter? The fact is that the code in the JDK
can
get the calling class and implement something like MethodHan
Good morning!
On 4/7/22 23:59, Kasper Nielsen wrote:
Hi Michael,
I don't really have an opinion on how you obtain a logger. But one
particular
use-case I've had was that I would like to perform some access checks based
on the module of the caller. Something similar to how Panama checks for
na
On 4/20/22 10:15, sminervini.prism wrote:
> To the Java Community Process, and OpenJDK community,
>
> A number of us have been waiting on serious consideration for
apprehension of
>
> core-libs-dev Digest Vol 180 Issue 174 Topic 1
>
> since we have posted, but not received an addressal and appre
10 matches
Mail list logo