Skip to content

Commit 0644d4c

Browse files
cushongoogle-java-format Team
authored and
google-java-format Team
committed
Make the -add-exports= passed to g-j-f consistent
PiperOrigin-RevId: 513589436
1 parent 84b2c9a commit 0644d4c

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ following JVM flags are required when running on JDK 16 and newer, due to
9595

9696
```
9797
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
98+
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
9899
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
99100
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
100101
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED

core/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,12 @@
102102
<link>https://docs.oracle.com/en/java/javase/11/docs/api</link>
103103
</links>
104104
<additionalJOptions>
105+
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
106+
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
105107
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
106-
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
107108
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
108109
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
109110
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
110-
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
111-
<additionalJOption>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED,com.google.googlejavaformat</additionalJOption>
112111
</additionalJOptions>
113112
</configuration>
114113
<executions>

core/src/test/java/com/google/googlejavaformat/java/MainTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,12 @@ public class MainTest {
5454

5555
private static final ImmutableList<String> ADD_EXPORTS =
5656
ImmutableList.of(
57+
"--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
58+
"--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
5759
"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
58-
"--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
5960
"--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
6061
"--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
61-
"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
62-
"--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
63-
"--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED");
62+
"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED");
6463

6564
@Test
6665
public void testUsageOutput() {

pom.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,12 @@
235235
<manifestEntries>
236236
<Add-Exports><!--
237237
-->jdk.compiler/com.sun.tools.javac.api <!--
238+
-->jdk.compiler/com.sun.tools.javac.code <!--
238239
-->jdk.compiler/com.sun.tools.javac.file <!--
239-
-->jdk.compiler/com.sun.tools.javac.main <!--
240-
-->jdk.compiler/com.sun.tools.javac.model <!--
241240
-->jdk.compiler/com.sun.tools.javac.parser <!--
242-
-->jdk.compiler/com.sun.tools.javac.processing <!--
243241
-->jdk.compiler/com.sun.tools.javac.tree <!--
244242
-->jdk.compiler/com.sun.tools.javac.util<!--
245243
--></Add-Exports>
246-
<Add-Opens>jdk.compiler/com.sun.tools.javac.code jdk.compiler/com.sun.tools.javac.comp</Add-Opens>
247244
</manifestEntries>
248245
</archive>
249246
</configuration>

0 commit comments

Comments
 (0)