Integrated: JDK-8262277: URLClassLoader.getResource throws undocumented IllegalArgumentException

2021-03-15 Thread Craig Andrews
On Sat, 20 Feb 2021 19:20:48 GMT, Craig Andrews wrote: > `java.net.URLClassLoader.getResource` can throw an undocumented > `IllegalArgumentException`. > > According to the javadoc for the `getResource` and `findResource` methods, > neither should be throwing `IllegalArgumentEx

Re: RFR: JDK-8262277: URLClassLoader.getResource throws undocumented IllegalArgumentException [v5]

2021-03-15 Thread Craig Andrews
On Mon, 15 Mar 2021 16:26:35 GMT, Kevin Rushforth wrote: > You need to fix this error: > > > Title mismatch between PR and JBS for issue JDK-8262277 > > by changing the title of this PR to match the JBS title. Then you should be > able to integrate it. Done - how's it look now? -

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v5]

2021-03-15 Thread Craig Andrews
On Tue, 9 Mar 2021 08:40:47 GMT, Prasanta Sadhukhan wrote: >> Craig Andrews 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 re

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v5]

2021-03-05 Thread Craig Andrews
e, ParseUtil.encodePath(name, false)); > } catch (MalformedURLException e) { > throw new IllegalArgumentException("name"); > } > > Instead of throwing `IllegalArgumentException`, that line should simply > return `null`. Crai

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v4]

2021-03-05 Thread Craig Andrews
On Fri, 5 Mar 2021 23:35:46 GMT, Brent Christian wrote: >> Craig Andrews 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 co

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v4]

2021-03-05 Thread Craig Andrews
On Thu, 4 Mar 2021 21:10:56 GMT, Craig Andrews wrote: >> Hi, Craig >> The commented-out lines should be removed from the change. >> >> As Alan said, a regression test will be needed. At minimum, it should test >> a method that returns a URL, as we

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v3]

2021-03-05 Thread Craig Andrews
On Fri, 5 Mar 2021 15:46:40 GMT, Craig Andrews wrote: >> test/jdk/java/net/URLClassLoader/TestBug8262277.java line 30: >> >>> 28: * @summary Test to see if URLClassLoader.getResource and >>> URLClassLoader.getResources >>> 29: * throw IllegalArgument

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v3]

2021-03-05 Thread Craig Andrews
On Fri, 5 Mar 2021 15:42:11 GMT, Alan Bateman wrote: > I'd prefer if the test checked that findResource returned null and that > findResources returned an empty enumeration. I'll update the test accordingly. > think we should be able to find a better name for the test too. > Do you really wan

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v4]

2021-03-05 Thread Craig Andrews
e, ParseUtil.encodePath(name, false)); > } catch (MalformedURLException e) { > throw new IllegalArgumentException("name"); > } > > Instead of throwing `IllegalArgumentException`, that line should simply > return `null`. Crai

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v3]

2021-03-04 Thread Craig Andrews
e, ParseUtil.encodePath(name, false)); > } catch (MalformedURLException e) { > throw new IllegalArgumentException("name"); > } > > Instead of throwing `IllegalArgumentException`, that line should simply > return `null`. Crai

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v2]

2021-03-04 Thread Craig Andrews
e, ParseUtil.encodePath(name, false)); > } catch (MalformedURLException e) { > throw new IllegalArgumentException("name"); > } > > Instead of throwing `IllegalArgumentException`, that line should simply > return `null`. Crai

Re: RFR: JDK-8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException [v2]

2021-03-04 Thread Craig Andrews
On Wed, 3 Mar 2021 18:10:25 GMT, Brent Christian wrote: >The commented-out lines should be removed from the change. Done! 👍 > As Alan said, a regression test will be needed. At minimum, it should test a > method that returns a URL, as well as a method that returns an Enumeration > (which can

Re: RFR: 8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException

2021-03-03 Thread Craig Andrews
On Sat, 20 Feb 2021 19:22:10 GMT, Craig Andrews wrote: >> _NOTE_: I've reported this issue at https://bugreport.java.com/ (internal >> review ID : 9069151) >> >> `java.net.URLClassLoader.getResource` can throw an undocumented >> `IllegalArgumentException`.

Re: RFR: 8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException

2021-03-03 Thread Craig Andrews
On Sat, 20 Feb 2021 19:20:48 GMT, Craig Andrews wrote: > _NOTE_: I've reported this issue at https://bugreport.java.com/ (internal > review ID : 9069151) > > `java.net.URLClassLoader.getResource` can throw an undocumented > `IllegalArgumentException`. > > Accord

RFR: 8262277: java.net.URLClassLoader.getResource throws undocumented IllegalArgumentException

2021-03-03 Thread Craig Andrews
_NOTE_: I've reported this issue at https://bugreport.java.com/ (internal review ID : 9069151) `java.net.URLClassLoader.getResource` can throw an undocumented `IllegalArgumentException`. According to the javadoc for the `getResource` and `findResource` methods, neither should be throwing `Ille