fix for 1220726
This commit is contained in:
parent
8376cd4108
commit
c977c274a7
|
|
@ -71,7 +71,7 @@ public class ClassResolver
|
|||
if (isLoadable(aName)) {
|
||||
return safeLoad(aName);
|
||||
}
|
||||
//Perhaps it's fullyqualified inner class
|
||||
//Perhaps it's fully-qualified inner class
|
||||
int dotIdx = aName.lastIndexOf(".");
|
||||
if (dotIdx != -1) {
|
||||
final String cn = aName.substring(0, dotIdx) + "$"
|
||||
|
|
@ -107,7 +107,7 @@ public class ClassResolver
|
|||
}
|
||||
|
||||
// See if in the package
|
||||
if (mPkg != null) {
|
||||
if (!"".equals(mPkg)) {
|
||||
final String fqn = mPkg + "." + aName;
|
||||
if (isLoadable(fqn)) {
|
||||
return safeLoad(fqn);
|
||||
|
|
@ -116,7 +116,7 @@ public class ClassResolver
|
|||
|
||||
//inner class of this class???
|
||||
if (!"".equals(aCurrentClass)) {
|
||||
final String innerClass = ((mPkg != null) ? (mPkg + ".") : "")
|
||||
final String innerClass = (!"".equals(mPkg) ? (mPkg + ".") : "")
|
||||
+ aCurrentClass + "$" + aName;
|
||||
if (isLoadable(innerClass)) {
|
||||
return safeLoad(innerClass);
|
||||
|
|
|
|||
|
|
@ -116,13 +116,11 @@ final class InputValidClassDefIndent6 extends java.awt.event.MouseAdapter implem
|
|||
11, 11),
|
||||
10, 10,
|
||||
10);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void myfunc2(int a, int b, int c, int d, int e, int f, int g) {
|
||||
}
|
||||
|
||||
|
||||
private int myfunc3(int a, int b, int c, int d) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ public class RedundantThrowsCheckTest
|
|||
"7:37: Redundant throws: 'java.io.FileNotFoundException' is subclass of 'java.io.IOException'.",
|
||||
"13:16: Redundant throws: 'RuntimeException' is unchecked exception.",
|
||||
"19:29: Redundant throws: 'java.io.IOException' listed more then one time.",
|
||||
// "25:16: Unable to get class information for WrongException.",
|
||||
// "35:27: Unable to get class information for WrongException.",
|
||||
"39:27: Redundant throws: 'NullPointerException' is subclass of 'RuntimeException'.",
|
||||
"39:27: Redundant throws: 'NullPointerException' is unchecked exception.",
|
||||
"39:49: Redundant throws: 'RuntimeException' is unchecked exception.",
|
||||
|
|
@ -45,8 +43,6 @@ public class RedundantThrowsCheckTest
|
|||
final String[] expected = {
|
||||
"13:16: Redundant throws: 'RuntimeException' is unchecked exception.",
|
||||
"19:29: Redundant throws: 'java.io.IOException' listed more then one time.",
|
||||
// "25:16: Unable to get class information for WrongException.",
|
||||
// "35:27: Unable to get class information for WrongException.",
|
||||
"39:27: Redundant throws: 'NullPointerException' is unchecked exception.",
|
||||
"39:49: Redundant throws: 'RuntimeException' is unchecked exception.",
|
||||
};
|
||||
|
|
@ -88,4 +84,12 @@ public class RedundantThrowsCheckTest
|
|||
final String[] expected = {};
|
||||
verify(checkConfig, getPath("javadoc/Test3.java"), expected);
|
||||
}
|
||||
|
||||
public void test_1220726() throws Exception
|
||||
{
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(RedundantThrowsCheck.class);
|
||||
final String[] expected = {};
|
||||
verify(checkConfig, getPath("javadoc/BadCls.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
<li>Applied patch 1079192 (thanks to Dave Brosius)</li>
|
||||
|
||||
<li>One more bug fixed in type aware checks (RedundantThrows
|
||||
and JavadocMethod checks) (bug 1168408)</li>
|
||||
<li>Two more bugs fixed in type aware checks (RedundantThrows
|
||||
and JavadocMethod checks) (bug 1168408 and 1220726)</li>
|
||||
|
||||
<li>Applied patch 1045127 (thanks to Paul Constantinides)</li>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue