JDK 10 RFR of JDK-8173595: Update TestSourceVersion once VERSION_MAJOR is updated to 10

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

JDK 10 RFR of JDK-8173595: Update TestSourceVersion once VERSION_MAJOR is updated to 10

joe darcy
Hello,

Now that VERSION_MAJOR has been updated to 10 (JDK-8029942), the test

     tools/javac/processing/model/TestSourceVersion.java

should be updated in its testing of SourceVersion.latestSupported().
Patch below.

Thanks,

-Joe

--- a/test/tools/javac/processing/model/TestSourceVersion.java Fri Jan
27 16:22:08 2017 -0800
+++ b/test/tools/javac/processing/model/TestSourceVersion.java Fri Feb
03 00:15:13 2017 -0800
@@ -45,7 +45,7 @@

      private static void testLatestSupported() {
          if (SourceVersion.latest() != RELEASE_10 ||
-            SourceVersion.latestSupported() != RELEASE_9)
+            SourceVersion.latestSupported() != RELEASE_10)
              throw new RuntimeException("Unexpected release value(s)
found:\n" +
                                         "latest:\t" +
SourceVersion.latest() + "\n" +
                                         "latestSupported:\t" +
SourceVersion.latestSupported());

Reply | Threaded
Open this post in threaded view
|

Re: JDK 10 RFR of JDK-8173595: Update TestSourceVersion once VERSION_MAJOR is updated to 10

David Holmes
Looks good.

I think there will be a few things like this that need updating. We
already found one internal hotspot test that used version 10 as an
invalid version :)

Thanks,
David

On 3/02/2017 6:15 PM, joe darcy wrote:

> Hello,
>
> Now that VERSION_MAJOR has been updated to 10 (JDK-8029942), the test
>
>     tools/javac/processing/model/TestSourceVersion.java
>
> should be updated in its testing of SourceVersion.latestSupported().
> Patch below.
>
> Thanks,
>
> -Joe
>
> --- a/test/tools/javac/processing/model/TestSourceVersion.java Fri Jan
> 27 16:22:08 2017 -0800
> +++ b/test/tools/javac/processing/model/TestSourceVersion.java Fri Feb
> 03 00:15:13 2017 -0800
> @@ -45,7 +45,7 @@
>
>      private static void testLatestSupported() {
>          if (SourceVersion.latest() != RELEASE_10 ||
> -            SourceVersion.latestSupported() != RELEASE_9)
> +            SourceVersion.latestSupported() != RELEASE_10)
>              throw new RuntimeException("Unexpected release value(s)
> found:\n" +
>                                         "latest:\t" +
> SourceVersion.latest() + "\n" +
>                                         "latestSupported:\t" +
> SourceVersion.latestSupported());
>
Reply | Threaded
Open this post in threaded view
|

Re: JDK 10 RFR of JDK-8173595: Update TestSourceVersion once VERSION_MAJOR is updated to 10

joe darcy
On 2/3/2017 3:35 AM, David Holmes wrote:
> Looks good.
>
> I think there will be a few things like this that need updating. We
> already found one internal hotspot test that used version 10 as an
> invalid version :)

Yep; I'll be sending out reviews for a few similar issues over in
core-libs and security libs. A bit short-sighted for some new tests in
libs written in 9 to use 10 as an invalid version ;-)

-Joe