|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
### Eclipse Workspace Patch 1.0
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
#P org.eclipse.jdt.core
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.57
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.57 FlowContext.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java 2 Apr 2007 11:05:51 -0000 1.57
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java 29 Jan 2009 17:06:52 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -18,6 +18,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
import org.eclipse.jdt.internal.compiler.ast.Reference;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
import org.eclipse.jdt.internal.compiler.ast.SubRoutineStatement;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
import org.eclipse.jdt.internal.compiler.ast.TryStatement;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
import org.eclipse.jdt.internal.compiler.lookup.Binding;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -44,6 +45,25 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
boolean deferNullDiagnostic, preemptNullDiagnostic;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+public static final int
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ CAN_ONLY_NULL_NON_NULL = 0x0000,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // check against null and non null, with definite values -- comparisons
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ CAN_ONLY_NULL = 0x0001,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // check against null, with definite values -- comparisons
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ CAN_ONLY_NON_NULL = 0x0002,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // check against non null, with definite values -- comparisons
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ MAY_NULL = 0x0003,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // check against null, with potential values -- NPE guard
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ CHECK_MASK = 0x00FF,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ IN_COMPARISON_NULL = 0x0100,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ IN_COMPARISON_NON_NULL = 0x0200,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // check happened in a comparison
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ IN_ASSIGNMENT = 0x0300,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // check happened in an assignment
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ IN_INSTANCEOF = 0x0400,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // check happened in an instanceof expression
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ CONTEXT_MASK = ~CHECK_MASK;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
public FlowContext(FlowContext parent, ASTNode associatedNode) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.parent = parent;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.associatedNode = associatedNode;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -287,6 +307,28 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
return null;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+public FlowInfo getInitsForFinalBlankInitializationCheck(TypeBinding declaringType, FlowInfo flowInfo) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowContext current = this;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowInfo inits = flowInfo;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ do {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (current instanceof InitializationFlowContext) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ InitializationFlowContext initializationContext = (InitializationFlowContext) current;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (((TypeDeclaration)initializationContext.associatedNode).binding == declaringType) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ return inits;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ inits = initializationContext.initsBeforeContext;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ current = initializationContext.initializationParent;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ } else if (current instanceof ExceptionHandlingFlowContext) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ ExceptionHandlingFlowContext exceptionContext = (ExceptionHandlingFlowContext) current;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ current = exceptionContext.initializationParent == null ? exceptionContext.parent : exceptionContext.initializationParent;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ } else {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ current = current.parent;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ } while (current != null);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // not found
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ return null;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
/*
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
* lookup through break labels
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
*/
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -468,25 +510,6 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
-public static final int
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- CAN_ONLY_NULL_NON_NULL = 0x0000,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- // check against null and non null, with definite values -- comparisons
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- CAN_ONLY_NULL = 0x0001,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- // check against null, with definite values -- comparisons
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- CAN_ONLY_NON_NULL = 0x0002,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- // check against non null, with definite values -- comparisons
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- MAY_NULL = 0x0003,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- // check against null, with potential values -- NPE guard
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- CHECK_MASK = 0x00FF,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- IN_COMPARISON_NULL = 0x0100,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- IN_COMPARISON_NON_NULL = 0x0200,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- // check happened in a comparison
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- IN_ASSIGNMENT = 0x0300,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- // check happened in an assignment
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- IN_INSTANCEOF = 0x0400,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- // check happened in an instanceof expression
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- CONTEXT_MASK = ~CHECK_MASK;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
-
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
/**
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
* Record a null reference for use by deferred checks. Only looping or
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
* finally contexts really record that information. The context may
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.16
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.16 InitializationFlowContext.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java 28 Mar 2006 20:32:37 -0000 1.16
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/flow/InitializationFlowContext.java 29 Jan 2009 17:06:52 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -26,17 +26,17 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
public TypeBinding[] thrownExceptions = new TypeBinding[5];
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
public ASTNode[] exceptionThrowers = new ASTNode[5];
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
public FlowInfo[] exceptionThrowerFlowInfos = new FlowInfo[5];
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ public FlowInfo initsBeforeContext;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- public InitializationFlowContext(
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- FlowContext parent,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- ASTNode associatedNode,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- BlockScope scope) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ public InitializationFlowContext(FlowContext parent, ASTNode associatedNode, FlowInfo initsBeforeContext, FlowContext initializationParent, BlockScope scope) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
super(
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
parent,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
associatedNode,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Binding.NO_EXCEPTIONS, // no exception allowed by default
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ initializationParent,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
scope,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FlowInfo.DEAD_END);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ this.initsBeforeContext = initsBeforeContext;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
public void checkInitializerExceptions(
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.42
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.42 ExceptionHandlingFlowContext.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java 5 Mar 2008 07:57:20 -0000 1.42
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java 29 Jan 2009 17:06:52 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -41,7 +41,8 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
boolean isMethodContext;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
public UnconditionalFlowInfo initsOnReturn;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
-
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ public FlowContext initializationParent; // special parent relationship only for initialization purpose
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
// for dealing with anonymous constructor thrown exceptions
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
public ArrayList extendedExceptions;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -49,6 +50,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FlowContext parent,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
ASTNode associatedNode,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
ReferenceBinding[] handledExceptions,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowContext initializationParent,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
BlockScope scope,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
UnconditionalFlowInfo flowInfo) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -79,6 +81,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
System.arraycopy(this.isReached, 0, this.isNeeded, 0, cacheSize);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.initsOnReturn = FlowInfo.DEAD_END;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ this. initializationParent = initializationParent;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
public void complainIfUnusedExceptionHandlers(AbstractMethodDeclaration method) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.148
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.148 TypeDeclaration.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 27 May 2008 22:21:13 -0000 1.148
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java 29 Jan 2009 17:06:52 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -594,8 +594,8 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.scope.problemReporter().unusedPrivateType(this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- InitializationFlowContext initializerContext = new InitializationFlowContext(null, this, this.initializerScope);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- InitializationFlowContext staticInitializerContext = new InitializationFlowContext(null, this, this.staticInitializerScope);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ InitializationFlowContext initializerContext = new InitializationFlowContext(null, this, flowInfo, flowContext, this.initializerScope);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ InitializationFlowContext staticInitializerContext = new InitializationFlowContext(null, this, flowInfo, flowContext, this.staticInitializerScope);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FlowInfo nonStaticFieldInfo = flowInfo.unconditionalFieldLessCopy();
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FlowInfo staticFieldInfo = flowInfo.unconditionalFieldLessCopy();
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (this.fields != null) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -610,11 +610,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
} else {*/
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
staticInitializerContext.handledExceptions = Binding.ANY_EXCEPTION; // tolerate them all, and record them
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
/*}*/
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- staticFieldInfo =
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- field.analyseCode(
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- this.staticInitializerScope,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- staticInitializerContext,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- staticFieldInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ staticFieldInfo = field.analyseCode(this.staticInitializerScope, staticInitializerContext, staticFieldInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
// in case the initializer is not reachable, use a reinitialized flowInfo and enter a fake reachable
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
// branch, since the previous initializer already got the blame.
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (staticFieldInfo == FlowInfo.DEAD_END) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -630,8 +626,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
} else {*/
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
initializerContext.handledExceptions = Binding.ANY_EXCEPTION; // tolerate them all, and record them
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
/*}*/
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- nonStaticFieldInfo =
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- field.analyseCode(this.initializerScope, initializerContext, nonStaticFieldInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ nonStaticFieldInfo = field.analyseCode(this.initializerScope, initializerContext, nonStaticFieldInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
// in case the initializer is not reachable, use a reinitialized flowInfo and enter a fake reachable
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
// branch, since the previous initializer already got the blame.
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (nonStaticFieldInfo == FlowInfo.DEAD_END) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.51.2.1
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.51.2.1 Clinit.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 1 Jul 2008 11:24:16 -0000 1.51.2.1
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java 29 Jan 2009 17:06:49 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -53,6 +53,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
staticInitializerFlowContext.parent,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Binding.NO_EXCEPTIONS,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ staticInitializerFlowContext,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
scope,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FlowInfo.DEAD_END);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.108
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.108 TryStatement.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java 31 Aug 2007 19:41:31 -0000 1.108
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java 29 Jan 2009 17:06:51 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -87,6 +87,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
flowContext,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.caughtExceptionTypes,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ null,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.scope,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
flowInfo.unconditionalInits());
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
handlingContext.initsOnFinally =
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -198,6 +199,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
insideSubContext,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.caughtExceptionTypes,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ null,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.scope,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
flowInfo.unconditionalInits());
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
handlingContext.initsOnFinally =
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.92.2.2
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.92.2.2 ConstructorDeclaration.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 8 Jul 2008 13:22:06 -0000 1.92.2.2
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 29 Jan 2009 17:06:50 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -77,6 +77,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
initializerFlowContext.parent,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.binding.thrownExceptions,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ initializerFlowContext,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.scope,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FlowInfo.DEAD_END);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
initializerFlowContext.checkInitializerExceptions(
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.103.2.3
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.103.2.3 SingleNameReference.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java 27 Nov 2008 10:13:10 -0000 1.103.2.3
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java 29 Jan 2009 17:06:51 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -62,7 +62,8 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FieldBinding fieldBinding;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if ((fieldBinding = (FieldBinding) this.binding).isBlankFinal()
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
&& currentScope.needBlankFinalFieldInitializationCheck(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- if (!flowInfo.isDefinitelyAssigned(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(fieldBinding.declaringClass.original(), flowInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (!fieldInits.isDefinitelyAssigned(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -148,7 +149,8 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
// check if reading a final blank field
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FieldBinding fieldBinding = (FieldBinding) this.binding;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (fieldBinding.isBlankFinal() && currentScope.needBlankFinalFieldInitializationCheck(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- if (!flowInfo.isDefinitelyAssigned(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(fieldBinding.declaringClass.original(), flowInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (!fieldInits.isDefinitelyAssigned(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.116.2.2
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.116.2.2 FieldReference.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java 2 Oct 2008 15:29:33 -0000 1.116.2.2
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java 29 Jan 2009 17:06:50 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -57,15 +57,17 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
-public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
// compound assignment extra work
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (isCompound) { // check the variable part is initialized if blank final
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (this.binding.isBlankFinal()
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
&& this.receiver.isThis()
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- && currentScope.needBlankFinalFieldInitializationCheck(this.binding)
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- && (!flowInfo.isDefinitelyAssigned(this.binding))) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- currentScope.problemReporter().uninitializedBlankFinalField(this.binding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- // we could improve error msg here telling "cannot use compound assignment on final blank field"
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ && currentScope.needBlankFinalFieldInitializationCheck(this.binding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(this.binding.declaringClass.original(), flowInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (!fieldInits.isDefinitelyAssigned(this.binding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ currentScope.problemReporter().uninitializedBlankFinalField(this.binding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ // we could improve error msg here telling "cannot use compound assignment on final blank field"
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
manageSyntheticAccessIfNecessary(currentScope, flowInfo, true /*read-access*/);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.125.2.3
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.125.2.3 QualifiedNameReference.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java 27 Nov 2008 10:13:10 -0000 1.125.2.3
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java 29 Jan 2009 17:06:50 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -74,10 +74,9 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (lastFieldBinding.isBlankFinal()
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
&& this.otherBindings != null // the last field binding is only assigned
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
&& currentScope.needBlankFinalFieldInitializationCheck(lastFieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- if (!flowInfo.isDefinitelyAssigned(lastFieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- currentScope.problemReporter().uninitializedBlankFinalField(
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- lastFieldBinding,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(lastFieldBinding.declaringClass.original(), flowInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (!fieldInits.isDefinitelyAssigned(lastFieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ currentScope.problemReporter().uninitializedBlankFinalField(lastFieldBinding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
break;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -122,9 +121,11 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (isCompound) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (otherBindingsCount == 0
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
&& lastFieldBinding.isBlankFinal()
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- && currentScope.needBlankFinalFieldInitializationCheck(lastFieldBinding)
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- && (!flowInfo.isDefinitelyAssigned(lastFieldBinding))) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- currentScope.problemReporter().uninitializedBlankFinalField(lastFieldBinding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ && currentScope.needBlankFinalFieldInitializationCheck(lastFieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(lastFieldBinding.declaringClass.original(), flowInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (!fieldInits.isDefinitelyAssigned(lastFieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ currentScope.problemReporter().uninitializedBlankFinalField(lastFieldBinding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
TypeBinding lastReceiverType;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
switch (otherBindingsCount) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -212,9 +213,11 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FieldBinding fieldBinding = (FieldBinding) this.binding;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
// check if reading a final blank field
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if (fieldBinding.isBlankFinal()
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- && currentScope.needBlankFinalFieldInitializationCheck(fieldBinding)
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- && !flowInfo.isDefinitelyAssigned(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ && currentScope.needBlankFinalFieldInitializationCheck(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(fieldBinding.declaringClass.original(), flowInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (!fieldInits.isDefinitelyAssigned(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ }
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
break;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.65
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.65 MethodDeclaration.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java 27 May 2008 22:21:13 -0000 1.65
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java 29 Jan 2009 17:06:50 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -72,6 +72,7 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
initializationContext,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.binding.thrownExceptions,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ null,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
this.scope,
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FlowInfo.DEAD_END);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
Index: eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
===================================================================
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java,v
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
retrieving revision 1.52
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
diff -u -r1.52 CodeSnippetSingleNameReference.java
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
--- eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java 27 May 2008 22:27:12 -0000 1.52
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+++ eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java 29 Jan 2009 17:06:52 -0000
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
@@ -45,7 +45,8 @@
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
FieldBinding fieldBinding;
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
if ((fieldBinding = (FieldBinding) this.binding).isBlankFinal()
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
&& currentScope.needBlankFinalFieldInitializationCheck(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
- if (!flowInfo.isDefinitelyAssigned(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(fieldBinding.declaringClass.original(), flowInfo);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
+ if (!fieldInits.isDefinitelyAssigned(fieldBinding)) {
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
currentScope.problemReporter().uninitializedBlankFinalField(fieldBinding, this);
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
}
|
|
![](https://seccdn.libravatar.org/avatar/0c6e9e514c88ccbca155e733902412a80831318f713070d1dc699d09361db751?s=16&d=retro) |
db9e6cd |
|