Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: google/google-java-format
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.33.0
Choose a base ref
...
head repository: google/google-java-format
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.34.1
Choose a head ref
  • 9 commits
  • 16 files changed
  • 3 contributors

Commits on Dec 6, 2025

  1. Internal change

    PiperOrigin-RevId: 841130473
    cushon authored and google-java-format Team committed Dec 6, 2025
    Configuration menu
    Copy the full SHA
    f5f92bf View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2025

  1. Consolidate uses of javac's parser in google-java-format

    PiperOrigin-RevId: 843691248
    cushon authored and google-java-format Team committed Dec 12, 2025
    Configuration menu
    Copy the full SHA
    4b4d087 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2026

  1. Support Instance Main Methods in google-java-format

    #1216
    
    PiperOrigin-RevId: 858436442
    cushon authored and google-java-format Team committed Jan 20, 2026
    Configuration menu
    Copy the full SHA
    737b003 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2026

  1. Remove workaround for https://bugs.openjdk.org/browse/JDK-8027682

    The bug was fixed in JDK 21, and google-java-format no longer supports earlier versions
    
    The corresponding tests were removed in 18f8358
    
    PiperOrigin-RevId: 861709714
    cushon authored and google-java-format Team committed Jan 27, 2026
    Configuration menu
    Copy the full SHA
    62edae4 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2026

  1. Prepare for end position API changes in https://bugs.openjdk.org/brow…

    …se/JDK-8372948
    
    PiperOrigin-RevId: 862686243
    cushon authored and google-java-format Team committed Jan 29, 2026
    Configuration menu
    Copy the full SHA
    4a15b1b View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2026

  1. Fix index of keepEndPos parameter

    PiperOrigin-RevId: 864745710
    cushon authored and google-java-format Team committed Feb 3, 2026
    Configuration menu
    Copy the full SHA
    9b97973 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2026

  1. Update workaround for JDK-8372948

    The upstream change is removing the overload of `newParser`.
    
    PiperOrigin-RevId: 865273867
    cushon authored and google-java-format Team committed Feb 4, 2026
    Configuration menu
    Copy the full SHA
    f0a9748 View commit details
    Browse the repository at this point in the history
  2. Fix reflection errors during native execution

    Hi, after updating to the new version 1.34.0 I'm receiving this error running the native binary:
    
    ```
    error: no such method: com.sun.tools.javac.tree.JCTree.getEndPosition(EndPosTable)int/invokeVirtual
    java.lang.LinkageError: no such method: com.sun.tools.javac.tree.JCTree.getEndPosition(EndPosTable)int/invokeVirtual
            at com.google.googlejavaformat.java.Trees.getEndPosMethodHandle(Trees.java:278)
            at com.google.googlejavaformat.java.Trees.<clinit>(Trees.java:251)
            at com.google.googlejavaformat.java.Formatter.format(Formatter.java:104)
            at com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:214)
            at com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:188)
            at com.google.googlejavaformat.java.FormatFileCallable.call(FormatFileCallable.java:75)
            at com.google.googlejavaformat.java.FormatFileCallable.call(FormatFileCallable.java:29)
            at java.base@25.0.2/java.util.concurrent.FutureTask.run(FutureTask.java:328)
            at java.base@25.0.2/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
            at java.base@25.0.2/java.util.concurrent.FutureTask.run(FutureTask.java:328)
            at java.base@25.0.2/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
            at java.base@25.0.2/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
            at java.base@25.0.2/java.lang.Thread.runWith(Thread.java:1487)
            at java.base@25.0.2/java.lang.Thread.run(Thread.java:1474)
            at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:832)
            at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:808)
    Caused by: java.lang.NoSuchMethodException: no such method: com.sun.tools.javac.tree.JCTree.getEndPosition(EndPosTable)int/invokeVirtual
            at java.base@25.0.2/java.lang.invoke.MemberName.makeAccessException(MemberName.java:910)
            at java.base@25.0.2/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:989)
            at java.base@25.0.2/java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3591)
            at java.base@25.0.2/java.lang.invoke.MethodHandles$Lookup.findVirtual(MethodHandles.java:2610)
            at com.google.googlejavaformat.java.Trees.getEndPosMethodHandle(Trees.java:269)
            ... 15 more
    Caused by: java.lang.NoSuchMethodError: com.sun.tools.javac.tree.JCTree.getEndPosition(com.sun.tools.javac.tree.EndPosTable)
            at org.graalvm.nativeimage.builder/com.oracle.svm.core.methodhandles.Util_java_lang_invoke_MethodHandleNatives.resolve(Target_java_lang_invoke_MethodHandleNatives.java:352)
            at java.base@25.0.2/java.lang.invoke.MethodHandleNatives.resolve(MethodHandleNatives.java:208)
            at java.base@25.0.2/java.lang.invoke.MemberName$Factory.resolve(MemberName.java:120)
            at java.base@25.0.2/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:986)
            ... 18 more
    
    ```
    
    It's caused by 4a15b1b that introduced new reflection invocations that the native build process isn't able to pick up.
    Following [this guide](https://www.graalvm.org/latest/reference-manual/native-image/metadata/AutomaticMetadataCollection/) I generated an updated config file to fix the problem. The config file name changed in Graal 23, but it's only used during build time so it shouldn't matter that much.
    
    With this fix everything works fine (at least for my case 😁).
    
    Fixes #1327
    
    COPYBARA_INTEGRATE_REVIEW=#1327 from EvaristeGalois11:fix-graalvm 6bdd7cd
    PiperOrigin-RevId: 865501302
    EvaristeGalois11 authored and google-java-format Team committed Feb 4, 2026
    Configuration menu
    Copy the full SHA
    ff157e3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64ee627 View commit details
    Browse the repository at this point in the history
Loading