mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
8262277: URLClassLoader.getResource throws undocumented IllegalArgumentException
Reviewed-by: alanb, bchristi, psadhukhan
This commit is contained in:
parent
4f1cda4fd7
commit
0c718ab2a0
2 changed files with 60 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -600,7 +600,7 @@ public class URLClassPath {
|
|||
try {
|
||||
url = new URL(base, ParseUtil.encodePath(name, false));
|
||||
} catch (MalformedURLException e) {
|
||||
throw new IllegalArgumentException("name");
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -636,7 +636,7 @@ public class URLClassPath {
|
|||
try {
|
||||
url = new URL(base, ParseUtil.encodePath(name, false));
|
||||
} catch (MalformedURLException e) {
|
||||
throw new IllegalArgumentException("name");
|
||||
return null;
|
||||
}
|
||||
final URLConnection uc;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue