RFR 8185027: Typo in java.net.URLClassLoader.findResources(String) method documentation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR 8185027: Typo in java.net.URLClassLoader.findResources(String) method documentation

Chris Hegarty
The returns section of the java.net.URLClassLoader.findResources(String)
method documentation, contains the following sentence:
    "an Enumeration of URLs If the loader is closed, the Enumeration
     will be empty."
should be replaced by:
    "An Enumeration of URLs. If the loader is closed, the Enumeration
     will be empty."

diff --git a/src/java.base/share/classes/java/net/URLClassLoader.java
b/src/java.base/share/classes/java/net/URLClassLoader.java
--- a/src/java.base/share/classes/java/net/URLClassLoader.java
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java
@@ -658,7 +658,7 @@
       *
       * @param name the resource name
       * @exception IOException if an I/O exception occurs
-     * @return an {@code Enumeration} of {@code URL}s
+     * @return An {@code Enumeration} of {@code URL}s.
       *         If the loader is closed, the Enumeration will be empty.
       */
      public Enumeration<URL> findResources(final String name)

-Chris.
Reply | Threaded
Open this post in threaded view
|

Re: RFR 8185027: Typo in java.net.URLClassLoader.findResources(String) method documentation

Alan Bateman
On 12/12/2017 10:27, Chris Hegarty wrote:
> The returns section of the java.net.URLClassLoader.findResources(String)
> method documentation, contains the following sentence:
>    "an Enumeration of URLs If the loader is closed, the Enumeration
>     will be empty."
> should be replaced by:
>    "An Enumeration of URLs. If the loader is closed, the Enumeration
>     will be empty."
Looks fine. Separately, I don't know if "empty" is defined anywhere for
Enumerations, it could just say "contains no elements" or other variants.

-Alan

Reply | Threaded
Open this post in threaded view
|

Re: RFR 8185027: Typo in java.net.URLClassLoader.findResources(String) method documentation

Chris Hegarty

On 12/12/17 10:36, Alan Bateman wrote:
>...
> Looks fine. Separately, I don't know if "empty" is defined anywhere for
> Enumerations, it could just say "contains no elements" or other variants.

That is better.

diff --git a/src/java.base/share/classes/java/net/URLClassLoader.java
b/src/java.base/share/classes/java/net/URLClassLoader.java
--- a/src/java.base/share/classes/java/net/URLClassLoader.java
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java
@@ -658,8 +658,8 @@
       *
       * @param name the resource name
       * @exception IOException if an I/O exception occurs
-     * @return an {@code Enumeration} of {@code URL}s
-     *         If the loader is closed, the Enumeration will be empty.
+     * @return An {@code Enumeration} of {@code URL}s.
+     *         If the loader is closed, the Enumeration contains no
elements.
       */
      public Enumeration<URL> findResources(final String name)
          throws IOException


-Chris.
Reply | Threaded
Open this post in threaded view
|

Re: RFR 8185027: Typo in java.net.URLClassLoader.findResources(String) method documentation

Alan Bateman


On 12/12/2017 10:40, Chris Hegarty wrote:
>
> -     * @return an {@code Enumeration} of {@code URL}s
> -     *         If the loader is closed, the Enumeration will be empty.
> +     * @return An {@code Enumeration} of {@code URL}s.
> +     *         If the loader is closed, the Enumeration contains no
> elements.

Looks good.