@@ -136,7 +136,7 @@ public T useModules(String... modules) {
136
136
*/
137
137
public CompileMessageCheckBuilder <T > expectErrorMessage () {
138
138
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
139
- return new CompileMessageCheckBuilder <T >(createNextInstance (nextConfiguration ), Diagnostic .Kind .ERROR );
139
+ return new CompileMessageCheckBuilder <>(createNextInstance (nextConfiguration ), Diagnostic .Kind .ERROR );
140
140
}
141
141
142
142
/**
@@ -146,7 +146,7 @@ public CompileMessageCheckBuilder<T> expectErrorMessage() {
146
146
*/
147
147
public CompileMessageCheckBuilder <T > expectMandatoryWarningMessage () {
148
148
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
149
- return new CompileMessageCheckBuilder <T >(createNextInstance (nextConfiguration ), Diagnostic .Kind .MANDATORY_WARNING );
149
+ return new CompileMessageCheckBuilder <>(createNextInstance (nextConfiguration ), Diagnostic .Kind .MANDATORY_WARNING );
150
150
}
151
151
152
152
/**
@@ -156,7 +156,7 @@ public CompileMessageCheckBuilder<T> expectMandatoryWarningMessage() {
156
156
*/
157
157
public CompileMessageCheckBuilder <T > expectWarningMessage () {
158
158
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
159
- return new CompileMessageCheckBuilder <T >(createNextInstance (nextConfiguration ), Diagnostic .Kind .WARNING );
159
+ return new CompileMessageCheckBuilder <>(createNextInstance (nextConfiguration ), Diagnostic .Kind .WARNING );
160
160
}
161
161
162
162
/**
@@ -166,7 +166,7 @@ public CompileMessageCheckBuilder<T> expectWarningMessage() {
166
166
*/
167
167
public CompileMessageCheckBuilder <T > expectNoteMessage () {
168
168
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
169
- return new CompileMessageCheckBuilder <T >(createNextInstance (nextConfiguration ), Diagnostic .Kind .NOTE );
169
+ return new CompileMessageCheckBuilder <>(createNextInstance (nextConfiguration ), Diagnostic .Kind .NOTE );
170
170
}
171
171
172
172
/**
@@ -178,7 +178,7 @@ public CompileMessageCheckBuilder<T> expectNoteMessage() {
178
178
public T expectWarningMessageThatContains (String ... warningChecks ) {
179
179
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
180
180
if (warningChecks != null ) {
181
- nextConfiguration .addWarningMessageCheck (CompileTestConfiguration .ComparisionKind .CONTAINS , warningChecks );
181
+ nextConfiguration .addWarningMessageCheck (CompileTestConfiguration .ComparisonKind .CONTAINS , warningChecks );
182
182
}
183
183
return createNextInstance (nextConfiguration );
184
184
@@ -194,7 +194,7 @@ public T expectMandatoryWarningMessageThatContains(String... mandatoryWarningChe
194
194
195
195
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
196
196
if (mandatoryWarningChecks != null ) {
197
- nextConfiguration .addMandatoryWarningMessageCheck (CompileTestConfiguration .ComparisionKind .CONTAINS , mandatoryWarningChecks );
197
+ nextConfiguration .addMandatoryWarningMessageCheck (CompileTestConfiguration .ComparisonKind .CONTAINS , mandatoryWarningChecks );
198
198
}
199
199
return createNextInstance (nextConfiguration );
200
200
@@ -210,7 +210,7 @@ public T expectErrorMessageThatContains(String... errorChecksToSet) {
210
210
211
211
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
212
212
if (errorChecksToSet != null ) {
213
- nextConfiguration .addErrorMessageCheck (CompileTestConfiguration .ComparisionKind .CONTAINS , errorChecksToSet );
213
+ nextConfiguration .addErrorMessageCheck (CompileTestConfiguration .ComparisonKind .CONTAINS , errorChecksToSet );
214
214
}
215
215
return createNextInstance (nextConfiguration );
216
216
@@ -226,7 +226,7 @@ public T expectNoteMessageThatContains(String... noteChecksToSet) {
226
226
227
227
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
228
228
if (noteChecksToSet != null ) {
229
- nextConfiguration .addNoteMessageCheck (CompileTestConfiguration .ComparisionKind .CONTAINS , noteChecksToSet );
229
+ nextConfiguration .addNoteMessageCheck (CompileTestConfiguration .ComparisonKind .CONTAINS , noteChecksToSet );
230
230
}
231
231
return createNextInstance (nextConfiguration );
232
232
@@ -323,7 +323,6 @@ public T expectThatFileObjectExists(
323
323
* @param generatedFileObjectMatcher the matcher to use
324
324
* @return the next builder instance
325
325
*/
326
- @ SafeVarargs
327
326
public final T expectThatFileObjectExists (
328
327
JavaFileManager .Location location ,
329
328
String packageName ,
@@ -351,7 +350,7 @@ public T expectThatFileObjectDoesntExist(
351
350
String relativeName ) {
352
351
353
352
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
354
- nextConfiguration .addGeneratedFileObjectCheck (CompileTestConfiguration .FileObjectCheckType .DOESNT_EXIST , location , packageName , relativeName , null );
353
+ nextConfiguration .addGeneratedFileObjectCheck (CompileTestConfiguration .FileObjectCheckType .DOESNT_EXIST , location , packageName , relativeName );
355
354
return createNextInstance (nextConfiguration );
356
355
357
356
}
@@ -712,7 +711,7 @@ public <ELEMENT_TYPE extends Element> UnitTestBuilder defineTest(Class<? extends
712
711
713
712
// remove existing processor
714
713
nextConfiguration .getProcessors ().clear ();
715
- nextConfiguration .addProcessors (new UnitTestAnnotationProcessorClass <ELEMENT_TYPE >(customAnnotationType , unitTest ));
714
+ nextConfiguration .addProcessors (new UnitTestAnnotationProcessorClass <>(customAnnotationType , unitTest ));
716
715
717
716
return createNextInstance (nextConfiguration );
718
717
}
@@ -768,7 +767,7 @@ public <ELEMENT_TYPE extends Element> UnitTestBuilder defineTestWithPassedInElem
768
767
769
768
// remove existing processor
770
769
nextConfiguration .getProcessors ().clear ();
771
- nextConfiguration .addProcessors (new UnitTestAnnotationProcessorClassWithPassIn <ELEMENT_TYPE >(classToScan , annotationToSearch != null ? annotationToSearch : PassIn .class , unitTest ));
770
+ nextConfiguration .addProcessors (new UnitTestAnnotationProcessorClassWithPassIn <>(classToScan , annotationToSearch != null ? annotationToSearch : PassIn .class , unitTest ));
772
771
773
772
return createNextInstance (nextConfiguration );
774
773
}
@@ -827,7 +826,7 @@ public <PROCESSOR_UNDER_TEST extends Processor, ELEMENT_TYPE extends Element> Un
827
826
828
827
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
829
828
830
- PROCESSOR_UNDER_TEST processorUnderTest = null ;
829
+ PROCESSOR_UNDER_TEST processorUnderTest ;
831
830
832
831
try {
833
832
processorUnderTest = processorUnderTestClass .getDeclaredConstructor ().newInstance ();
@@ -838,7 +837,7 @@ public <PROCESSOR_UNDER_TEST extends Processor, ELEMENT_TYPE extends Element> Un
838
837
839
838
// remove existing processor
840
839
nextConfiguration .getProcessors ().clear ();
841
- nextConfiguration .addProcessors (new UnitTestAnnotationProcessorClassForTestingAnnotationProcessors <PROCESSOR_UNDER_TEST , ELEMENT_TYPE >(processorUnderTest , customAnnotationType , unitTestForTestingAnnotationProcessors ));
840
+ nextConfiguration .addProcessors (new UnitTestAnnotationProcessorClassForTestingAnnotationProcessors <>(processorUnderTest , customAnnotationType , unitTestForTestingAnnotationProcessors ));
842
841
843
842
return createNextInstance (nextConfiguration );
844
843
}
@@ -888,7 +887,7 @@ public <PROCESSOR_UNDER_TEST extends Processor, ELEMENT_TYPE extends Element> Un
888
887
889
888
CompileTestConfiguration nextConfiguration = CompileTestConfiguration .cloneConfiguration (compileTestConfiguration );
890
889
891
- PROCESSOR_UNDER_TEST processorUnderTest = null ;
890
+ PROCESSOR_UNDER_TEST processorUnderTest ;
892
891
893
892
try {
894
893
processorUnderTest = processorUnderTestClass .getDeclaredConstructor ().newInstance ();
@@ -1010,7 +1009,7 @@ public static class CompileMessageCheckBuilder<COMPILETESTBUILDER extends BasicB
1010
1009
private final COMPILETESTBUILDER compileTestBuilder ;
1011
1010
1012
1011
private Diagnostic .Kind kind ;
1013
- private CompileTestConfiguration .ComparisionKind comparisionKind ;
1012
+ private CompileTestConfiguration .ComparisonKind comparisonKind ;
1014
1013
private String expectedMessage ;
1015
1014
private Locale locale ;
1016
1015
private String source ;
@@ -1067,7 +1066,7 @@ public CompileMessageCheckBuilder<COMPILETESTBUILDER> withLocale(Locale locale)
1067
1066
/**
1068
1067
* Do check if compiler message is linked for a specific source
1069
1068
*
1070
- * @param source
1069
+ * @param source the source
1071
1070
* @return the next immutable builder instance
1072
1071
*/
1073
1072
public CompileMessageCheckBuilder <COMPILETESTBUILDER > atSource (String source ) {
@@ -1086,10 +1085,10 @@ public CompileMessageCheckBuilder<COMPILETESTBUILDER> atSource(String source) {
1086
1085
public COMPILETESTBUILDER thatContains (String expectedContainedMessageToken ) {
1087
1086
CompileMessageCheckBuilder <COMPILETESTBUILDER > nextBuilder = createNextBuilder ();
1088
1087
1089
- nextBuilder .comparisionKind = CompileTestConfiguration .ComparisionKind .CONTAINS ;
1088
+ nextBuilder .comparisonKind = CompileTestConfiguration .ComparisonKind .CONTAINS ;
1090
1089
nextBuilder .expectedMessage = expectedContainedMessageToken ;
1091
1090
1092
- CompileTestConfiguration .CompilerMessageCheck compilerMessageCheck = new CompileTestConfiguration .CompilerMessageCheck (nextBuilder .kind , nextBuilder .comparisionKind , nextBuilder .expectedMessage , nextBuilder .locale , nextBuilder .source , nextBuilder .lineNumber , nextBuilder .columnNumber );
1091
+ CompileTestConfiguration .CompilerMessageCheck compilerMessageCheck = new CompileTestConfiguration .CompilerMessageCheck (nextBuilder .kind , nextBuilder .comparisonKind , nextBuilder .expectedMessage , nextBuilder .locale , nextBuilder .source , nextBuilder .lineNumber , nextBuilder .columnNumber );
1093
1092
1094
1093
return compileTestBuilder .addCompilerMessageCheck (compilerMessageCheck );
1095
1094
}
@@ -1103,10 +1102,10 @@ public COMPILETESTBUILDER thatContains(String expectedContainedMessageToken) {
1103
1102
public COMPILETESTBUILDER thatIsEqualTo (String expectedMessage ) {
1104
1103
CompileMessageCheckBuilder <COMPILETESTBUILDER > nextBuilder = createNextBuilder ();
1105
1104
1106
- nextBuilder .comparisionKind = CompileTestConfiguration .ComparisionKind .EQUALS ;
1105
+ nextBuilder .comparisonKind = CompileTestConfiguration .ComparisonKind .EQUALS ;
1107
1106
nextBuilder .expectedMessage = expectedMessage ;
1108
1107
1109
- CompileTestConfiguration .CompilerMessageCheck compilerMessageCheck = new CompileTestConfiguration .CompilerMessageCheck (nextBuilder .kind , nextBuilder .comparisionKind , nextBuilder .expectedMessage , nextBuilder .locale , nextBuilder .source , nextBuilder .lineNumber , nextBuilder .columnNumber );
1108
+ CompileTestConfiguration .CompilerMessageCheck compilerMessageCheck = new CompileTestConfiguration .CompilerMessageCheck (nextBuilder .kind , nextBuilder .comparisonKind , nextBuilder .expectedMessage , nextBuilder .locale , nextBuilder .source , nextBuilder .lineNumber , nextBuilder .columnNumber );
1110
1109
1111
1110
return compileTestBuilder .addCompilerMessageCheck (compilerMessageCheck );
1112
1111
}
@@ -1122,7 +1121,7 @@ CompileMessageCheckBuilder<COMPILETESTBUILDER> createNextBuilder() {
1122
1121
CompileMessageCheckBuilder <COMPILETESTBUILDER > nextBuilder = new CompileMessageCheckBuilder <>(this .compileTestBuilder , this .kind );
1123
1122
1124
1123
nextBuilder .kind = this .kind ;
1125
- nextBuilder .comparisionKind = this .comparisionKind ;
1124
+ nextBuilder .comparisonKind = this .comparisonKind ;
1126
1125
nextBuilder .expectedMessage = this .expectedMessage ;
1127
1126
nextBuilder .locale = this .locale ;
1128
1127
nextBuilder .source = this .source ;
0 commit comments