Deprecated API
Contents
-
ClassDescriptionThis class is not necessary to realize multi-thread model in SpotBugs 4.0. Each detector instance will not run on multiple threads, then only database (or other classes shared by detectors) needs synchronization and they can use normal Java synchronization instead.AnnotationDatabases are being phased out, since annotations are now stored directly in the XClass/XMethod/XField objects. Resolving nullness annotations will be handled through the JSR-305 type qualifier code.The annotation based approach is useless for lambdas. Write expectations using
edu.umd.cs.findbugs.test.matcher.BugInstanceMatcher
matchers in test source directoryAnnotationDatabases are being phased out, since annotations are now stored directly in the XClass/XMethod/XField objects. Resolving nullness annotations will be handled through the JSR-305 type qualifier code.AnnotationDatabases are being phased out, since annotations are now stored directly in the XClass/XMethod/XField objects. Resolving nullness annotations will be handled through the JSR-305 type qualifier code.
-
MethodDescriptioncall getLabel() insteadedu.umd.cs.findbugs.ba.Hierarchy.findXMethod
(JavaClass[], String, String, JavaClassAndMethodChooser) This method does not work as expected. Will be removed in 5.x release.You probably don't care for synthetic members, but want to know if the developer added it (think of lambdas), useMemberUtils.isUserGenerated(FieldOrMethod)
insteadUseDescriptorFactory.createClassDescriptor(String)
insteadUseDescriptorFactory.isClassResource(String)
insteaduseClassDescriptor.getDottedClassName()
instead.this hack is needless for modern JVM, at least Java8This method is not necessary to realize multi-thread model in SpotBugs 4.0. SeeAnalysisLocal
for detail.UseUnreadFieldsData.getReadFields()
insteadUseUnreadFieldsData.getWrittenFields()
insteadUseUnreadFieldsData.isContainerField(XField)
insteadUseUnreadFieldsData.isReflexive(XField)
insteadUseUnreadFieldsData.isWrittenInConstructor(XField)
insteadUse createDetector2 in new codeThis attribute is not used actively, and could be removed in future releasecall instantiateDetector2sInPass() insteadCalling this method repeatedly performs poorly because a SourceFinder is created each time, which checks all files for existence each time. UseProject.addSourceDirs(java.util.Collection<java.lang.String>)
instead.FindBugs2 and ClassPathBuilder take care of this automaticallyUseSystemProperties.getInt(String,int)
insteadUse try-with-resources instead. And basicallyIOException
fromOutputStream.close()
is not good to ignore.Use try-with-resources instead. And basicallyIOException
fromOutputStream.close()
is not good to ignore.Use try-with-resources instead.Use try-with-resources instead.
-
ConstructorDescriptionUse
PluginLoader(URL,URI,ClassLoader,boolean,boolean)
instead