diff --git a/pom.xml b/pom.xml
index d10f269e4a0..dd1f9275483 100644
--- a/pom.xml
+++ b/pom.xml
@@ -305,6 +305,10 @@
false
1
${testcase.groups.excluded}
+
+ --add-opens=java.base/java.lang=ALL-UNNAMED
+ --add-opens=java.base/java.util=ALL-UNNAMED
+
@@ -319,10 +323,6 @@
false
false
1
-
- --add-opens=java.base/java.lang=ALL-UNNAMED
- --add-opens=java.base/java.util=ALL-UNNAMED
-