harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r531480 - in /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes: javasrc/java/lang/ javasrc/java/lang/reflect/ javasrc/java/security/ javasrc/org/apache/harmony/drlvm/ javasrc/org/apache/harmony/fortress/ javasrc/org/apache/harmony/...
Date Mon, 23 Apr 2007 14:28:04 GMT
Author: gshimansky
Date: Mon Apr 23 07:27:54 2007
New Revision: 531480

URL: http://svn.apache.org/viewvc?view=rev&rev=531480
Log:
Applied HARMONY-3695, HARMONY-3696 and HARMONY-3697 - fixed compilation
warnings in kernel classes


Added:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/security/
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/security/fortress/
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/security/fortress/SecurityUtils.java
      - copied, changed from r531372, harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/fortress/security/SecurityUtils.java
Removed:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/fortress/
Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ClassLoader.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Object.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Runtime.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadWeakRef.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMExecutionEngine.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMStart.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Constructor.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Field.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Method.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessControlContext.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessController.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/drlvm/VMHelperFastPath.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/Reflection.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParser.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParserTokenTypes.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/ParameterizedTypeRepository.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/TypeVariableRepository.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/WildcardTypeRepository.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryCreator.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryFinder.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryLoader.java
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.h

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Class.java
Mon Apr 23 07:27:54 2007
@@ -50,7 +50,6 @@
 import java.security.ProtectionDomain;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Map;
 
@@ -906,6 +905,7 @@
      *  @com.intel.drl.spec_ref
      * 
      **/
+    @SuppressWarnings("unchecked")
     public <A extends Annotation> A getAnnotation(Class<A> annotationClass) {
         if(annotationClass == null) {
             throw new NullPointerException();
@@ -1220,6 +1220,7 @@
             }
         }
 
+        @SuppressWarnings("unchecked")
         public synchronized Constructor<T>[] getPublicConstructors() {
             if (publicConstructors != null) {
                 return publicConstructors;
@@ -1343,7 +1344,7 @@
         private Annotation[] declaredAnnotations;
         private Type[] genericInterfaces;
         private Type genericSuperclass;
-        private TypeVariable[] typeParameters;
+        private TypeVariable<Class<T>>[] typeParameters;
         
         public synchronized Annotation[] getAllAnnotations() {
             if (allAnnotations != null) {
@@ -1497,49 +1498,14 @@
             return genericSuperclass;
         }
 
-        /**
-         *  Checks if two methods match by name and parameter types.
-         *  Ignored return type
-         *
-         * @param m1 one method to check
-         * @param m2 the other method to check
-         * @return true if they match, false otherwise
-         */
-        private boolean isMethodMatches(Method m1, Method m2) {
-            return m1.getName().equals(m2.getName())
-                && isTypeMatches(m1.getParameterTypes(), m2.getParameterTypes());
-        }
-
-        private void mergeMethods(HashSet names, ArrayList thisMethods,
-                                  Method[] superMethods) {
-            for (int i = 0; i < superMethods.length; i++) {
-                Method superMethod = superMethods[i];
-                if (names.contains(superMethod.getName())) {
-                    int j;
-                    for (j = 0; j < thisMethods.size(); j++) {
-                        Method thisMethod = (Method)thisMethods.get(j);
-                        if (isMethodMatches(thisMethod, superMethod)) {
-                            break;
-                        }
-                    }
-                    if (j >= thisMethods.size()) {
-                        thisMethods.add(superMethod);
-                        names.add(superMethod.getName());
-                    }
-                } else {
-                    thisMethods.add(superMethod);
-                    names.add(superMethod.getName());
-                }
-            }
-        }
-        
-        public synchronized TypeVariable[] getTypeParameters() {
+        @SuppressWarnings("unchecked")
+        public synchronized TypeVariable<Class<T>>[] getTypeParameters() {
             //So, here it can be only TypeVariable elements.
             if (typeParameters == null) {
                 Object startPoint = (Object) Class.this;
                 String signature = AuxiliaryUtil.toUTF8(VMGenericsAndAnnotations.getSignature(Class.this));
// getting this class signature
                 if (signature == null) {
-                    return typeParameters =  new TypeVariable[0];
+                    return typeParameters = new TypeVariable[0];
                 }
                 InterimClassGenericDecl decl = (InterimClassGenericDecl) Parser.parseSignature(signature,
SignatureKind.CLASS_SIGNATURE, (GenericDeclaration)startPoint); // GenericSignatureFormatError
can be thrown here
                 InterimTypeParameter[] pTypeParameters = decl.typeParameters;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ClassLoader.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ClassLoader.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ClassLoader.java
Mon Apr 23 07:27:54 2007
@@ -645,6 +645,7 @@
     /**
      * Initializes the system class loader.
      */
+    @SuppressWarnings("unchecked")
     private static void initSystemClassLoader() {
         if (systemClassLoader != null) {
             throw new IllegalStateException(
@@ -665,7 +666,7 @@
                             + " must inherit java.lang.SecurityManager");
                     }
                 }   
-                AccessController.doPrivileged(new PrivilegedExceptionAction() {
+                AccessController.doPrivileged(new PrivilegedExceptionAction<Object>()
{
                     public Object run() throws Exception {
                         System.setSecurityManager(smClass.newInstance());
                         return null;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Object.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Object.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Object.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Object.java
Mon Apr 23 07:27:54 2007
@@ -27,10 +27,6 @@
  */
 public class Object {
 
-    private static final int TM_ERROR_NONE = 0;
-    private static final int TM_ERROR_INTERRUPT = 52;
-    private static final int TM_ERROR_ILLEGAL_STATE = 118;
-    
 	public final Class<? extends Object> getClass() {
 		return VMClassRegistry.getClass(this);
 	}
@@ -108,4 +104,5 @@
 
 	protected void finalize() throws Throwable {
 	}
-}
\ No newline at end of file
+
+}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Package.java
Mon Apr 23 07:27:54 2007
@@ -70,6 +70,7 @@
 	 *  @com.intel.drl.spec_ref
 	 * 
 	 **/
+    @SuppressWarnings("unchecked")
     public <A extends Annotation> A getAnnotation(Class<A> annotationClass) {
 		if(annotationClass == null) {
 			throw new NullPointerException();

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Runtime.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Runtime.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Runtime.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Runtime.java
Mon Apr 23 07:27:54 2007
@@ -380,7 +380,7 @@
      */
     private static Runtime thisApplicationRuntime = new Runtime(); 
 
-    private static ArrayList hooksList = new ArrayList();
+    private static ArrayList<Thread> hooksList = new ArrayList<Thread>();
     
     /**
      * 0 - normal work
@@ -412,14 +412,14 @@
             try {
                 // Phase1: Execute all registered hooks.
                 VMState = 1;
-                for (int i = 0; i < hooksList.size(); i++) {
-                    ((Thread)hooksList.get(i)).start();
+                for (Thread hook : hooksList) {
+                    hook.start();
                 }
-                
-                for (int i = 0; i < hooksList.size(); i++) {
+               
+                for (Thread hook : hooksList) {
                     while (true){
                         try {
-                            ((Thread)hooksList.get(i)).join();
+                            hook.join();
                             break;
                         } catch (InterruptedException e) {
                             continue;
@@ -483,10 +483,10 @@
             throw new IllegalStateException();
         }
         synchronized (hooksList) {
-            if (hooksList.contains((Object) hook)) {
+            if (hooksList.contains(hook)) {
                 throw new IllegalArgumentException();
             }
-            hooksList.add((Object) hook);
+            hooksList.add(hook);
         }
     }
 
@@ -506,7 +506,7 @@
             throw new IllegalStateException();
         }
         synchronized (hooksList) {
-            return hooksList.remove((Object) hook);
+            return hooksList.remove(hook);
         }
     }
 
@@ -765,7 +765,7 @@
             //String[] paths = allPaths.split(pathSeparator);
             String[] paths;
             {
-                java.util.ArrayList res = new java.util.ArrayList();
+                ArrayList<String> res = new ArrayList<String>();
                 int curPos = 0;
                 int l = pathSeparator.length();
                 int i = allPaths.indexOf(pathSeparator);
@@ -822,5 +822,4 @@
         //XXX: return new BufferedOutputStream( (OutputStream) (Object) new OutputStreamWriter(
out ) );
         return out;
     }
-
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
Mon Apr 23 07:27:54 2007
@@ -28,7 +28,7 @@
 import java.util.Map;
 
 import org.apache.harmony.lang.RuntimePermissionCollection;
-import org.apache.harmony.fortress.security.SecurityUtils;
+import org.apache.harmony.security.fortress.SecurityUtils;
 import org.apache.harmony.vm.VMStack;
 
 /**
@@ -966,14 +966,6 @@
         }
     }
 
-    /**
-     * Associate current thread object with native thread structure.
-     */
-    private void initNativeThread() {
-        
-    }
-
-    
     /**
      * Initializes local values represented by
      * <code>InheritableThreadLocal</code> objects having local values for the

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadWeakRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadWeakRef.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadWeakRef.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/ThreadWeakRef.java
Mon Apr 23 07:27:54 2007
@@ -22,13 +22,13 @@
 import java.lang.ref.WeakReference;
 import java.lang.ref.ReferenceQueue;
 
-class ThreadWeakRef extends WeakReference {
+class ThreadWeakRef extends WeakReference<Thread> {
     
-    private static ReferenceQueue refQueue = new ReferenceQueue();
+    private static ReferenceQueue<Thread> refQueue = new ReferenceQueue<Thread>();
     private long nativeAddr = 0;
     
     public ThreadWeakRef(Thread thread) {
-        super (thread, ThreadWeakRef.refQueue);
+        super(thread, ThreadWeakRef.refQueue);
     }
 
     public void setNativeAddr(long newAddr) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMExecutionEngine.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMExecutionEngine.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMExecutionEngine.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMExecutionEngine.java
Mon Apr 23 07:27:54 2007
@@ -20,7 +20,6 @@
  */
 package java.lang;
 
-import java.util.Map;
 import java.util.Properties;
 import java.util.Vector;
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMStart.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMStart.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMStart.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/VMStart.java
Mon Apr 23 07:27:54 2007
@@ -21,11 +21,6 @@
 
 package java.lang;
 
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Modifier;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.Properties;
 import java.util.Enumeration;
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Constructor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Constructor.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Constructor.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Constructor.java
Mon Apr 23 07:27:54 2007
@@ -90,14 +90,14 @@
     /**
     *  @com.intel.drl.spec_ref
     */
+    @SuppressWarnings("unchecked")
     public <A extends Annotation> A getAnnotation(Class<A> annotationClass) {
         if(annotationClass == null) {
             throw new NullPointerException();
         }
-        Annotation aa[] = data.getDeclaredAnnotations();
-        for (int i = 0; i < aa.length; i++) {
-            if(aa[i].annotationType() == annotationClass) {
-                return (A) aa[i];
+        for (Annotation a : data.getDeclaredAnnotations()) {
+            if (a.annotationType() == annotationClass) {
+                return (A) a; // warning here, but it's known its type is A
             }
         }
         return null;
@@ -278,6 +278,7 @@
     /**
      * @com.intel.drl.spec_ref 
      */
+    @SuppressWarnings("unchecked")
     public T newInstance(Object... args) throws InstantiationException,
         IllegalAccessException, IllegalArgumentException,
         InvocationTargetException {
@@ -576,6 +577,7 @@
         /**
          * initializes type parameters
          */
+        @SuppressWarnings("unchecked")
 		public synchronized void initTypeParameters() {
 			//So, here it can be only TypeVariable elements.
             if (typeParameters == null) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Field.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Field.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Field.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Field.java
Mon Apr 23 07:27:54 2007
@@ -65,14 +65,14 @@
     /**
     *  @com.intel.drl.spec_ref
     */
+    @SuppressWarnings("unchecked")
     public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
         if(annotationClass == null) {
             throw new NullPointerException();
         }
-        Annotation aa[] = data.getAnnotations();
-        for (int i = 0; i < aa.length; i++) {
-            if(aa[i].annotationType() == annotationClass) {
-                return (T) aa[i];
+        for (Annotation aa : data.getAnnotations()) {
+            if(aa.annotationType() == annotationClass) {
+                return (T) aa;
             }
         }
         return null;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Method.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Method.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Method.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/reflect/Method.java
Mon Apr 23 07:27:54 2007
@@ -98,14 +98,15 @@
     /**
     *  @com.intel.drl.spec_ref
     */
+    @SuppressWarnings("unchecked")
     public <A extends Annotation> A getAnnotation(Class<A> annotationClass) {
         if(annotationClass == null) {
             throw new NullPointerException();
         }
-        Annotation aa[] = data.getDeclaredAnnotations();
-        for (int i = 0; i < aa.length; i++) {
-            if(aa[i].annotationType() == annotationClass) {
-                return (A) aa[i];
+        for (Annotation aa : data.getDeclaredAnnotations()) {
+            if(aa.annotationType() == annotationClass) {
+
+                return (A) aa;
             }
         }
         return null;
@@ -679,6 +680,7 @@
         /**
          * initializes type parameters
          */
+        @SuppressWarnings("unchecked")
         public synchronized void initTypeParameters() {
             // So, here it can be only TypeVariable elements.
             if (typeParameters == null) {
@@ -709,5 +711,4 @@
             }
         }
     }
-
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessControlContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessControlContext.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessControlContext.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessControlContext.java
Mon Apr 23 07:27:54 2007
@@ -22,7 +22,7 @@
 package java.security;
 
 import java.util.ArrayList;
-import org.apache.harmony.fortress.security.PolicyUtils;
+import org.apache.harmony.security.fortress.PolicyUtils;
 
 /**
  * @com.intel.drl.spec_ref 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessController.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessController.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessController.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/security/AccessController.java
Mon Apr 23 07:27:54 2007
@@ -20,7 +20,7 @@
 import java.util.ArrayList;
 import java.util.WeakHashMap;
 
-import org.apache.harmony.fortress.security.SecurityUtils;
+import org.apache.harmony.security.fortress.SecurityUtils;
 
 /**
  * @com.intel.drl.spec_ref

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/drlvm/VMHelperFastPath.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/drlvm/VMHelperFastPath.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/drlvm/VMHelperFastPath.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/drlvm/VMHelperFastPath.java
Mon Apr 23 07:27:54 2007
@@ -35,7 +35,6 @@
     private static final int CLASS_INF_TABLE_1_OFFSET = getVtableIntfTableOffset(1);
     private static final int CLASS_INF_TYPE_2_OFFSET  = getVtableIntfTypeOffset(2);
     private static final int CLASS_INF_TABLE_2_OFFSET = getVtableIntfTableOffset(2);
-    private static final int CLASS_DEPTH_OFFSET = getClassDepthOffset();
 
     private VMHelperFastPath() {}
 
@@ -178,5 +177,4 @@
     private static native int getVtableIntfTableOffset(int n);
     private static native int getVtableClassOffset();
     private static native int getVtableSuperclassesOffset();
-    private static native int getClassDepthOffset();
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/Reflection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/Reflection.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/Reflection.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/Reflection.java
Mon Apr 23 07:27:54 2007
@@ -36,6 +36,7 @@
         return reflectAccessor.copyConstructor(c);
     }
 
+    @SuppressWarnings("unchecked")
     public static <T> Constructor<T>[] copyConstructors(Constructor<T>[]
cs) {
         Constructor<T>[] ret = new Constructor[cs.length];
         for (int i = 0; i < cs.length; i++) {
@@ -81,5 +82,4 @@
             Method[] superPublic, Method[][] intf, int estimate) {
         return reflectAccessor.mergePublicMethods(declared, superPublic, intf, estimate);
     }
-
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParser.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParser.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParser.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParser.java
Mon Apr 23 07:27:54 2007
@@ -20,22 +20,14 @@
 package org.apache.harmony.lang.reflect.parser;
 
 import java.util.ArrayList;
-import java.io.StringBufferInputStream;
-import java.io.IOException;
 import java.lang.reflect.GenericSignatureFormatError;
-import org.apache.harmony.lang.reflect.parser.*;
 
 import antlr.TokenBuffer;
 import antlr.TokenStreamException;
-import antlr.TokenStreamIOException;
-import antlr.ANTLRException;
-import antlr.LLkParser;
 import antlr.Token;
 import antlr.TokenStream;
 import antlr.RecognitionException;
 import antlr.NoViableAltException;
-import antlr.MismatchedTokenException;
-import antlr.SemanticException;
 import antlr.ParserSharedInputState;
 import antlr.collections.impl.BitSet;
 
@@ -111,7 +103,6 @@
 
 private String CTPTsignature; // accumulated signature of the current parsered parameterized
type, it's used for parameterized types repository
 private int  sigInd;
-private int  sigLen;
 
 private InterimType/*InterimGenericType*/ highLevelType; // the rolled up reference (InterimParameterizedType
or InterimClassType)
 
@@ -120,7 +111,6 @@
 private int len;
 private PTStack p1, p2, currentStackElemCopy;
 private InterimClassType upper;
-private char t;
 //////////////////////////////////////////////////////////////////////////////////////////////////////
 private void throwGenericSignatureFormatError() throws GenericSignatureFormatError {
     
@@ -199,7 +189,7 @@
      
     // add the value to the args list of the found stack's element:
      if(p2.args == null) {
-        p2.args = new ArrayList();
+        p2.args = new ArrayList<InterimType>();
     }
     p2.args.add(ref);
                                                                                         
@@ -457,7 +447,6 @@
 		// to be reenterable:
 		CTPTsignature = null;
 		sigInd = 0;
-		sigLen = 0;
 		currentStackElem = stack;
 		genParamList = null;
 		boundList = null;
@@ -1031,7 +1020,6 @@
 				if (CTPTsignature != null) {
 				CTPTsignature = null;
 				sigInd = 0;
-				sigLen = 0;
 				}
 				
 				// clean the current stack's element to be ready for new reference parsering:
@@ -2032,14 +2020,12 @@
 	
 	public final void pr__C_P_AND_R_T() throws RecognitionException, TokenStreamException {
 		
-		Token  m557 = null;
-		
 		try {      // for error handling
 			pr__METHOD_PARAMETERS();
 			if ( inputState.guessing==0 ) {
 				prntSS("   ### 241:", "m556.getText()");
 			}
-			m557 = LT(1);
+			LT(1);
 			match(VOIDTYPE);
 			if ( inputState.guessing==0 ) {
 				
@@ -2091,14 +2077,12 @@
 	
 	public final void pr__F_T_P_AND_C_P_AND_R_T() throws RecognitionException, TokenStreamException
{
 		
-		Token  m559 = null;
-		
 		try {      // for error handling
 			pr__F_T_P_AND_M_P();
 			if ( inputState.guessing==0 ) {
 				prntSS("   ### 29:", "m558.getText()");
 			}
-			m559 = LT(1);
+			LT(1);
 			match(VOIDTYPE);
 			if ( inputState.guessing==0 ) {
 				
@@ -2716,5 +2700,5 @@
 		return data;
 	}
 	public static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17());
-	
+
 	}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParserTokenTypes.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParserTokenTypes.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParserTokenTypes.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/parser/SignatureParserTokenTypes.java
Mon Apr 23 07:27:54 2007
@@ -19,12 +19,6 @@
 
 package org.apache.harmony.lang.reflect.parser;
 
-import java.util.ArrayList;
-import java.io.StringBufferInputStream;
-import java.io.IOException;
-import java.lang.reflect.GenericSignatureFormatError;
-import org.apache.harmony.lang.reflect.parser.*;
-
 /**
  * @author Serguei S. Zapreyev
  * @version $Revision: 1.1.2.1 $

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/ParameterizedTypeRepository.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/ParameterizedTypeRepository.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/ParameterizedTypeRepository.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/ParameterizedTypeRepository.java
Mon Apr 23 07:27:54 2007
@@ -17,9 +17,6 @@
 package org.apache.harmony.lang.reflect.repository;
 
 import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Constructor;
 
 import org.apache.harmony.lang.reflect.parser.*;
 import org.apache.harmony.lang.reflect.support.AuxiliaryFinder;
@@ -296,4 +293,4 @@
 	public static void registerParameterizedType(ParameterizedType parameterizedType, InterimParameterizedType
prsrdParameterizedType, String signature, Object startPoint) {
 		ParameterizedTypeCache.insertParameterizedType(parameterizedType, prsrdParameterizedType,
signature, startPoint, -1);		
 	}
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/TypeVariableRepository.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/TypeVariableRepository.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/TypeVariableRepository.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/TypeVariableRepository.java
Mon Apr 23 07:27:54 2007
@@ -17,9 +17,6 @@
 package org.apache.harmony.lang.reflect.repository;
 
 import java.lang.reflect.TypeVariable;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Constructor;
 import java.lang.reflect.GenericDeclaration;
 
 /**
@@ -221,4 +218,4 @@
 	public static void registerTypeVariable(TypeVariable typeVariable, String typeVariableName,
Object startPoint) {
 		TypeVariableCache.insertTypeVariable(typeVariable, -1);		
 	}
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/WildcardTypeRepository.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/WildcardTypeRepository.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/WildcardTypeRepository.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/repository/WildcardTypeRepository.java
Mon Apr 23 07:27:54 2007
@@ -17,9 +17,6 @@
 package org.apache.harmony.lang.reflect.repository;
 
 import java.lang.reflect.WildcardType;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Constructor;
 
 import org.apache.harmony.lang.reflect.parser.*;
 
@@ -281,4 +278,4 @@
 	public static void registerWildcardType(WildcardType wildcard, InterimWildcardType prsrdWildcardType,
String signature, Object startPoint) {
 		WildcardTypeCache.insertWildcardType(wildcard, prsrdWildcardType, signature, startPoint,
-1);		
 	}
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryCreator.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryCreator.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryCreator.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryCreator.java
Mon Apr 23 07:27:54 2007
@@ -17,7 +17,6 @@
 package org.apache.harmony.lang.reflect.support;
 
 import java.lang.reflect.Type;
-import java.lang.reflect.GenericDeclaration;
 import java.lang.TypeNotPresentException;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.WildcardType;
@@ -57,7 +56,7 @@
             ParameterizedType pType = ParameterizedTypeRepository.findParameterizedType((InterimParameterizedType)
nextLayer, startPoint);
             if (pType == null) {
                 try {
-                Class genClassDecl = AuxiliaryFinder.findGenericClassDeclarationForParameterizedType((InterimParameterizedType)
nextLayer, startPoint);
+                AuxiliaryFinder.findGenericClassDeclarationForParameterizedType((InterimParameterizedType)
nextLayer, startPoint);
                 } catch(Throwable e) {
                     throw new TypeNotPresentException(((InterimParameterizedType) nextLayer).rawType.classTypeName.substring(1).replace('/',
'.'), e);
                 }
@@ -113,7 +112,7 @@
             ParameterizedType pType = ParameterizedTypeRepository.findParameterizedType((InterimParameterizedType)
nextppType, startPoint);
             if (pType == null) {
                 try {
-                    Class genClassDecl = AuxiliaryFinder.findGenericClassDeclarationForParameterizedType((InterimParameterizedType)
nextppType, startPoint);
+                    AuxiliaryFinder.findGenericClassDeclarationForParameterizedType((InterimParameterizedType)
nextppType, startPoint);
                 } catch(Throwable e) {
                     throw new TypeNotPresentException(((InterimParameterizedType) nextppType).rawType.classTypeName.substring(1).replace('/',
'.'), e);
                 }
@@ -158,7 +157,7 @@
                 ParameterizedType cType = ParameterizedTypeRepository.findParameterizedType((InterimParameterizedType)
pType, startPoint);
                 if (cType == null) {
                     try {
-                        Class genClassDecl = AuxiliaryFinder.findGenericClassDeclarationForParameterizedType((InterimParameterizedType)
pType, startPoint);
+                        AuxiliaryFinder.findGenericClassDeclarationForParameterizedType((InterimParameterizedType)
pType, startPoint);
                     } catch(Throwable e) {
                         throw new TypeNotPresentException(((InterimParameterizedType) pType).rawType.classTypeName.substring(1).replace('/',
'.'), e);
                     }
@@ -219,4 +218,4 @@
         }
         return res;
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryFinder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryFinder.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryFinder.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryFinder.java
Mon Apr 23 07:27:54 2007
@@ -23,7 +23,6 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.TypeVariable;
 import org.apache.harmony.lang.reflect.parser.InterimParameterizedType;
-import org.apache.harmony.lang.reflect.parser.InterimGenericType;
 import org.apache.harmony.lang.reflect.repository.TypeVariableRepository;
 
 import org.apache.harmony.lang.reflect.parser.*;
@@ -376,7 +375,6 @@
                 return res + transform(ini.substring(ind+12));
             } else { // range 0x10000 - 0x10FFFF (high-surrogates range = 0xd800-0xdbff;
low-surrogates range = 0xdc00-0xdfff; ) , for example: \0ed\0a0\0b5\0ed\0be\0af
                 di3 = ini.substring(ind+10, ind+10+2); // to ommit the following \0
-                String di4 = ini.substring(ind+14, ind+14+2); // to ommit the following \0
                 String di5 = ini.substring(ind+18, ind+18+2); // to ommit the following \0
                 String di6 = ini.substring(ind+22, ind+22+2); // to ommit the following \0
                 res = res + new String(new char[]{(char)((((Integer.parseInt(di2, 16)&0xf)
+ ((Integer.parseInt(di2, 16)&0xf)!=0?1:0))<<16)+((Integer.parseInt(di3, 16)&0x3f)<<10)+((Integer.parseInt(di5,
16)&0xf)<<6)+(Integer.parseInt(di6, 16)&0x3f))});
@@ -440,4 +438,4 @@
             return klass;
         }    
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryLoader.java?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryLoader.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/lang/reflect/support/AuxiliaryLoader.java
Mon Apr 23 07:27:54 2007
@@ -32,7 +32,7 @@
 public final class AuxiliaryLoader extends ClassLoader {
     public static final AuxiliaryLoader ersatzLoader = new AuxiliaryLoader();
 
-    public Class findClass(final String classTypeName)
+    public Class<?> findClass(final String classTypeName)
             throws ClassNotFoundException {
         if (classTypeName.equals("byte")) {
             return byte.class;
@@ -55,17 +55,16 @@
         }
         ClassLoader cl = this.getClass().getClassLoader();
         if (cl == null) {
-            cl = AuxiliaryLoader.this.getSystemClassLoader();
+            cl = ClassLoader.getSystemClassLoader();
         }
         try {
             return cl.loadClass(classTypeName);
         } catch (Throwable _) {
             Class c = (Class) AccessController
-                    .doPrivileged(new java.security.PrivilegedAction() {
+                    .doPrivileged(new java.security.PrivilegedAction<Object>() {
                         public Object run() {
                             // based on an empiric knowledge
-                            ClassLoader cl = AuxiliaryLoader.this
-                                    .getSystemClassLoader();
+                            ClassLoader cl = ClassLoader.getSystemClassLoader();
                             try {
                                 java.lang.reflect.Method[] ms = cl.getClass()
                                         .getDeclaredMethods();
@@ -123,11 +122,11 @@
     }
 
     public void resolve(final Class c) {
-        AccessController.doPrivileged(new java.security.PrivilegedAction() {
+        AccessController.doPrivileged(new java.security.PrivilegedAction<Object>()
{
             public Object run() {
                 ClassLoader cl = AuxiliaryLoader.this.getClass().getClassLoader();
                 if (cl == null) {
-                    cl = AuxiliaryLoader.this.getSystemClassLoader();
+                    cl = ClassLoader.getSystemClassLoader();
                 }
                 try {
                     java.lang.reflect.Method[] ms = cl.getClass()
@@ -148,4 +147,4 @@
             }
         });
     }
-}
\ No newline at end of file
+}

Copied: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/security/fortress/SecurityUtils.java
(from r531372, harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/fortress/security/SecurityUtils.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/security/fortress/SecurityUtils.java?view=diff&rev=531480&p1=harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/fortress/security/SecurityUtils.java&r1=531372&p2=harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/security/fortress/SecurityUtils.java&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/fortress/security/SecurityUtils.java
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/org/apache/harmony/security/fortress/SecurityUtils.java
Mon Apr 23 07:27:54 2007
@@ -19,22 +19,15 @@
 * @version $Revision: 1.1.6.3 $
 */
 
-package org.apache.harmony.fortress.security;
+package org.apache.harmony.security.fortress;
 
 import java.security.AccessControlContext;
 import java.util.WeakHashMap;
 
-//FIXME: move this class under umbrella of protected packages -
-// see lib/java.security: property 'package.access',
-// so only trusted classes like Thread and AccessController will
-// have an access to this class. 
-// This is to remove dependency on VMStack, to reduce number 
-// of VM2API-dependent classes.
-
 /**
  * The class is used to perform an exchange of information between 
  * java.lang.Thread and java.security.AccessController.<br>
- * The data to excnahge is inherited contexts for the Thread-s.  
+ * The data to excnahge is inherited contexts for the Thread-s.
  * 
  */
 public final class SecurityUtils {
@@ -42,7 +35,7 @@
     // A map used to store inherited contexts.<br>
     // A thread is used as a key for the map and AccessControlContext 
     // passed to the putContext is used as a value.
-    private static WeakHashMap<Thread, AccessControlContext> map = 
+    private static final WeakHashMap<Thread, AccessControlContext> ACC_CACHE = 
         new WeakHashMap<Thread, AccessControlContext>();
 
     /**
@@ -73,17 +66,17 @@
         if (thread == null) {
             throw new NullPointerException("thread can not be null");
         }
-        synchronized (map) {
-            if (map.containsKey(thread)) {
+        synchronized (ACC_CACHE) {
+            if (ACC_CACHE.containsKey(thread)) {
                 throw new SecurityException("You can not modify this map.");
             }
             if (context == null) {
                 // this only allowed once - for the very first thread.
-                if (map.containsValue(null)) {
+                if (ACC_CACHE.containsValue(null)) {
                     throw new Error("null context may be stored only once.");
                 }
             }
-            map.put(thread, context);
+            ACC_CACHE.put(thread, context);
         }
     }
 
@@ -105,8 +98,8 @@
          }
          */
 
-        synchronized (map) {
-            return map.get(thread);
+        synchronized (ACC_CACHE) {
+            return ACC_CACHE.get(thread);
         }
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.cpp?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.cpp
Mon Apr 23 07:27:54 2007
@@ -66,9 +66,3 @@
 {
     return static_cast<jint>(reinterpret_cast<jlong>(&((VTable*)0)->superclasses));
 }
-
-
-JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_VMHelperFastPath_getClassDepthOffset(JNIEnv
*, jclass)
-{
-    return (jint)Class::get_offset_of_depth();
-}

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.h?view=diff&rev=531480&r1=531479&r2=531480
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.h
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelperFastPath.h
Mon Apr 23 07:27:54 2007
@@ -68,15 +68,6 @@
 JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_VMHelperFastPath_getVtableSuperclassesOffset
   (JNIEnv *, jclass);
 
-/*
- * Class:     org_apache_harmony_drlvm_VMHelperFastPath
- * Method:    getClassDepthOffset
- * Signature: ()I
- */
-JNIEXPORT jint JNICALL Java_org_apache_harmony_drlvm_VMHelperFastPath_getClassDepthOffset
-  (JNIEnv *, jclass);
-
-
 #ifdef __cplusplus
 }
 #endif



Mime
View raw message