Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
index 43ed61877..b1f7c17d0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
@@ -18,7 +18,7 @@
* bug 331649 - [compiler][null] consider null annotations for fields
* bug 383368 - [compiler][null] syntactic null analysis for field references
* bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
- * Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ * Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
* Bug 411964 - [1.8][null] leverage null type annotation in foreach statement
* Bug 407414 - [compiler][null] Incorrect warning on a primitive type being null
*******************************************************************************/
@@ -49,7 +49,7 @@ import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
*
* What: support notion of expected type
* Why: inferred callout to field must be created with proper type, possibly involving lifting.
- *
+ *
* @author stephan
*/
public abstract class Reference extends Expression {
@@ -89,7 +89,7 @@ protected boolean checkNullableFieldDereference(Scope scope, FieldBinding field,
if ((field.type.tagBits & TagBits.AnnotationNullable) != 0) {
scope.problemReporter().dereferencingNullableExpression(sourcePosition, scope.environment());
return true;
- }
+ }
if (field.type.isFreeTypeVariable()) {
scope.problemReporter().fieldFreeTypeVariableReference(field, sourcePosition);
return true;
@@ -117,7 +117,7 @@ public void fieldStore(Scope currentScope, CodeStream codeStream, FieldBinding f
case TypeIds.T_double :
codeStream.dup2();
break;
- default :
+ default :
codeStream.dup();
break;
}
@@ -135,7 +135,7 @@ public void fieldStore(Scope currentScope, CodeStream codeStream, FieldBinding f
case TypeIds.T_double :
codeStream.dup2_x1();
break;
- default :
+ default :
codeStream.dup_x1();
break;
}
@@ -156,8 +156,8 @@ public abstract void generateCompoundAssignment(BlockScope currentScope, CodeStr
public abstract void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired);
-/**
- * Is the given reference equivalent to the receiver,
+/**
+ * Is the given reference equivalent to the receiver,
* meaning that both denote the same path of field reads?
* Used from {@link FlowContext#isNullcheckedFieldAccess(Reference)}.
*/
@@ -205,7 +205,7 @@ void reportOnlyUselesslyReadPrivateField(BlockScope currentScope, FieldBinding f
if (fieldBinding.isUsedOnlyInCompound()) {
fieldBinding.compoundUseFlag--; // consume one
if (fieldBinding.compoundUseFlag == 0 // report only the last usage
- && fieldBinding.isOrEnclosedByPrivateType()
+ && fieldBinding.isOrEnclosedByPrivateType()
&& (this.implicitConversion & TypeIds.UNBOXING) == 0) // don't report if unboxing is involved (might cause NPE)
{
// compoundAssignment/postIncrement is the only usage of this field
@@ -240,14 +240,14 @@ static void reportOnlyUselesslyReadLocal(BlockScope currentScope, LocalVariableB
MethodScope methodScope = currentScope.methodScope();
if (methodScope != null && !methodScope.isLambdaScope()) { // lambda must be congruent with the descriptor.
MethodBinding method = ((AbstractMethodDeclaration)methodScope.referenceContext()).binding;
-
+
boolean shouldReport = !method.isMain();
if (method.isImplementing()) {
shouldReport &= currentScope.compilerOptions().reportUnusedParameterWhenImplementingAbstract;
} else if (method.isOverriding()) {
shouldReport &= currentScope.compilerOptions().reportUnusedParameterWhenOverridingConcrete;
}
-
+
if (shouldReport) {
// report the case of an argument that is unread except through a special operator
currentScope.problemReporter().unusedArgument(localBinding.declaration);
@@ -281,8 +281,8 @@ protected int getDepthForSynthFieldAccess(FieldBinding fieldBinding, SourceTypeB
}
return depth;
}
-/**
- * If this reference is an inferred call to a c-t-f to static, synthetic args (int,Team) must be generated.
+/**
+ * If this reference is an inferred call to a c-t-f to static, synthetic args (int,Team) must be generated.
* @return true if synthetic args have been generated
*/
protected boolean checkGeneratedSynthArgsForFieldAccess(MethodBinding[] accessors, CodeStream codeStream, BlockScope scope) {

Back to the top