Fix for 925263 (Redundant throws, exceptions as nested classes)
This commit is contained in:
parent
5b07a9df8a
commit
e5f09c7fd2
|
|
@ -213,6 +213,9 @@
|
|||
all previous versions of the configuration DTD locally, without
|
||||
accessing the internet (bug 909987).</li>
|
||||
|
||||
<li class="body">Fixed handling of imports for inner classes
|
||||
in RedundantThrows (bug 925263)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="body">
|
||||
|
|
|
|||
|
|
@ -74,8 +74,20 @@ public class ClassResolver
|
|||
Iterator it = mImports.iterator();
|
||||
while (it.hasNext()) {
|
||||
final String imp = (String) it.next();
|
||||
if (imp.endsWith(aName) && isLoadable(imp)) {
|
||||
return safeLoad(imp);
|
||||
if (imp.endsWith(aName)) {
|
||||
if (isLoadable(imp)) {
|
||||
return safeLoad(imp);
|
||||
}
|
||||
// perhaps this is a import for inner class
|
||||
// let's try load it.
|
||||
int dot = imp.lastIndexOf(".");
|
||||
if (dot != -1) {
|
||||
final String innerName = imp.substring(0, dot) + "$"
|
||||
+ imp.substring(dot + 1);
|
||||
if (isLoadable(innerName)) {
|
||||
return safeLoad(innerName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue