Deprecated API
Contents
- Terminally Deprecated
- Interfaces
- Classes
- Enums
- Annotation Types
- Fields
- Methods
- Constructors
- Enum Constants
- Annotation Type Elements
-
Terminally Deprecated ElementsElementDescriptionThis method is deprecated and will be removed in or after October 2026. Use try-with resources when creating the stream instead.
-
Deprecated Interfaces
-
Deprecated ClassesClassDescriptionThis 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.This signature parser does not support generics, use GenericSignatureParser 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.BugInstanceMatchermatchers 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.
-
Deprecated Enums
-
Deprecated Annotation TypesAnnotation TypeDescriptionThe annotation based approach is useless for lambdas. Write expectations using
edu.umd.cs.findbugs.test.matcher.BugInstanceMatchermatchers in test source directoryThe annotation based approach is useless for lambdas. Write expectations usingedu.umd.cs.findbugs.test.matcher.BugInstanceMatchermatchers in test source directoryThe annotation based approach is useless for lambdas. Write expectations usingedu.umd.cs.findbugs.test.matcher.BugInstanceMatchermatchers in test source directoryThe annotation based approach is useless for lambdas. Write expectations usingedu.umd.cs.findbugs.test.matcher.BugInstanceMatchermatchers in test source directory- use CheckForNull instead; the name of which more clearly indicates that not only could the value be null, but that good coding practice requires that the value be checked for null.- UseSuppressFBWarningsinstead
-
Deprecated FieldsFieldDescription- use Builder insteadThis field is not updated by any code in the project. Will be removed in 5.x release.This attribute is not used actively, and could be removed in future releaseUse
Version.VERSION_STRINGinstead.
-
Deprecated MethodsMethodDescription- use confidence insteadcall 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. SeeAnalysisLocalfor 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 releaseUseFBFrame.setFontSizeHelper(float,Component[])insteadUseClassName.matchedPrefixes(String[],String)insteadThis method is deprecated and will be removed in or after October 2026. Use try-with resources when creating the stream instead.useProfileSummary.writeXML(XMLOutput)instead.call instantiateDetector2sInPass() insteadCalling this method repeatedly performs poorly because a SourceFinder is created each time, which checks all files for existence each time. UseProject.addSourceDirs(Collection)instead.FindBugs2 and ClassPathBuilder take care of this automaticallyUseSystemProperties.getInt(String,int)insteadUse try-with-resources instead. And basicallyIOExceptionfromOutputStream.close()is not good to ignore.Use try-with-resources instead. And basicallyIOExceptionfromOutputStream.close()is not good to ignore.Use try-with-resources instead.Use try-with-resources instead.
-
Deprecated Constructors
-
Deprecated Enum Constants
-
Deprecated Annotation Type ElementsAnnotation Type ElementDescription- use confidence instead