On Thu, 13 Nov 2025 06:46:37 GMT, Sergey Bylokhov <[email protected]> wrote:
> > I've been wondering why I can't see any javadoc changes. > > Sounds reasonable to me. > > @aivanov-jdk How could the csr be skipped? This is clearly a behavior change, > even without a spec update. > > > The code change would take care of the NPE and since RDP1 is approaching > > with not much time left for CSR approval > > That is not a valid argument to skip a csr. @mrserb I agree with Prasanta's evaluation. The spec doesn't specify how `null` arguments are handled, nor does it specify `NullPointerException` is to be thrown. The `BevelBorder` constructor that takes four color parameters https://github.com/openjdk/jdk/blob/412b43658a878bf004502a68948cb0c68375468e/src/java.desktop/share/classes/javax/swing/border/BevelBorder.java#L112-L120 accepts `null` and does not throw exceptions. Yet the `BevelBorder` constructor that takes two color parameters threw `NullPointerException` if either of the color arguments was `null`. What's fixed is the behaviour of this constructor now aligns with that of the constructor with more arguments, specifically *no `NullPointerException` is thrown if `null` color is passed*. Now, both constructors behave *consistently*. In my opinion, such a change doesn't require a CSR. Moreover, this new behaviour is consistent with what specified for [`BevelBorder.getHighlightInnerColor`](https://docs.oracle.com/en/java/javase/25/docs/api/java.desktop/javax/swing/border/BevelBorder.html#getHighlightInnerColor()) and other getters of colors. https://github.com/openjdk/jdk/blob/412b43658a878bf004502a68948cb0c68375468e/src/java.desktop/share/classes/javax/swing/border/BevelBorder.java#L231-L233 It could be good to expand the specification of the constructors with regards to `null` arguments. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27949#issuecomment-3527766363
