On Sun, 6 Sep 2020 09:05:55 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Can I please get a review and a sponsor for a fix for the issue reported at >> https://bugs.openjdk.java.net/browse/JDK-8252767? >> As noted in that issue, the `sun.net.www.URLConnection#setRequestProperty` >> is throwing a `IllegalAccessError` instead >> of a `IllegalStateException`. The commit here fixes that and includes a test >> which reproduces the issue and verifies >> the fix. Would a CSR be needed for this change? > > test/jdk/sun/net/www/URLConnectionTest.java line 36: > >> 34: * @run testng URLConnectionTest >> 35: */ >> 36: public class URLConnectionTest { > > I think it would be better to put the test in test/jdk/java/net/URLConnection > as its a test for > URLConnection.setRequestProperty from the API user point of view. Also it's a > a specific test for the behaviour of one > method so I think needs a more specific name too ("URLConnectionTest" is too > general) Hello Alan, There's a `test/jdk/java/net/URLConnection/RequestProperties.java` test class which tests the `setRequestProperty` for `NullPointerException` expectations of that API. Perhaps it would be OK to add this test into that class? ------------- PR: https://git.openjdk.java.net/jdk/pull/26