RFR: 8244146: javac changes for JEP 306

Jan Lahoda jlahoda at openjdk.java.net
Wed May 5 11:07:52 UTC 2021


On Sat, 1 May 2021 23:00:05 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> 8244146: javac changes for JEP 306

src/jdk.jshell/share/classes/jdk/jshell/TaskFactory.java line 170:

> 168: 
> 169:         allOptions.add("--should-stop=at=FLOW");
> 170:         allOptions.add("-Xlint:unchecked,-strictfp");

I wonder if JShell should also print the `strictfp` warnings, so that the users would learn about this change. If needed, it should be possible to disable this, I think, possibly like:

diff --git a/test/langtools/jdk/jshell/ClassesTest.java b/test/langtools/jdk/jshell/ClassesTest.java
index 082d757b02f..b0b8156e359 100644
--- a/test/langtools/jdk/jshell/ClassesTest.java
+++ b/test/langtools/jdk/jshell/ClassesTest.java
@@ -342,4 +342,9 @@ public class ClassesTest extends KullaTesting {
         assertEval("new A()");
     }
 
+    @Override
+    public void setUp() {
+        setUp(bc -> bc.compilerOptions("-Xlint:-strictfp"));
+    }
+
 }

-------------

PR: https://git.openjdk.java.net/jdk/pull/3831


More information about the core-libs-dev mailing list