Skip to content

Commit

Permalink
Updated spotbugs - (Task #230)
Browse files Browse the repository at this point in the history
- Updated spotbugs due to java 17
- Fixed warnings and concerns of spotbugs

---
Task #230: Updating infrastructure to Core 4.17.0 as well as Eclipse
2024-03
  • Loading branch information
PhilMFischer committed Aug 16, 2024
1 parent 79d8042 commit 15347a9
Show file tree
Hide file tree
Showing 39 changed files with 2,303 additions and 86 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
#SpotBugs User Preferences
#Fri Aug 16 12:41:55 CEST 2024
detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
detectorAtomicityProblem=AtomicityProblem|true
detectorBadAppletConstructor=BadAppletConstructor|false
detectorBadResultSetAccess=BadResultSetAccess|true
detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
detectorBadUseOfReturnValue=BadUseOfReturnValue|true
detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
detectorBooleanReturnNull=BooleanReturnNull|true
detectorCallToUnsupportedMethod=CallToUnsupportedMethod|false
detectorCheckExpectedWarnings=CheckExpectedWarnings|false
detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
detectorCheckRelaxingNullnessAnnotation=CheckRelaxingNullnessAnnotation|true
detectorCheckTypeQualifiers=CheckTypeQualifiers|true
detectorCloneIdiom=CloneIdiom|true
detectorComparatorIdiom=ComparatorIdiom|true
detectorConfusedInheritance=ConfusedInheritance|true
detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
detectorConstructorThrow=ConstructorThrow|true
detectorCovariantArrayAssignment=CovariantArrayAssignment|false
detectorCrossSiteScripting=CrossSiteScripting|true
detectorDefaultEncodingDetector=DefaultEncodingDetector|true
detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
detectorDontAssertInstanceofInTests=DontAssertInstanceofInTests|true
detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
detectorDontCatchNullPointerException=DontCatchNullPointerException|true
detectorDontIgnoreResultOfPutIfAbsent=DontIgnoreResultOfPutIfAbsent|true
detectorDontReusePublicIdentifiers=DontReusePublicIdentifiers|false
detectorDontUseEnum=DontUseEnum|true
detectorDontUseFloatsAsLoopCounters=DontUseFloatsAsLoopCounters|true
detectorDroppedException=DroppedException|true
detectorDumbMethodInvocations=DumbMethodInvocations|true
detectorDumbMethods=DumbMethods|true
detectorDuplicateBranches=DuplicateBranches|true
detectorEmptyZipFileEntry=EmptyZipFileEntry|false
detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
detectorExplicitSerialization=ExplicitSerialization|true
detectorFinalizerNullsFields=FinalizerNullsFields|true
detectorFindArgumentAssertions=FindArgumentAssertions|true
detectorFindAssertionsWithSideEffects=FindAssertionsWithSideEffects|true
detectorFindBadCast2=FindBadCast2|true
detectorFindBadEndOfStreamCheck=FindBadEndOfStreamCheck|true
detectorFindBadForLoop=FindBadForLoop|true
detectorFindCircularDependencies=FindCircularDependencies|false
detectorFindComparatorProblems=FindComparatorProblems|true
detectorFindDeadLocalStores=FindDeadLocalStores|true
detectorFindDoubleCheck=FindDoubleCheck|true
detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
detectorFindFinalizeInvocations=FindFinalizeInvocations|true
detectorFindFloatEquality=FindFloatEquality|true
detectorFindHEmismatch=FindHEmismatch|true
detectorFindInconsistentSync2=FindInconsistentSync2|true
detectorFindInstanceLockOnSharedStaticData=FindInstanceLockOnSharedStaticData|true
detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
detectorFindMaskedFields=FindMaskedFields|true
detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
detectorFindNakedNotify=FindNakedNotify|true
detectorFindNonShortCircuit=FindNonShortCircuit|true
detectorFindNullDeref=FindNullDeref|true
detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
detectorFindOpenStream=FindOpenStream|true
detectorFindOverridableMethodCall=FindOverridableMethodCall|true
detectorFindPotentialSecurityCheckBasedOnUntrustedSource=FindPotentialSecurityCheckBasedOnUntrustedSource|true
detectorFindPublicAttributes=FindPublicAttributes|true
detectorFindPuzzlers=FindPuzzlers|true
detectorFindRefComparison=FindRefComparison|true
detectorFindReturnRef=FindReturnRef|true
detectorFindRoughConstants=FindRoughConstants|true
detectorFindRunInvocations=FindRunInvocations|true
detectorFindSelfComparison=FindSelfComparison|true
detectorFindSelfComparison2=FindSelfComparison2|true
detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
detectorFindSpinLoop=FindSpinLoop|true
detectorFindSqlInjection=FindSqlInjection|true
detectorFindTwoLockWait=FindTwoLockWait|true
detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
detectorFindUnconditionalWait=FindUnconditionalWait|true
detectorFindUninitializedGet=FindUninitializedGet|true
detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
detectorFindUnreleasedLock=FindUnreleasedLock|true
detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
detectorFindUnsyncGet=FindUnsyncGet|true
detectorFindUseOfNonSerializableValue=FindUseOfNonSerializableValue|true
detectorFindUselessControlFlow=FindUselessControlFlow|true
detectorFindUselessObjects=FindUselessObjects|true
detectorFindVulnerableSecurityCheckMethods=FindVulnerableSecurityCheckMethods|true
detectorFormatStringChecker=FormatStringChecker|true
detectorHugeSharedStringConstants=HugeSharedStringConstants|true
detectorIDivResultCastToDouble=IDivResultCastToDouble|true
detectorIncompatMask=IncompatMask|true
detectorInconsistentAnnotations=InconsistentAnnotations|true
detectorInefficientIndexOf=InefficientIndexOf|false
detectorInefficientInitializationInsideLoop=InefficientInitializationInsideLoop|false
detectorInefficientMemberAccess=InefficientMemberAccess|false
detectorInefficientToArray=InefficientToArray|false
detectorInfiniteLoop=InfiniteLoop|true
detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
detectorInitializationChain=InitializationChain|true
detectorInitializeNonnullFieldsInConstructor=InitializeNonnullFieldsInConstructor|true
detectorInstantiateStaticClass=InstantiateStaticClass|true
detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true
detectorInvalidJUnitTest=InvalidJUnitTest|true
detectorIteratorIdioms=IteratorIdioms|true
detectorLazyInit=LazyInit|true
detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
detectorLostLoggerDueToWeakReference=LostLoggerDueToWeakReference|true
detectorMethodReturnCheck=MethodReturnCheck|true
detectorMultipleInstantiationsOfSingletons=MultipleInstantiationsOfSingletons|true
detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
detectorMutableEnum=MutableEnum|true
detectorMutableLock=MutableLock|true
detectorMutableStaticFields=MutableStaticFields|true
detectorNaming=Naming|true
detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
detectorNumberConstructor=NumberConstructor|true
detectorOptionalReturnNull=OptionalReturnNull|true
detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
detectorOverridingMethodsMustInvokeSuperDetector=OverridingMethodsMustInvokeSuperDetector|true
detectorPermissionsSuper=PermissionsSuper|true
detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
detectorPublicSemaphores=PublicSemaphores|false
detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true
detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
detectorRedundantConditions=RedundantConditions|true
detectorRedundantInterfaces=RedundantInterfaces|true
detectorReflectionIncreaseAccessibility=ReflectionIncreaseAccessibility|true
detectorRepeatedConditionals=RepeatedConditionals|true
detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
detectorSerializableIdiom=SerializableIdiom|true
detectorStartInConstructor=StartInConstructor|true
detectorStaticCalendarDetector=StaticCalendarDetector|true
detectorStringConcatenation=StringConcatenation|true
detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
detectorSwitchFallthrough=SwitchFallthrough|true
detectorSynchronizationOnSharedBuiltinConstant=SynchronizationOnSharedBuiltinConstant|true
detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
detectorThrowingExceptions=ThrowingExceptions|false
detectorURLProblems=URLProblems|true
detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
detectorUnnecessaryEnvUsage=UnnecessaryEnvUsage|true
detectorUnnecessaryMath=UnnecessaryMath|true
detectorUnreadFields=UnreadFields|true
detectorUselessSubclassMethod=UselessSubclassMethod|false
detectorVarArgsProblems=VarArgsProblems|true
detectorVolatileUsage=VolatileUsage|true
detectorWaitInLoop=WaitInLoop|true
detectorWrongMapIterator=WrongMapIterator|true
detectorXMLFactoryBypass=XMLFactoryBypass|true
detector_threshold=2
effort=default
excludefilter0=../spotbugs-exclude.xml|true
filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false|20
filter_settings_neg=MALICIOUS_CODE,SECURITY,EXPERIMENTAL,NOISE,I18N|
includefilter0=../spotbugs-include.xml|true
run_at_full_build=false
3 changes: 2 additions & 1 deletion de.dlr.sc.virsat.cef.branding.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ Require-Bundle: org.eclipse.ui.workbench,
org.eclipse.osgi,
org.eclipse.core.runtime,
org.eclipse.ui.intro,
org.eclipse.ui
org.eclipse.ui,
de.dlr.sc.virsat.external.lib.spotbugs
Automatic-Module-Name: de.dlr.sc.virsat.cef.branding.ui
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Version;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;


/**
* The activator class controls the plug-in life cycle
Expand All @@ -38,6 +40,7 @@ public class BrandingPlugin extends AbstractUIPlugin implements IStartup {
/**
* The constructor
*/
@SuppressFBWarnings(value = "SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR", justification = "needs to be public for osgi to instantiate plugin")
public BrandingPlugin() {
}

Expand Down Expand Up @@ -89,7 +92,7 @@ public void stop(BundleContext context) throws Exception {
*
* @return the shared instance
*/
public static BrandingPlugin getDefault() {
public static synchronized BrandingPlugin getDefault() {
return plugin;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
* @author scha_vo
*
*/
class OpenPerspectiveMouseListener implements MouseListener {
static class OpenPerspectiveMouseListener implements MouseListener {

private String perspectiveId;

Expand Down
Loading

0 comments on commit 15347a9

Please sign in to comment.