On Mon, 7 Sep 2020 08:33:17 GMT, Chris Hegarty <che...@openjdk.org> wrote:
>> Jaikiran Pai has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental >> views will show differences compared to the previous content of the PR. The >> pull request contains one new commit since >> the last revision: >> 8252767: URLConnection.setRequestProperty throws IllegalAccessError >> Summary: Throw an IllegalStateException from >> sun.net.www.URLConnection#setRequestProperty when already connected >> Reviewed-By: > > test/jdk/java/net/URLConnection/RequestProperties.java line 90: > >> 88: * an {@link IllegalStateException} when already connected >> 89: * >> 90: * @throws Exception > > This @throws seems superfluous. Please remove. Removed. > test/jdk/java/net/URLConnection/RequestProperties.java line 97: > >> 95: conn.connect(); >> 96: try { >> 97: conn.setRequestProperty("foo", "bar"); > > While here, and not directly related to this change, it would be good to add > coverage for the other > xxxRequestPropertXXX methods - to ensure that they also throw the correction > exception when connected. Thank you for the review, Chris. I've updated this PR to include these inputs into the test case. ------------- PR: https://git.openjdk.java.net/jdk/pull/26