Skip to content

Commit

Permalink
Update deprecation assertions in samples
Browse files Browse the repository at this point in the history
So that they are compatible with Java 8.
On Java 8, calling ((JavacTask) delegate).getElements() in the IncrementalCompileTask of the incremental compiler plugin, somehow
makes the the deprecation messages print the class names with their fully qualified names, in this case - com.example.Foo.
  • Loading branch information
rieske committed Feb 10, 2021
1 parent ef5a115 commit b04b5ab
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ class JavaConventionPluginTest extends PluginTest {

then:
result.task(":build").outcome == TaskOutcome.SUCCESS
result.output.contains('warning: [deprecation] deprecatedMethod() in Foo has been deprecated')
result.output.contains('warning: [deprecation] deprecatedMethod()')
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ class JavaConventionPluginTest : PluginTest() {
val result = runTask("build")

assertEquals(TaskOutcome.SUCCESS, result.task(":build")?.outcome)
assertTrue(result.output.contains("warning: [deprecation] deprecatedMethod() in Foo has been deprecated"))
assertTrue(result.output.contains("warning: [deprecation] deprecatedMethod()"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ class JavaConventionPluginTest extends PluginTest {

then:
result.task(":build").outcome == TaskOutcome.SUCCESS
result.output.contains('warning: [deprecation] deprecatedMethod() in Foo has been deprecated')
result.output.contains('warning: [deprecation] deprecatedMethod()')
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ class JavaConventionPluginTest : PluginTest() {
val result = runTask("build")

assertEquals(TaskOutcome.SUCCESS, result.task(":build")?.outcome)
assertTrue(result.output.contains("warning: [deprecation] deprecatedMethod() in Foo has been deprecated"))
assertTrue(result.output.contains("warning: [deprecation] deprecatedMethod()"))
}
}

0 comments on commit b04b5ab

Please sign in to comment.