JDK 8 RFR: warnings cleanup of ClassLoader, ClassValue, and SecurityManager
Mike Duigou
mike.duigou at oracle.com
Tue Oct 22 18:53:27 UTC 2013
Looks good. It would be nice to change the <code></code> to {@code } but that can certainly wait.
Mike
On Oct 22 2013, at 11:20 , Joe Darcy <joe.darcy at oracle.com> wrote:
> Hello,
>
> Please review some warnings cleanups to
>
> src/share/classes/java/lang/ClassLoader.java
> src/share/classes/java/lang/ClassValue.java
> src/share/classes/java/lang/SecurityManager.java
>
> Thanks,
>
> -Joe
>
> diff -r 54869853c06c src/share/classes/java/lang/ClassLoader.java
> --- a/src/share/classes/java/lang/ClassLoader.java Tue Oct 22 14:13:06 2013 +0100
> +++ b/src/share/classes/java/lang/ClassLoader.java Tue Oct 22 11:19:31 2013 -0700
> @@ -362,7 +362,7 @@
> * default implementation of this method searches for classes in the
> * following order:
> *
> - * <p><ol>
> + * <ol>
> *
> * <li><p> Invoke {@link #findLoadedClass(String)} to check if the class
> * has already been loaded. </p></li>
> @@ -488,7 +488,7 @@
> final SecurityManager sm = System.getSecurityManager();
> if (sm != null) {
> if (ReflectUtil.isNonPublicProxyClass(cls)) {
> - for (Class intf: cls.getInterfaces()) {
> + for (Class<?> intf: cls.getInterfaces()) {
> checkPackageAccess(intf, pd);
> }
> return;
> diff -r 54869853c06c src/share/classes/java/lang/ClassValue.java
> --- a/src/share/classes/java/lang/ClassValue.java Tue Oct 22 14:13:06 2013 +0100
> +++ b/src/share/classes/java/lang/ClassValue.java Tue Oct 22 11:19:31 2013 -0700
> @@ -692,7 +692,7 @@
>
> /** Remove all stale entries, everywhere. */
> private void removeStaleEntries() {
> - Entry[] cache = getCache();
> + Entry<?>[] cache = getCache();
> removeStaleEntries(cache, 0, cache.length + PROBE_LIMIT - 1);
> }
>
> diff -r 54869853c06c src/share/classes/java/lang/SecurityManager.java
> --- a/src/share/classes/java/lang/SecurityManager.java Tue Oct 22 14:13:06 2013 +0100
> +++ b/src/share/classes/java/lang/SecurityManager.java Tue Oct 22 11:19:31 2013 -0700
> @@ -56,7 +56,7 @@
> * are called by various methods in the Java libraries before those
> * methods perform certain potentially sensitive operations. The
> * invocation of such a <code>check</code> method typically looks like this:
> - * <p><blockquote><pre>
> + * <blockquote><pre>
> * SecurityManager security = System.getSecurityManager();
> * if (security != null) {
> * security.check<i>XXX</i>(argument, . . . );
> @@ -323,7 +323,7 @@
> * by {@link ClassLoader#getSystemClassLoader}) or one of its ancestors.
> * <p>
> * This method will return
> - * <code>null</code> in the following three cases:<p>
> + * <code>null</code> in the following three cases:
> * <ol>
> * <li>All methods on the execution stack are from classes
> * defined using the system class loader or one of its ancestors.
> @@ -370,7 +370,7 @@
> * by {@link ClassLoader#getSystemClassLoader}) or one of its ancestors.
> * <p>
> * This method will return
> - * <code>null</code> in the following three cases:<p>
> + * <code>null</code> in the following three cases:
> * <ol>
> * <li>All methods on the execution stack are from classes
> * defined using the system class loader or one of its ancestors.
> @@ -429,7 +429,7 @@
> * by {@link ClassLoader#getSystemClassLoader}) or one of its ancestors.
> * <p>
> * This method will return
> - * -1 in the following three cases:<p>
> + * -1 in the following three cases:
> * <ol>
> * <li>All methods on the execution stack are from classes
> * defined using the system class loader or one of its ancestors.
> @@ -1281,7 +1281,6 @@
> * This method calls <code>checkPermission</code> with the
> * <code>PropertyPermission(key, "read")</code> permission.
> * <p>
> - * <p>
> * If you override this method, then you should make a call to
> * <code>super.checkPropertyAccess</code>
> * at the point the overridden method would normally throw an
> @@ -1714,7 +1713,7 @@
> throw new NullPointerException("class can't be null");
> }
> if (which != Member.PUBLIC) {
> - Class stack[] = getClassContext();
> + Class<?> stack[] = getClassContext();
> /*
> * stack depth of 4 should be the caller of one of the
> * methods in java.lang.Class that invoke checkMember
>
More information about the core-libs-dev
mailing list