Skip to content

Commit

Permalink
Make ClassLoader instance variables final.
Browse files Browse the repository at this point in the history
	Change on 2015/06/24 by tball <tball@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=96807759
  • Loading branch information
tomball committed Jun 25, 2015
1 parent f7725f0 commit 352365a
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -32,7 +32,6 @@


package java.lang; package java.lang;


import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
Expand Down Expand Up @@ -74,12 +73,12 @@ public abstract class ClassLoader {
/** /**
* The parent ClassLoader. * The parent ClassLoader.
*/ */
private ClassLoader parent; private final ClassLoader parent;


/** /**
* The packages known to the class loader. * The packages known to the class loader.
*/ */
private Map<String, Package> packages = new HashMap<String, Package>(); private final Map<String, Package> packages = new HashMap<String, Package>();


/** /**
* Returns the system class loader. This is the parent for new * Returns the system class loader. This is the parent for new
Expand Down Expand Up @@ -367,11 +366,10 @@ public URL getResource(String resName) {
* @throws IOException * @throws IOException
* if an I/O error occurs. * if an I/O error occurs.
*/ */
@SuppressWarnings("unchecked")
public Enumeration<URL> getResources(String resName) throws IOException { public Enumeration<URL> getResources(String resName) throws IOException {


Enumeration first = parent.getResources(resName); Enumeration<URL> first = parent.getResources(resName);
Enumeration second = findResources(resName); Enumeration<URL> second = findResources(resName);


return new TwoEnumerationsInOne(first, second); return new TwoEnumerationsInOne(first, second);
} }
Expand Down

0 comments on commit 352365a

Please sign in to comment.