History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-5513
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Bas Leijdekkers
Reporter: Dmitry Jemerov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

"Inner class may be static" false positive

Created: 07 Apr 06 18:17   Updated: 07 Apr 06 19:21
Component/s: Code Analysis. Inspection
Fix Version/s: Demetra 5231

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Fixed in build: 4,195


 Description  « Hide
public class AsmCodeGenerator {
  private static class FirstPassClassVisitor extends ClassAdapter {
    private boolean myExplicitSetupCall = false;

    public FirstPassClassVisitor() {
      super(new EmptyVisitor());
    }

    public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
      if (name.equals(CONSTRUCTOR_NAME)) {
        final FirstPassConstructorVisitor visitor = new FirstPassConstructorVisitor();
        return visitor;
      }
      return null;
    }

    public boolean isExplicitSetupCall() {
      return myExplicitSetupCall;
    }

    private class FirstPassConstructorVisitor extends MethodAdapter { <<<< error here
      public FirstPassConstructorVisitor() {
        super(new EmptyVisitor());
      }

      public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) {
        if (name.equals(SETUP_METHOD_NAME)) {
          myExplicitSetupCall = true;
        }
      }
    }
  }
}


 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.