logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1513858 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
Date Wed, 14 Aug 2013 12:57:45 GMT
Author: rpopma
Date: Wed Aug 14 12:57:45 2013
New Revision: 1513858

URL: http://svn.apache.org/r1513858
Log:
fixed compiler warnings for raw types

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java?rev=1513858&r1=1513857&r2=1513858&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
Wed Aug 14 12:57:45 2013
@@ -81,11 +81,11 @@ public class ClassLoaderContextSelector 
         } else {
             if (getCallerClass != null) {
                 try {
-                    Class clazz = Class.class;
+                    Class<?> clazz = Class.class;
                     boolean next = false;
                     for (int index = 2; clazz != null; ++index) {
                         final Object[] params = new Object[] {index};
-                        clazz = (Class) getCallerClass.invoke(null, params);
+                        clazz = (Class<?>) getCallerClass.invoke(null, params);
                         if (clazz == null) {
                             break;
                         }
@@ -106,7 +106,7 @@ public class ClassLoaderContextSelector 
             }
 
             if (securityManager != null) {
-                final Class clazz = securityManager.getCaller(fqcn);
+                final Class<?> clazz = securityManager.getCaller(fqcn);
                 if (clazz != null) {
                     final ClassLoader ldr = clazz.getClassLoader() != null ? clazz.getClassLoader()
:
                         ClassLoader.getSystemClassLoader();
@@ -222,7 +222,7 @@ public class ClassLoaderContextSelector 
     private static void setupCallerCheck() {
         try {
             final ClassLoader loader = Loader.getClassLoader();
-            final Class clazz = loader.loadClass("sun.reflect.Reflection");
+            final Class<?> clazz = loader.loadClass("sun.reflect.Reflection");
             final Method[] methods = clazz.getMethods();
             for (final Method method : methods) {
                 final int modifier = method.getModifiers();
@@ -256,10 +256,10 @@ public class ClassLoaderContextSelector 
      */
     private static class PrivateSecurityManager extends SecurityManager {
 
-        public Class getCaller(final String fqcn) {
-            final Class[] classes = getClassContext();
+        public Class<?> getCaller(final String fqcn) {
+            final Class<?>[] classes = getClassContext();
             boolean next = false;
-            for (final Class clazz : classes) {
+            for (final Class<?> clazz : classes) {
                 if (clazz.getName().equals(fqcn)) {
                     next = true;
                     continue;



Mime
View raw message