Java


JAVA.STRUCT.UC.INSTR : Unreachable Instruction (Java)

Summary

An instruction will never be executed.

Methods or constructors never used in the code are often harmless, except for an increase in size of the application. In some cases, however, unused methods are the sign of a stale application interface that needs cleaning or of the necessity to introduce an abstract method.

Properties

Class Name Unreachable Instruction (Java)
Significance reliability
Mnemonic JAVA.STRUCT.UC.INSTR
Categories
CWE CWE:561 Dead Code
Availability Available for Java only.
Enabling Checks for this warning class are enabled by default. To disable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += discard class="Unreachable Instruction (Java)"

Resolution

Verify if the application interface can be simplified or an abstract method could replace a non-abstract method.

Relevant Configuration File Parameters

The following configuration file parameters affect checks for this warning class.