commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1767112 - /commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MemorySensitiveClassPathRepository.java
Date Sat, 29 Oct 2016 16:24:05 GMT
Author: dbrosius
Date: Sat Oct 29 16:24:05 2016
New Revision: 1767112

URL: http://svn.apache.org/viewvc?rev=1767112&view=rev
Log:
follow BCEL's field naming pattern

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MemorySensitiveClassPathRepository.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MemorySensitiveClassPathRepository.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MemorySensitiveClassPathRepository.java?rev=1767112&r1=1767111&r2=1767112&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MemorySensitiveClassPathRepository.java
(original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/MemorySensitiveClassPathRepository.java
Sat Oct 29 16:24:05 2016
@@ -35,11 +35,11 @@ import org.apache.bcel.classfile.JavaCla
  */
 public class MemorySensitiveClassPathRepository implements Repository {
 
-    private ClassPath path = null;
-    private final Map<String, SoftReference<JavaClass>> loadedClasses = new HashMap<>();
// CLASSNAME X JAVACLASS
+    private ClassPath _path = null;
+    private final Map<String, SoftReference<JavaClass>> _loadedClasses = new
HashMap<>(); // CLASSNAME X JAVACLASS
 
     public MemorySensitiveClassPathRepository(final ClassPath path) {
-        this.path = path;
+        this._path = path;
     }
 
     /**
@@ -47,7 +47,7 @@ public class MemorySensitiveClassPathRep
      */
     @Override
     public void storeClass(final JavaClass clazz) {
-        loadedClasses.put(clazz.getClassName(), new SoftReference<>(clazz));
+        _loadedClasses.put(clazz.getClassName(), new SoftReference<>(clazz));
         clazz.setRepository(this);
     }
 
@@ -56,7 +56,7 @@ public class MemorySensitiveClassPathRep
      */
     @Override
     public void removeClass(final JavaClass clazz) {
-        loadedClasses.remove(clazz.getClassName());
+        _loadedClasses.remove(clazz.getClassName());
     }
 
     /**
@@ -64,7 +64,7 @@ public class MemorySensitiveClassPathRep
      */
     @Override
     public JavaClass findClass(final String className) {
-        final SoftReference<JavaClass> ref = loadedClasses.get(className);
+        final SoftReference<JavaClass> ref = _loadedClasses.get(className);
         if (ref == null) {
             return null;
         }
@@ -92,7 +92,7 @@ public class MemorySensitiveClassPathRep
             return clazz;
         }
         try {
-            return loadClass(path.getInputStream(className), className);
+            return loadClass(_path.getInputStream(className), className);
         } catch (final IOException e) {
             throw new ClassNotFoundException("Exception while looking for class " + className
+ ": " + e, e);
         }
@@ -158,7 +158,7 @@ public class MemorySensitiveClassPathRep
      */
     @Override
     public ClassPath getClassPath() {
-        return path;
+        return _path;
     }
 
     /**
@@ -166,6 +166,6 @@ public class MemorySensitiveClassPathRep
      */
     @Override
     public void clear() {
-        loadedClasses.clear();
+        _loadedClasses.clear();
     }
 }



Mime
View raw message