File tree Expand file tree Collapse file tree
main/java/com/uber/nullaway/generics
test/java/com/uber/nullaway/jspecify Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,11 +23,6 @@ public final class JSpecifyJavacConfig {
2323
2424 private JSpecifyJavacConfig () {}
2525
26- /** Returns the compiler arguments required to enable JSpecify mode in tests. */
27- public static List <String > jspecifyModeArgs () {
28- return JSPECIFY_MODE_ARGS ;
29- }
30-
3126 /**
3227 * Returns a copy of {@code args} with the JSpecify-specific compiler arguments appended.
3328 *
Original file line number Diff line number Diff line change 11package com .uber .nullaway .jspecify ;
22
3+ import com .google .common .collect .ImmutableList ;
34import com .google .errorprone .BugCheckerRefactoringTestHelper ;
45import com .uber .nullaway .NullAway ;
56import com .uber .nullaway .generics .JSpecifyJavacConfig ;
67import java .io .IOException ;
7- import java .util .ArrayList ;
88import java .util .List ;
99import org .junit .Rule ;
1010import org .junit .Test ;
@@ -17,21 +17,14 @@ public class SuggestedFixesTests {
1717
1818 private BugCheckerRefactoringTestHelper makeTestHelper () {
1919 List <String > args =
20- new ArrayList <> (
20+ JSpecifyJavacConfig . withJSpecifyModeArgs (
2121 List .of (
2222 "-d" ,
2323 temporaryFolder .getRoot ().getAbsolutePath (),
24- "-processorpath" ,
25- SuggestedFixesTests .class
26- .getProtectionDomain ()
27- .getCodeSource ()
28- .getLocation ()
29- .getPath (),
30- "-XepOpt:NullAway:AnnotatedPackages=com.uber" ));
31- args .addAll (JSpecifyJavacConfig .jspecifyModeArgs ());
32- args .add ("-XepOpt:NullAway:SuggestSuppressions=true" );
24+ "-XepOpt:NullAway:AnnotatedPackages=com.uber" ,
25+ "-XepOpt:NullAway:SuggestSuppressions=true" ));
3326 return BugCheckerRefactoringTestHelper .newInstance (NullAway .class , getClass ())
34- .setArgs (args . toArray ( new String [ 0 ] ));
27+ .setArgs (ImmutableList . copyOf ( args ));
3528 }
3629
3730 @ Test
You can’t perform that action at this time.
0 commit comments