Fixes #330 #374
Fixes #330 #374
SpotBugs Source Code Analyzer report
8 violation(s) found
Annotations
Check warning on line 595 in gama.core/src/gama/gaml/statements/LoopStatement.java
github-actions / SpotBugs
BX_UNBOXING_IMMEDIATELY_REBOXED
Boxed value is unboxed and then immediately reboxed in new gama.gaml.statements.LoopStatement$FloatBounded(LoopStatement, IExpression, IExpression, IExpression)
Raw output
A boxed value is unboxed and then immediately reboxed.
Check warning on line 592 in gama.core/src/gama/gaml/statements/LoopStatement.java
github-actions / SpotBugs
CT_CONSTRUCTOR_THROW
Exception thrown in class gama.gaml.statements.LoopStatement$FloatBounded at new gama.gaml.statements.LoopStatement$FloatBounded(LoopStatement, IExpression, IExpression, IExpression) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks.
Raw output
Classes that throw exceptions in their constructors are vulnerable to Finalizer attacks
A finalizer attack can be prevented, by declaring the class final, using an empty finalizer declared as final, or by a clever use of a private constructor.
See SEI CERT Rule OBJ-11 [https://wiki.sei.cmu.edu/confluence/display/java/OBJ11-J.+Be+wary+of+letting+constructors+throw+exceptions] for more information.
Check warning on line 595 in gama.core/src/gama/gaml/statements/LoopStatement.java
github-actions / SpotBugs
NP_NULL_ON_SOME_PATH
Possible null pointer dereference of null in new gama.gaml.statements.LoopStatement$FloatBounded(LoopStatement, IExpression, IExpression, IExpression)
Raw output
There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception cannot ever be executed; deciding that is beyond the ability of SpotBugs.
Check warning on line 625 in gama.core/src/gama/gaml/statements/LoopStatement.java
github-actions / SpotBugs
SF_SWITCH_NO_DEFAULT
Switch statement found in gama.gaml.statements.LoopStatement$FloatBounded.runIn(IScope) where default case is missing
Raw output
This method contains a switch statement where default case is missing. Usually you need to provide a default case.
Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if the default case is at the end of the switch statement and the switch statement doesn't contain break statements for other cases.
Check warning on line 516 in gama.core/src/gama/gaml/statements/LoopStatement.java
github-actions / SpotBugs
BX_UNBOXING_IMMEDIATELY_REBOXED
Boxed value is unboxed and then immediately reboxed in new gama.gaml.statements.LoopStatement$IntBounded(LoopStatement, IExpression, IExpression, IExpression)
Raw output
A boxed value is unboxed and then immediately reboxed.
Check warning on line 513 in gama.core/src/gama/gaml/statements/LoopStatement.java
github-actions / SpotBugs
CT_CONSTRUCTOR_THROW
Exception thrown in class gama.gaml.statements.LoopStatement$IntBounded at new gama.gaml.statements.LoopStatement$IntBounded(LoopStatement, IExpression, IExpression, IExpression) will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks.
Raw output
Classes that throw exceptions in their constructors are vulnerable to Finalizer attacks
A finalizer attack can be prevented, by declaring the class final, using an empty finalizer declared as final, or by a clever use of a private constructor.
See SEI CERT Rule OBJ-11 [https://wiki.sei.cmu.edu/confluence/display/java/OBJ11-J.+Be+wary+of+letting+constructors+throw+exceptions] for more information.
Check warning on line 516 in gama.core/src/gama/gaml/statements/LoopStatement.java
github-actions / SpotBugs
NP_NULL_ON_SOME_PATH
Possible null pointer dereference of null in new gama.gaml.statements.LoopStatement$IntBounded(LoopStatement, IExpression, IExpression, IExpression)
Raw output
There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception cannot ever be executed; deciding that is beyond the ability of SpotBugs.
Check warning on line 546 in gama.core/src/gama/gaml/statements/LoopStatement.java
github-actions / SpotBugs
SF_SWITCH_NO_DEFAULT
Switch statement found in gama.gaml.statements.LoopStatement$IntBounded.runIn(IScope) where default case is missing
Raw output
This method contains a switch statement where default case is missing. Usually you need to provide a default case.
Because the analysis only looks at the generated bytecode, this warning can be incorrect triggered if the default case is at the end of the switch statement and the switch statement doesn't contain break statements for other cases.