Re: Finding max or min of exactly two objects

2025-05-24 Thread Zheka Kozlov
Collections.max(List.of(a, b))? On Tue, May 13, 2025 at 7:12 PM Tagir Valeev wrote: > The alternatives we have now: > BinaryOperator.maxBy(Comparator.naturalOrder()).apply(a, b); > This speaks clearly about the intent (we'd like to get the maximum and we > write 'maxBy') but very wordy. > > Stre

How many methods have been deprecated in sun.misc.Unsafe? (JEP 471)

2024-09-13 Thread Zheka Kozlov
Hello! JEP 471 says that 79 methods out of 87 have been deprecated in sun.misc.Unsafe. However, I have a different number. Deprecated for removal in Java 18: 1. public long objectFieldOffset(Field f) 2. public Object staticFieldBase(Field f) 3. public long staticFieldOffset(Field f) Deprecated f