overrides the visitor to check for java class version being as good or better than 1.4

@param classContext
the context object that holds the JavaClass parsed
499333
@Override
    public void visitClassContext(ClassContext classContext) {
        // TODO: Look at method calls in a finally block to see if they throw
        // exceptions
        // : and those exceptions are not caught in the finally block
        // : Only do it if effort is on, ie: boolean fullAnalysis =
        // AnalysisContext.currentAnalysisContext().getBoolProperty(FindBugsAnalysisFeatures.INTERPROCEDURAL_ANALYSIS_OF_REFERENCED_CLASSES);

        try {
            int majorVersion = classContext.getJavaClass().getMajor();
            if (majorVersion >= Const.MAJOR_1_4) {
                fbInfo = new ArrayList<>();
                super.visitClassContext(classContext);
            }
        } finally {
            fbInfo = null;
        }
    }
508089
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            changedAttributes = new HashMap<>();
            savedAttributes = new HashMap<>();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            changedAttributes = null;
            savedAttributes = null;
        }
    }
81866
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            if ((jcomponentClass != null) && (accessibleClass != null)) {
                JavaClass cls = classContext.getJavaClass();
                if (cls.instanceOf(jcomponentClass) && !cls.implementationOf(accessibleClass)) {
                    bugReporter.reportBug(new BugInstance(this, BugType.S508C_NON_ACCESSIBLE_JCOMPONENT.name(), NORMAL_PRIORITY).addClass(cls));
                }
            }

            stack = new OpcodeStack();
            fieldLabels = new HashSet<>();
            localLabels = new HashMap<>();
            super.visitClassContext(classContext);
            for (XField fa : fieldLabels) {
                bugReporter.reportBug(new BugInstance(this, BugType.S508C_NO_SETLABELFOR.name(), NORMAL_PRIORITY).addClass(this).addField(fa));
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            stack = null;
            fieldLabels = null;
            localLabels = null;
        }
    }
21050
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            if ((throwableClass != null) && !isPre14Class(classContext.getJavaClass())) {
                stack = new OpcodeStack();
                catchInfos = new HashSet<>();
                exReg = new HashMap<>();
                super.visitClassContext(classContext);
            }
        } finally {
            stack = null;
            catchInfos = null;
            exceptions = null;
            exReg = null;
        }
    }
440266
protected void setupClasspathJarResourceIfNeeds(WebAppContext context) {
        if (isWarableWorld() || !isValidMetaInfConfiguration()) {
            return;
        }
        // may be local development and uses meta-inf configuration here
        final List<String> classpathList = extractJarClassspathList();
        for (String classpath : classpathList) {
            final String jarPath = convertClasspathToJarPath(classpath);
            final URL url;
            try {
                url = new URL(jarPath);
            } catch (MalformedURLException e) {
                throw new IllegalStateException("Failed to create URL from the jar path: " + jarPath, e);
            }
            context.getMetaData().addContainerResource(new JarResource(url) {
            });
        }
    }
1196145
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            if ((collectionClass != null) && (mapClass != null)) {
                collectionFields = new HashMap<>();
                aliases = new HashMap<>();
                stack = new OpcodeStack();
                JavaClass cls = classContext.getJavaClass();
                className = cls.getClassName();
                super.visitClassContext(classContext);
                for (FieldInfo fi : collectionFields.values()) {
                    if (fi.isSynchronized()) {
                        bugReporter.reportBug(new BugInstance(this, BugType.NMCS_NEEDLESS_MEMBER_COLLECTION_SYNCHRONIZATION.name(), NORMAL_PRIORITY)
                                .addClass(this).addField(fi.getFieldAnnotation()));
                    }
                }
            }
        } finally {
            collectionFields = null;
            aliases = null;
            stack = null;
        }
    }
263952
@Override
    public void visitClassContext(ClassContext classContext) {
        JavaClass cls = classContext.getJavaClass();

        if (cls.isClass() && (cls.getMajor() >= JDK15_MAJOR)) {

            Map<String, Set<String>> methodInfo = new HashMap<>();
            populateMethodInfo(cls, methodInfo);

            Method[] methods = cls.getMethods();
            for (Method m : methods) {
                String name = m.getName();
                String signature = m.getSignature();

                Set<String> sigs = methodInfo.get(name);
                if (sigs != null) {
                    for (String sig : sigs) {
                        if (confusingSignatures(sig, signature)) {
                            bugReporter.reportBug(new BugInstance(this, BugType.CAO_CONFUSING_AUTOBOXED_OVERLOADING.name(), NORMAL_PRIORITY)
                                    .addClass(cls.getClassName()).addString(name + signature).addString(name + sig));
                        }
                    }
                }
            }
        }
    }
