Skip to content

Commit d210933

Browse files
committed
revert unrelated changes
1 parent e4b4213 commit d210933

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/checkers/inference/InferenceVisitor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,7 @@ public boolean maybeAddRefinementVariableConstraints(final AnnotatedTypeMirror v
664664
logger.fine("InferenceVisitor::commonAssignmentCheck: Equality constraint for qualifiers sub: " + sub + " sup: " + sup);
665665

666666
// Equality between the refvar and the value
667-
if (sub != null) {
668-
constraintManager.addEqualityConstraint(sup, sub);
669-
}
667+
constraintManager.addEqualityConstraint(sup, sub);
670668

671669
// Refinement variable still needs to be a subtype of its declared type value
672670
constraintManager.addSubtypeConstraint(sup,

src/checkers/inference/VariableAnnotator.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,11 +1105,8 @@ private void annotateNewArray(AnnotatedTypeMirror type, Tree tree, int level, Tr
11051105

11061106
// Create a variable from an ASTPath
11071107
final TreePath pathToTree = inferenceTypeFactory.getPath(topLevelTree);
1108-
ASTRecord astRec = ASTPathUtil.getASTRecordForPath(inferenceTypeFactory, pathToTree);
1109-
if (astRec != null) {
1110-
astRec = astRec.newArrayLevel(level);
1111-
replaceOrCreateEquivalentVarAnno(type, tree, new AstPathLocation(astRec));
1112-
}
1108+
ASTRecord astRec = ASTPathUtil.getASTRecordForPath(inferenceTypeFactory, pathToTree).newArrayLevel(level);;
1109+
replaceOrCreateEquivalentVarAnno(type, tree, new AstPathLocation(astRec));
11131110

11141111
} else if (!(tree.getKind() == Tree.Kind.NEW_ARRAY
11151112
|| tree.getKind() == Tree.Kind.ARRAY_TYPE)) {

0 commit comments

Comments
 (0)