You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SpotBugs issue CT_CONSTRUCTOR_THROW (Be wary of letting constructors throw exceptions) in generated code has been filtered out. It would be better to fix generated code instead.
Example from language/choice_types tests:
CT Exception thrown in class choice_types.bitmask_param_choice.BitmaskParamChoice at new choice_types.bitmask_param_choice.BitmaskParamChoice(PackingContext, BitStreamReader, Selector)
will leave the constructor. The object under construction remains partially initialized and may be vulnerable to Finalizer attacks.
Bug type CT_CONSTRUCTOR_THROW
In class choice_types.bitmask_param_choice.BitmaskParamChoice
In method new choice_types.bitmask_param_choice.BitmaskParamChoice(PackingContext, BitStreamReader, Selector)
At BitmaskParamChoice.java:[line 60]
At BitmaskParamChoice.java:[line 60]
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 for more information.
The text was updated successfully, but these errors were encountered:
All generated classes are now declared as final since they were never intended to be further extended by applications. This solution solves CT_CONSTRUCTOR_THROW SpotBugs warning.
SpotBugs issue CT_CONSTRUCTOR_THROW (Be wary of letting constructors throw exceptions) in generated code has been filtered out. It would be better to fix generated code instead.
Example from
language/choice_types
tests: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 for more information.
The text was updated successfully, but these errors were encountered: