@@ -997,6 +997,7 @@ private TypeWithDims variableFragmentDims(boolean first, int leadingDims, Tree t
997997 null , leadingDims > 0 ? dims .dims .subList (0 , dims .dims .size () - leadingDims ) : dims .dims );
998998 }
999999
1000+ @ SuppressWarnings ("for-rollout:NullAway" )
10001001 @ Override
10011002 public Void visitForLoop (ForLoopTree node , Void unused ) {
10021003 sync (node );
@@ -1622,6 +1623,7 @@ private static List<Long> handleStream(List<ExpressionTree> parts) {
16221623 .collect (toList ());
16231624 }
16241625
1626+ @ SuppressWarnings ("for-rollout:NullAway" )
16251627 private static <T > Stream <Long > indexes (Stream <T > stream , Predicate <T > predicate ) {
16261628 return Streams .mapWithIndex (stream , (x , i ) -> predicate .apply (x ) ? i : -1 )
16271629 .filter (x -> x != -1 );
@@ -1802,6 +1804,7 @@ public Void visitReturn(ReturnTree node, Void unused) {
18021804 }
18031805
18041806 // TODO(cushon): is this worth special-casing?
1807+ @ SuppressWarnings ("for-rollout:NullAway" )
18051808 boolean visitSingleMemberAnnotation (AnnotationTree node ) {
18061809 if (node .getArguments ().size () != 1 ) {
18071810 return false ;
@@ -2172,6 +2175,7 @@ private void visitStatement(
21722175 }
21732176 }
21742177
2178+ @ SuppressWarnings ("for-rollout:NullAway" )
21752179 protected void visitStatements (List <? extends StatementTree > statements , boolean inlineFirst ) {
21762180 boolean first = true ;
21772181 PeekingIterator <StatementTree > it = Iterators .peekingIterator (statements .iterator ());
@@ -2186,6 +2190,7 @@ protected void visitStatements(List<? extends StatementTree> statements, boolean
21862190 }
21872191 markForPartialFormat ();
21882192 first = false ;
2193+ @ SuppressWarnings ("for-rollout:NullAway" )
21892194 List <VariableTree > fragments = variableFragments (it , tree );
21902195 if (!fragments .isEmpty ()) {
21912196 visitVariables (
@@ -2820,6 +2825,7 @@ private void visitRegularDot(List<ExpressionTree> items, boolean needDot) {
28202825 // .happens())
28212826 // .thenReturn(result);
28222827 //
2828+ @ SuppressWarnings ("for-rollout:NullAway" )
28232829 private boolean fillFirstArgument (ExpressionTree e , List <ExpressionTree > items , Indent indent ) {
28242830 // is there a trailing dereference?
28252831 if (items .size () < 2 ) {
@@ -2860,6 +2866,7 @@ private boolean fillFirstArgument(ExpressionTree e, List<ExpressionTree> items,
28602866 private void visitDotWithPrefix (
28612867 List <ExpressionTree > items , boolean needDot , Collection <Integer > prefixes , FillMode prefixFillMode ) {
28622868 // Are there method invocations or field accesses after the prefix?
2869+ @ SuppressWarnings ("for-rollout:NullAway" )
28632870 boolean trailingDereferences = !prefixes .isEmpty () && getLast (prefixes ) < items .size () - 1 ;
28642871
28652872 boolean hasMethodInvocations = items .stream ().anyMatch (expr -> expr .getKind () == METHOD_INVOCATION );
@@ -3253,12 +3260,14 @@ public void scan(JCTree tree) {
32533260 }
32543261
32553262 /** Returns the number of columns if the arguments arg laid out in a grid, or else {@code -1}. */
3263+ @ SuppressWarnings ("for-rollout:NullAway" )
32563264 private int argumentsAreTabular (List <? extends ExpressionTree > arguments ) {
32573265 if (arguments .isEmpty ()) {
32583266 return -1 ;
32593267 }
32603268 List <List <ExpressionTree >> rows = new ArrayList <>();
32613269 PeekingIterator <ExpressionTree > it = Iterators .peekingIterator (arguments .iterator ());
3270+ @ SuppressWarnings ("for-rollout:NullAway" )
32623271 int start0 = actualColumn (it .peek ());
32633272 {
32643273 List <ExpressionTree > row = new ArrayList <>();
@@ -3276,6 +3285,7 @@ private int argumentsAreTabular(List<? extends ExpressionTree> arguments) {
32763285 }
32773286 while (it .hasNext ()) {
32783287 List <ExpressionTree > row = new ArrayList <>();
3288+ @ SuppressWarnings ("for-rollout:NullAway" )
32793289 int start = actualColumn (it .peek ());
32803290 if (start != start0 ) {
32813291 return -1 ;
@@ -3338,6 +3348,7 @@ private Integer actualColumn(ExpressionTree expression) {
33383348 }
33393349
33403350 /** How many lines does this node take up in the input. Returns at least 1. */
3351+ @ SuppressWarnings ("for-rollout:NullAway" )
33413352 int lineSpan (Tree node ) {
33423353 ImmutableRangeMap <Integer , ? extends Input .Token > positionTokenMap =
33433354 builder .getInput ().getPositionTokenMap ();
@@ -3646,6 +3657,7 @@ protected void addBodyDeclarations(
36463657 Tree bodyDeclaration = it .next ();
36473658 dropEmptyDeclarations ();
36483659 builder .forcedBreak ();
3660+ @ SuppressWarnings ("for-rollout:NullAway" )
36493661 boolean thisOneGetsBlankLineBefore =
36503662 bodyDeclaration .getKind () != VARIABLE || hasJavaDoc (bodyDeclaration );
36513663 if (first ) {
@@ -3712,6 +3724,7 @@ private void classDeclarationTypeList(String token, List<? extends Tree> types)
37123724 *
37133725 * <p>e.g. {@code int x, y;} is parsed as {@code int x; int y;}.
37143726 */
3727+ @ SuppressWarnings ("for-rollout:NullAway" )
37153728 private List <VariableTree > variableFragments (PeekingIterator <? extends Tree > it , Tree first ) {
37163729 List <VariableTree > fragments = new ArrayList <>();
37173730 if (first .getKind () == VARIABLE ) {
@@ -3748,6 +3761,7 @@ private boolean hasTrailingToken(Input input, List<? extends Tree> nodes, String
37483761 return false ;
37493762 }
37503763 Tree lastNode = getLast (nodes );
3764+ @ SuppressWarnings ("for-rollout:NullAway" )
37513765 Optional <? extends Input .Token > nextToken = getNextToken (input , getEndPosition (lastNode , getCurrentPath ()));
37523766 return nextToken .isPresent () && nextToken .get ().getTok ().getText ().equals (token );
37533767 }
0 commit comments