tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r706155 - /tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
Date Mon, 20 Oct 2008 08:57:01 GMT
Author: markt
Date: Mon Oct 20 01:57:01 2008
New Revision: 706155

URL: http://svn.apache.org/viewvc?rev=706155&view=rev
Log:
Fix generics warnings

Modified:
    tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java

Modified: tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java?rev=706155&r1=706154&r2=706155&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/DefaultInstanceManager.java Mon Oct 20 01:57:01
2008
@@ -112,12 +112,12 @@
     }
 
     public Object newInstance(String className) throws IllegalAccessException, InvocationTargetException,
NamingException, InstantiationException, ClassNotFoundException {
-        Class clazz = loadClassMaybePrivileged(className, classLoader);
+        Class<?> clazz = loadClassMaybePrivileged(className, classLoader);
         return newInstance(clazz.newInstance(), clazz);
     }
 
     public Object newInstance(final String className, final ClassLoader classLoader) throws
IllegalAccessException, NamingException, InvocationTargetException, InstantiationException,
ClassNotFoundException {
-        Class clazz = classLoader.loadClass(className);
+        Class<?> clazz = classLoader.loadClass(className);
         return newInstance(clazz.newInstance(), clazz);
     }
 
@@ -126,7 +126,7 @@
     	newInstance(o, o.getClass());
     }
 
-    private Object newInstance(Object instance, Class clazz) throws IllegalAccessException,
InvocationTargetException, NamingException {
+    private Object newInstance(Object instance, Class<?> clazz) throws IllegalAccessException,
InvocationTargetException, NamingException {
         if (!ignoreAnnotations) {
             Map<String, String> injections = injectionMap.get(clazz.getName());
             processAnnotations(instance, injections);
@@ -150,9 +150,9 @@
      * @throws java.lang.reflect.InvocationTargetException
      *                                if call fails
      */
-    protected void postConstruct(Object instance, Class clazz)
+    protected void postConstruct(Object instance, Class<?> clazz)
             throws IllegalAccessException, InvocationTargetException {
-        Class superClass = clazz.getSuperclass();
+        Class<?> superClass = clazz.getSuperclass();
         if (superClass != Object.class) {
             postConstruct(instance, superClass);
         }
@@ -193,9 +193,9 @@
      * @throws java.lang.reflect.InvocationTargetException
      *                                if call fails
      */
-    protected void preDestroy(Object instance, Class clazz)
+    protected void preDestroy(Object instance, Class<?> clazz)
             throws IllegalAccessException, InvocationTargetException {
-        Class superClass = clazz.getSuperclass();
+        Class<?> superClass = clazz.getSuperclass();
         if (superClass != Object.class) {
             preDestroy(instance, superClass);
         }
@@ -311,13 +311,13 @@
     }
 
 
-    protected Class loadClassMaybePrivileged(final String className, final ClassLoader classLoader)
throws ClassNotFoundException {
-        Class clazz;
+    protected Class<?> loadClassMaybePrivileged(final String className, final ClassLoader
classLoader) throws ClassNotFoundException {
+        Class<?> clazz;
         if (SecurityUtil.isPackageProtectionEnabled()) {
             try {
-                clazz = AccessController.doPrivileged(new PrivilegedExceptionAction<Class>()
{
+                clazz = AccessController.doPrivileged(new PrivilegedExceptionAction<Class<?>>()
{
 
-                    public Class run() throws Exception {
+                    public Class<?> run() throws Exception {
                         return loadClass(className, classLoader);
                     }
                 });
@@ -335,12 +335,12 @@
         return clazz;
     }
 
-    protected Class loadClass(String className, ClassLoader classLoader) throws ClassNotFoundException
{
+    protected Class<?> loadClass(String className, ClassLoader classLoader) throws
ClassNotFoundException {
         if (className.startsWith("org.apache.catalina")) {
             return containerClassLoader.loadClass(className);
         }
         try {
-            Class clazz = containerClassLoader.loadClass(className);
+            Class<?> clazz = containerClassLoader.loadClass(className);
             if (ContainerServlet.class.isAssignableFrom(clazz)) {
                 return clazz;
             }
@@ -361,7 +361,7 @@
         }
     }
 
-    private void checkAccess(Class clazz, Properties restricted) {
+    private void checkAccess(Class<?> clazz, Properties restricted) {
         while (clazz != null) {
             if ("restricted".equals(restricted.getProperty(clazz.getName()))) {
                 throw new SecurityException("Restricted class" + clazz);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message