281578
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            JavaClass cls = classContext.getJavaClass();
            constrainingMethods = buildConstrainingMethods(cls);
            AnnotationEntry[] annotations = cls.getAnnotationEntries();
            classHasAnnotation = !CollectionUtils.isEmpty(annotations);
            stack = new OpcodeStack();
            selfCallTree = new HashMap<>();
            super.visitClassContext(classContext);

            performModifyStateClosure(classContext.getJavaClass());

        } finally {
            stack = null;
            selfCallTree = null;
            curMethod = null;
            constrainingMethods = null;
        }
    }
736239
@Override
    public void visitClassContext(ClassContext classContext) {
        JavaClass jclass = classContext.getJavaClass();

        // Check to see if the class references any other classes
        // which could be resources we want to track.
        // If we don't find any such classes, we skip analyzing
        // the class. (Note: could do this by method.)
        boolean sawResourceClass = false;
        for (int i = 0; i < jclass.getConstantPool().getLength(); ++i) {
            Constant constant = jclass.getConstantPool().getConstant(i);
            String className = null;
            if (constant instanceof ConstantMethodref) {
                ConstantMethodref cmr = (ConstantMethodref) constant;

                int classIndex = cmr.getClassIndex();
                className = jclass.getConstantPool().getConstantString(classIndex, Const.CONSTANT_Class);
            } else if (constant instanceof ConstantInterfaceMethodref) {
                ConstantInterfaceMethodref cmr = (ConstantInterfaceMethodref) constant;

                int classIndex = cmr.getClassIndex();
                className = jclass.getConstantPool().getConstantString(classIndex, Const.CONSTANT_Class);
            }

            if (className != null) {
                if (DEBUG) {
                    System.out.println("FindOpenStream: saw class " + className);
                }

                for (String aPRESCREEN_CLASS_LIST : PRESCREEN_CLASS_LIST) {
                    if (className.indexOf(aPRESCREEN_CLASS_LIST) >= 0) {
                        sawResourceClass = true;
                        break;
                    }
                }
            }

        }

        if (sawResourceClass) {
            super.visitClassContext(classContext);
        }
    }
764511
public void setCompileVersion(String version) {
        if (version == null || ClassUtils.isBeforeJava6(version)) {
            JavassistCompiler javassistCompiler = new JavassistCompiler();
            javassistCompiler.setLogger(logger);
            javassistCompiler.setCodeDirectory(codeDirectory);
            compiler = javassistCompiler;
        } else {
            JdkCompiler jdkCompiler = new JdkCompiler();
            jdkCompiler.setCompileVersion(version);
            jdkCompiler.setLogger(logger);
            jdkCompiler.setCodeDirectory(codeDirectory);
            compiler = jdkCompiler;
        }
    }
530588
public static void setClassLoader( ServletContext context, ClassLoader classLoader ) {
        WebApp.get(context).setClassLoader(classLoader);
    }
518373
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            isEnum = classContext.getJavaClass().isEnum();
            stack = new OpcodeStack();
            uninitializedRegs = new BitSet();
            arrayAliases = new HashMap<>();
            storedUVs = new HashMap<>();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            uninitializedRegs = null;
            arrayAliases = null;
            storedUVs = null;
        }
    }
1367079
@Override
	public void visitClassContext(final ClassContext classContext) {
		JavaClass cls = classContext.getJavaClass();
		Field[] flds = cls.getFields();
		for (Field f : flds) {
			String sig = f.getSignature();
			if (sig.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX)) {
				if (sig.startsWith("Ljava/util/") && sig.endsWith("List;")) {
					fieldsReported.put(f.getName(), new FieldInfo());
				}
			}
		}

		if (!fieldsReported.isEmpty()) {
			super.visitClassContext(classContext);
			reportBugs();
		}
	}
1126731
@Override
	public void visitClassContext(ClassContext classContext) {
		try {
			javaClass = classContext.getJavaClass();
			if (javaClass.getMajor() >= Const.MAJOR_1_5) {
				javaClass.accept(this);
			}
		} finally {
			javaClass = null;
		}
	}
1054522
private String getVersion(final ClassLoader classLoader, final String className, final String methodName) {
    log.trace("Getting version; class-loader: {}, class-name: {}, method-name: {}",
        classLoader, className, methodName);

    try {
      Class<?> type = classLoader.loadClass(className);
      Method method = type.getMethod(methodName);
      Object result = method.invoke(null);
      if (result != null) {
        return result.toString();
      }
    }
    catch (Throwable e) {
      log.trace("Unable determine version from: {}", className);
    }

    return null;
  }
310764
public static ClassLoader getContextClassLoader() {
        ClassLoader loader = null;
        try {
            loader = Thread.currentThread().getContextClassLoader();
        } catch (Throwable e) {
        }
        if (loader == null) {
            loader = ClassUtils.class.getClassLoader();
        }
        return loader;
    }
581120
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            unusedParms = new BitSet();
            regToParm = new HashMap<>();
            stack = new OpcodeStack();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            regToParm = null;
            unusedParms.clear();
        }
    }