Re: Builder pattern for Java records

2021-05-22 Thread Brian Goetz
As Rafaello mentioned, these seem well below the threshold for “convenience” methods in the JDK. The bar here is pretty high. This seems something better suited to Apache Commons? Sent from my iPad > On May 22, 2021, at 5:33 PM, Alberto Otero Rodríguez > wrote: > > Understood Brian,

RE: Builder pattern for Java records

2021-05-22 Thread Alberto Otero Rodríguez
Understood Brian, great answer. Could you please answer to my other proposal?: https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-May/077955.html Regards, Alberto. De: Brian Goetz Enviado: sábado, 22 de mayo de 2021 22:35 Para: Alberto Otero Rodríguez

Re: Builder pattern for Java records

2021-05-22 Thread Brian Goetz
There is no end to patterns of code that could be generated by tools, and for each of them, one can imagine situations where they would be useful. But in addition to the other reply about how builders are really only called for when there are a large number of _optional_ components, the

Re: RFR: 8264859: Implement Context-Specific Deserialization Filters [v5]

2021-05-22 Thread Roger Riggs
> JEP 415: Context-specific Deserialization Filters extends the deserialization > filtering mechanisms with more flexible and customizable protections against > malicious deserialization. See JEP 415: https://openjdk.java.net/jeps/415. > The `java.io.ObjectInputFilter` and

RE: New java.util.Strings class

2021-05-22 Thread Alberto Otero Rodríguez
Hi Raffaello, I undestand what you said. However: 1) I based my code in the current java.util.Objects class of Java 16. I don't know why the Objects class was a good idea, but the Strings class is not. 2) It's not just treating with nulls, but also with empty strings and whitespaces. If Java

Re: RFR: 8224243: Make AccessibleObject a sealed class [v2]

2021-05-22 Thread Alan Bateman
On Fri, 21 May 2021 02:42:50 GMT, Joe Darcy wrote: >> Conceptually, AccessbileObject is a sealed class with a protected >> constructor stating >> >> Constructor: only used by the Java Virtual Machine. >> >> With the language now supporting sealed classes, the AccessbileObject should >>

Re: RFR: 8224243: Make AccessibleObject a sealed class [v2]

2021-05-22 Thread Alan Bateman
On Fri, 21 May 2021 02:42:50 GMT, Joe Darcy wrote: >> Conceptually, AccessbileObject is a sealed class with a protected >> constructor stating >> >> Constructor: only used by the Java Virtual Machine. >> >> With the language now supporting sealed classes, the AccessbileObject should >>

Re: New java.util.Strings class

2021-05-22 Thread Raffaello Giulietti
Hi Alberto, there's an understandable tendency to wish to add convenience/utility methods like the ones you are proposing. Often, however, the perceived benefits are not assessed accurately. In other words, convenience methods in core libraries must be of real general interest. Coming to

Re: RFR: 8266459: Implement JEP 411: Deprecate the Security Manager for Removal [v3]

2021-05-22 Thread Alan Bateman
On Fri, 21 May 2021 18:00:13 GMT, Phil Race wrote: > Are you suggesting that the patch doesn't need testing as it is ? It should > be the same either way. > It is very straight forward to run the automated tests across all platforms > these days. > I get the impression that no one is