Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.14.3
-
any
-
Patch, Important
Description
The problem appears in version 2.3.14.3 and in revision 1493157. I
attached a two-line patch (patch.diff) that fixes it.
In method "PackageBasedActionConfigBuilder.checkPackageLocators", the
loop over "packageLocators" should only be executed when
"classPackageName.length() > 0" is "true", because the loop's only
side effect (the "return true;" statement) cannot be executed when
"classPackageName.length() > 0" is "false". Note that
"classPackageName" is not modified inside the loop.
In fact, the loop over "packageLocators" should be executed only when
the condition of the loop's "if":
if (classPackageName.length() > 0 && (packageLocatorsBasePackage == null || classPackageName .startsWith(packageLocatorsBasePackage)))
is "true", because the loop's only side effect (the "return true;"
statement) cannot be executed when this condition is false. Also, the
elements inside this condition are not modified inside the loop. I
attached a second patch (patchFull.diff) that implements this complete
solution.