|  | 
| 20 | 20 | import static dagger.internal.codegen.DaggerModuleMethodSubject.Factory.assertThatModuleMethod; | 
| 21 | 21 | import static java.lang.annotation.RetentionPolicy.RUNTIME; | 
| 22 | 22 | 
 | 
| 23 |  | -import androidx.room.compiler.processing.XProcessingEnv; | 
| 24 | 23 | import androidx.room.compiler.processing.util.Source; | 
| 25 | 24 | import com.google.common.collect.ImmutableList; | 
| 26 | 25 | import dagger.Module; | 
| @@ -253,27 +252,21 @@ public void bindsMissingTypeInParameterHierarchy() { | 
| 253 | 252 |                   subject.hasErrorCount(2); | 
| 254 | 253 |                   break; | 
| 255 | 254 |               } | 
| 256 |  | -              // TODO(b/248552462): Javac and KSP should match once this bug is fixed. | 
| 257 |  | -              boolean isJavac = CompilerTests.backend(subject) == XProcessingEnv.Backend.JAVAC; | 
| 258 | 255 |               subject.hasErrorContaining( | 
| 259 |  | -                  String.format( | 
| 260 |  | -                      "ModuleProcessingStep was unable to process 'test.TestModule' because '%s' " | 
| 261 |  | -                          + "could not be resolved.", | 
| 262 |  | -                      isJavac ? "MissingType" : "error.NonExistentClass")); | 
|  | 256 | +                  "ModuleProcessingStep was unable to process 'test.TestModule' because " | 
|  | 257 | +                      + "'MissingType' could not be resolved."); | 
| 263 | 258 |               subject.hasErrorContaining( | 
| 264 |  | -                  String.format( | 
| 265 |  | -                      "BindingMethodProcessingStep was unable to process" | 
| 266 |  | -                          + " 'bindObject(test.Child<java.lang.String>)' because '%1$s' could not " | 
| 267 |  | -                          + "be resolved." | 
| 268 |  | -                          + "\n  " | 
| 269 |  | -                          + "\n  Dependency trace:" | 
| 270 |  | -                          + "\n      => element (INTERFACE): test.TestModule" | 
| 271 |  | -                          + "\n      => element (METHOD): bindObject(test.Child<java.lang.String>)" | 
| 272 |  | -                          + "\n      => element (PARAMETER): child" | 
| 273 |  | -                          + "\n      => type (DECLARED parameter): test.Child<java.lang.String>" | 
| 274 |  | -                          + "\n      => type (DECLARED supertype): test.Parent<java.lang.String>" | 
| 275 |  | -                          + "\n      => type (ERROR supertype): %1$s", | 
| 276 |  | -                      isJavac ? "MissingType" : "error.NonExistentClass")); | 
|  | 259 | +                  "BindingMethodProcessingStep was unable to process " | 
|  | 260 | +                      + "'bindObject(test.Child<java.lang.String>)' because 'MissingType' could " | 
|  | 261 | +                      + "not be resolved." | 
|  | 262 | +                      + "\n  " | 
|  | 263 | +                      + "\n  Dependency trace:" | 
|  | 264 | +                      + "\n      => element (INTERFACE): test.TestModule" | 
|  | 265 | +                      + "\n      => element (METHOD): bindObject(test.Child<java.lang.String>)" | 
|  | 266 | +                      + "\n      => element (PARAMETER): child" | 
|  | 267 | +                      + "\n      => type (DECLARED parameter): test.Child<java.lang.String>" | 
|  | 268 | +                      + "\n      => type (DECLARED supertype): test.Parent<java.lang.String>" | 
|  | 269 | +                      + "\n      => type (ERROR supertype): MissingType"); | 
| 277 | 270 |             }); | 
| 278 | 271 |   } | 
| 279 | 272 | 
 | 
| @@ -319,26 +312,19 @@ public void bindsMissingTypeInReturnTypeHierarchy() { | 
| 319 | 312 |                   subject.hasErrorCount(2); | 
| 320 | 313 |                   break; | 
| 321 | 314 |               } | 
| 322 |  | -              // TODO(b/248552462): Javac and KSP should match once this bug is fixed. | 
| 323 |  | -              boolean isJavac = CompilerTests.backend(subject) == XProcessingEnv.Backend.JAVAC; | 
| 324 | 315 |               subject.hasErrorContaining( | 
| 325 |  | -                  String.format( | 
| 326 |  | -                      "ModuleProcessingStep was unable to process 'test.TestModule' because '%s' " | 
| 327 |  | -                          + "could not be resolved.", | 
| 328 |  | -                      isJavac ? "MissingType" : "error.NonExistentClass")); | 
|  | 316 | +                  "ModuleProcessingStep was unable to process 'test.TestModule' because " | 
|  | 317 | +                      + "'MissingType' could not be resolved."); | 
| 329 | 318 |               subject.hasErrorContaining( | 
| 330 |  | -                  String.format( | 
| 331 |  | -                      "BindingMethodProcessingStep was unable to process " | 
| 332 |  | -                          + "'bindChild(java.lang.String)' because '%1$s' could not be" | 
| 333 |  | -                          + " resolved." | 
| 334 |  | -                          + "\n  " | 
| 335 |  | -                          + "\n  Dependency trace:" | 
| 336 |  | -                          + "\n      => element (INTERFACE): test.TestModule" | 
| 337 |  | -                          + "\n      => element (METHOD): bindChild(java.lang.String)" | 
| 338 |  | -                          + "\n      => type (DECLARED return type): test.Child<java.lang.String>" | 
| 339 |  | -                          + "\n      => type (DECLARED supertype): test.Parent<java.lang.String>" | 
| 340 |  | -                          + "\n      => type (ERROR supertype): %1$s", | 
| 341 |  | -                      isJavac ? "MissingType" : "error.NonExistentClass")); | 
|  | 319 | +                  "BindingMethodProcessingStep was unable to process 'bindChild(java.lang.String)' " | 
|  | 320 | +                      + "because 'MissingType' could not be resolved." | 
|  | 321 | +                      + "\n  " | 
|  | 322 | +                      + "\n  Dependency trace:" | 
|  | 323 | +                      + "\n      => element (INTERFACE): test.TestModule" | 
|  | 324 | +                      + "\n      => element (METHOD): bindChild(java.lang.String)" | 
|  | 325 | +                      + "\n      => type (DECLARED return type): test.Child<java.lang.String>" | 
|  | 326 | +                      + "\n      => type (DECLARED supertype): test.Parent<java.lang.String>" | 
|  | 327 | +                      + "\n      => type (ERROR supertype): MissingType"); | 
| 342 | 328 |             }); | 
| 343 | 329 |   } | 
| 344 | 330 | 
 | 
|  | 
0 commit comments