diff options
author | nickl- <github@jigsoft.co.za> | 2017-10-30 20:37:23 +0200 |
---|---|---|
committer | nickl- <github@jigsoft.co.za> | 2017-10-30 20:37:23 +0200 |
commit | 62851d0af30cdb0c54046627585451a468aacd2a (patch) | |
tree | fd7632ac39246a9598cb5bf6176c4bf0bcb21744 /src/main/javassist/URLClassPath.java | |
parent | 45b4c55361eef93542db8014e3ef8941169c97bd (diff) | |
download | javassist-62851d0af30cdb0c54046627585451a468aacd2a.tar.gz javassist-62851d0af30cdb0c54046627585451a468aacd2a.zip |
Source walk/Spring clean/Parameterize/Enhance et.al.
The following were applied during multiple itterations through the source.
* Parameterize raw types.
* Mark unused members.
* Annotate override and deprecated methods.
* Convert loops to enhance for loop.
* Remove redundant else statements.
* Widening collection type references.
* Optimize code for improved readability.
* Squash compiler warnings.
* Identify smells.
Diffstat (limited to 'src/main/javassist/URLClassPath.java')
-rw-r--r-- | src/main/javassist/URLClassPath.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/javassist/URLClassPath.java b/src/main/javassist/URLClassPath.java index bea0b3c2..5f54c396 100644 --- a/src/main/javassist/URLClassPath.java +++ b/src/main/javassist/URLClassPath.java @@ -65,6 +65,7 @@ public class URLClassPath implements ClassPath { this.packageName = packageName; } + @Override public String toString() { return hostname + ":" + port + directory; } @@ -74,6 +75,7 @@ public class URLClassPath implements ClassPath { * * @return null if the class file could not be found. */ + @Override public InputStream openClassfile(String classname) { try { URLConnection con = openClassfile0(classname); @@ -90,8 +92,7 @@ public class URLClassPath implements ClassPath { = directory + classname.replace('.', '/') + ".class"; return fetchClass0(hostname, port, jarname); } - else - return null; // not found + return null; // not found } /** @@ -99,6 +100,7 @@ public class URLClassPath implements ClassPath { * * @return null if the class file could not be obtained. */ + @Override public URL find(String classname) { try { URLConnection con = openClassfile0(classname); @@ -115,6 +117,7 @@ public class URLClassPath implements ClassPath { /** * Closes this class path. */ + @Override public void close() {} /** |