Bug 572584 - Potentially dangerous use of non-short-circuit logic

in
org.eclipse.debug.internal.core.DebugOptions.optionsChanged(DebugOptions)
org.eclipse.debug.internal.core.LaunchManager$ResourceProxyVisitor.visit(IResourceProxy)
..

This code seems to be using non-short-circuit logic (e.g., & or |)
rather than short-circuit logic (&& or ||). In addition, it seem
possible that, depending on the value of the left hand side, you might
not want to evaluate the right hand side (because it would have side
effects, could cause an exception or could be expensive.

Non-short-circuit logic causes both sides of the expression to be
evaluated even when the result can be inferred from knowing the
left-hand side. This can be less efficient and can result in errors if
the left-hand side guards cases when evaluating the right-hand side can
generate an error.

See the Java Language Specification for details.

Rank: Of Concern (15), confidence: High
Pattern: NS_DANGEROUS_NON_SHORT_CIRCUIT
Type: NS, Category: STYLE (Dodgy code)

Change-Id: Ib234c4f879ec39de41c661d4532ba2afdfaa1d69
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
2 files changed