diff options
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java')
-rw-r--r-- | org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java index 6c1e05594..fd144cd4d 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java @@ -12,7 +12,7 @@ * IBM Corporation - initial API and implementation * Fraunhofer FIRST - extended API and implementation * Technical University Berlin - extended API and implementation - * Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for + * Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for * bug 292478 - Report potentially null across variable assignment * bug 332637 - Dead Code detection removing code that isn't dead * bug 394768 - [compiler][resource] Incorrect resource leak warning when creating stream in conditional @@ -40,9 +40,9 @@ public abstract class FlowInfo { public int tagBits; // REACHABLE by default public final static int REACHABLE = 0; - /* unreachable code + /* unreachable code * eg. while (true); - * i++; --> unreachable code + * i++; --> unreachable code */ public final static int UNREACHABLE_OR_DEAD = 1; /* unreachable code as inferred by null analysis @@ -57,7 +57,7 @@ public abstract class FlowInfo { */ public final static int UNREACHABLE = UNREACHABLE_OR_DEAD | UNREACHABLE_BY_NULLANALYSIS; public final static int NULL_FLAG_MASK = 4; - + public final static int UNKNOWN = 1; public final static int NULL = 2; public final static int NON_NULL = 4; @@ -66,7 +66,7 @@ public abstract class FlowInfo { public final static int POTENTIALLY_NON_NULL = 32; public final static int UNROOTED = 64; // marks a flowInfo that may be appended to another flowInfo (accepting incoming nulls/nonnulls, see UFI.iNBit/iNNBit). - + public static final int FREE_TYPEVARIABLE = FlowInfo.POTENTIALLY_NULL | FlowInfo.POTENTIALLY_NON_NULL; public static final UnconditionalFlowInfo DEAD_END; // Represents a dead branch status of initialization @@ -553,7 +553,7 @@ public static UnconditionalFlowInfo mergedOptimizedBranchesIfElse( // if a variable is only initialized in one branch and not initialized in the other, // then we need to cast a doubt on its initialization in the merged info mergedInfo.mergeDefiniteInitsWith(initsWhenFalse.unconditionalCopy()); - + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=415997, classify unreachability precisely, IsElseStatementUnreachable could be due to null analysis if ((mergedInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0 && (initsWhenFalse.tagBits & FlowInfo.UNREACHABLE) == FlowInfo.UNREACHABLE_BY_NULLANALYSIS) { mergedInfo.tagBits &= ~UNREACHABLE_OR_DEAD; @@ -567,7 +567,7 @@ public static UnconditionalFlowInfo mergedOptimizedBranchesIfElse( // true or false (i.e if(true), etc) for sure // We don't do this if both if and else branches themselves are in an unreachable code // or if any of them is a DEAD_END (e.g. contains 'return' or 'throws') - mergedInfo = + mergedInfo = initsWhenFalse.addPotentialInitializationsFrom(initsWhenTrue. nullInfoLessUnconditionalCopy()). unconditionalInits(); |