walkmod / walkmod-pmd-plugin

Walkmod plugin to fix the code according the PMD rules
2 stars 2 forks source link

Merging if conditions looses inner statement #2

Closed cal101 closed 7 years ago

cal101 commented 7 years ago
     protected AdminManagingCommand getAdminManaging() {
         AdminManagingCommand ret = (AdminManagingCommand) (ctx.getCommandController().getCommand(AdminManagingCommand.NAME));
-        if (ret == null) {
-            if (log.isDebugEnabled()) {
-                log.debug("Command AdminManagingCommand was not loaded. If you need to debug the AdminServer please load AdminManagingCommand in AdminConfig.prop.");
-            }
+        if ((ret == null) && log.isDebugEnabled()) {
         }
         return ret;
rpau commented 7 years ago

Ok, I will create a test for it.

rpau commented 7 years ago

Same than issue #3 @cal101 , just to be sure. Have you replaced javalang in the .ivy folder instead of using the last one from maven repository?

cal101 commented 7 years ago

Yes, I think so because I am doing it via a shell script. But let me try to make real test cases in the evening.

rpau commented 7 years ago

Cal, you were right. I have fixed it, in this commit : 4d2c291c0d9eba4c1791ae6d81e084545a17498e