Reformats Java source code to comply with Google Java Style.

Overview

google-java-format

google-java-format is a program that reformats Java source code to comply with Google Java Style.

Using the formatter

from the command-line

Download the formatter and run it with:

java -jar /path/to/google-java-format-1.13.0-all-deps.jar 
   
     [files...]

   

The formatter can act on whole files, on limited lines (--lines), on specific offsets (--offset), passing through to standard-out (default) or altered in-place (--replace).

To reformat changed lines in a specific patch, use google-java-format-diff.py.

Note: There is no configurability as to the formatter's algorithm for formatting. This is a deliberate design decision to unify our code formatting on a single format.

JDK 16

The following flags are required when running on JDK 16, due to JEP 396: Strongly Encapsulate JDK Internals by Default:

java \
  --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
  -jar google-java-format-1.13.0-all-deps.jar 
   
     [files...]

   

IntelliJ, Android Studio, and other JetBrains IDEs

A google-java-format IntelliJ plugin is available from the plugin repository. To install it, go to your IDE's settings and select the Plugins category. Click the Marketplace tab, search for the google-java-format plugin, and click the Install button.

The plugin will be disabled by default. To enable it in the current project, go to File→Settings...→google-java-format Settings (or IntelliJ IDEA→Preferences...→Other Settings→google-java-format Settings on macOS) and check the Enable google-java-format checkbox. (A notification will be presented when you first open a project offering to do this for you.)

To enable it by default in new projects, use File→Other Settings→Default Settings....

When enabled, it will replace the normal Reformat Code action, which can be triggered from the Code menu or with the Ctrl-Alt-L (by default) keyboard shortcut.

The import ordering is not handled by this plugin, unfortunately. To fix the import order, download the IntelliJ Java Google Style file and import it into File→Settings→Editor→Code Style.

Eclipse

Version 1.11 of the google-java-format Eclipse plugin can be downloaded from the releases page. Drop it into the Eclipse drop-ins folder to activate the plugin.

The plugin adds a google-java-format formatter implementation that can be configured in Window > Preferences > Java > Code Style > Formatter > Formatter Implementation.

Third-party integrations

as a library

The formatter can be used in software which generates java to output more legible java code. Just include the library in your maven/gradle/etc. configuration.

Maven

<dependency>
  <groupId>com.google.googlejavaformatgroupId>
  <artifactId>google-java-formatartifactId>
  <version>1.13.0version>
dependency>

Gradle

dependencies {
  implementation 'com.google.googlejavaformat:google-java-format:1.13.0'
}

You can then use the formatter through the formatSource methods. E.g.

String formattedSource = new Formatter().formatSource(sourceString);

or

CharSource source = ...
CharSink output = ...
new Formatter().formatSource(source, output);

Your starting point should be the instance methods of com.google.googlejavaformat.java.Formatter.

Building from source

mvn install

Contributing

Please see the contributors guide for details.

License

Copyright 2015 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
Comments
  • Expose max length to JavaFormatterOptions builder

    Expose max length to JavaFormatterOptions builder

    For my googleformatter-maven-plugin I allow for customised line lengths, which is no longer possible with the current SNAPSHOT API ( I used to have a subclass that overloaded the getMaxLineLength() method.

    The JavaFormatterOptions class lists a DEFAULT_MAX_LINE_LENGTH but it's not actually customisable.

    This patch simply exposes that to the Builder.

    NB: I've not currently signed any CLA's for Google - what ( if any ) is the process there?

    cla: yes 
    opened by talios 41
  • Fix Eclipse plugin build

    Fix Eclipse plugin build

    Updates the Eclipse plugin build logic. The logic is now completely separate from the main google java format build. Instead of relying on the build artifacts of the core build, the needed google-java-format and guava build artifacts used for the build are now pulled from maven.

    Updates google-java-format version used for the build to '1.9', the build JDK to 11, and removes old dependencies which are no longer used.

    Updates tycho version to 1.7.0 in order to build with JDK > 8.

    Updates the build guide in the README.

    cla: yes 
    opened by tobous 31
  • Please provide Eclipse plugin in version 1.7

    Please provide Eclipse plugin in version 1.7

    The release page for version 1.7 does not contain an Eclipse plugin like the previous versions. The readme still mentions that page as the download source of the Eclipse plugin.

    So please provide a JAR with the Eclipse plugin as part of the relase.

    Eclipse 
    opened by PhilippWendler 25
  • Java 17 compatibility

    Java 17 compatibility

    It seems that Java 17 (next LTS) will have stricter access requirements https://openjdk.java.net/jeps/403

    I tried to run this tool and noticed this error:

    Caused by: java.lang.IllegalAccessError: class com.google.googlejavaformat.java.RemoveUnusedImports (in unnamed module @0x5c25324c) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x5c25324c
            at com.google.googlejavaformat.java.RemoveUnusedImports.removeUnusedImports(RemoveUnusedImports.java:188)
    
    opened by iemejia 21
  • Before commit reformatting option in IntelliJ does invoke plugin

    Before commit reformatting option in IntelliJ does invoke plugin

    I have the IntelliJ plugin installed and reformatting works as expected. If I select 'Reformat code' option in commit window, then it will take my currently selected Code Style sheet and not use google-java-format. It sets indentation to 4 spaces instead of 2 for example. Reformatting after committing then immediately gives local changes.

    Is this a known issue? Will this be solved?

    IntelliJ 
    opened by mqzry 19
  • Add dry-run mode and --set-exit-if-changed option

    Add dry-run mode and --set-exit-if-changed option

    See #105

    --dry-run or -n Prints the paths of the files whose contents would change if the formatter were run normally.

    --set-exit-if-changed Return exit code 1 if there are any formatting changes.

    cla: yes 
    opened by sormuras 19
  • Android Studio 4.1: google-java-format option not appearing in

    Android Studio 4.1: google-java-format option not appearing in "Other Settings"

    I upgraded from Android Studio 4.0 to 4.1 and the google-java-format plugin seemed to stop working. At first, it was because all my plugins were reset so I reinstalled the plugin (1.9.0.0) from Marketplace. As per the README for Intellij setup, I tried to go to "Other Settings" in my project settings to enable google-java-format for my project. However, the option doesn't appear where it used to be.

    androidstudio-4 1

    On my other machine with Android Studio 4.0 and google-java-format v1.7.0.4 installed, the option is there (see below).

    androidstudio-4 0

    Has there been a regression in compatibility with Android Studio 4.1?

    IntelliJ 
    opened by brianliyang 17
  • Support google-java-format for android developers?

    Support google-java-format for android developers?

    I try use google-java-format for my android java IDE and i got error

    java.lang.NoSuchMethodError: No static method stream([Ljava/lang/Object;)Ljava/util/stream/Stream; in class Ljava/util/Arrays; or its super classes (declaration of 'java.util.Arrays' appears in /system/framework/core-libart.jar)

    I know that android not supported java 8 but may be source code possible to change for compatibility?

    opened by ghost 17
  • Running on Java 16 fails

    Running on Java 16 fails

    Running GJF google-java-format-1.9-all-deps.jar on Java 16 (16-ea+21) fails with the follow error

    java.lang.NoSuchFieldError: reader
    	at com.google.googlejavaformat.java.JavacTokens$CommentSavingTokenizer.processComment(JavacTokens.java:131)
    	at jdk.compiler/com.sun.tools.javac.parser.JavaTokenizer.readToken(JavaTokenizer.java:949)
    	at jdk.compiler/com.sun.tools.javac.parser.Scanner.nextToken(Scanner.java:115)
    	at com.google.googlejavaformat.java.JavacTokens.getTokens(JavacTokens.java:88)
    	at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:364)
    	at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:334)
    	at com.google.googlejavaformat.java.JavaInput.<init>(JavaInput.java:276)
    	at com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:280)
    	at com.google.googlejavaformat.java.Formatter.formatSource(Formatter.java:267)
    	at com.google.googlejavaformat.java.FormatFileCallable.call(FormatFileCallable.java:45)
    	at com.google.googlejavaformat.java.FormatFileCallable.call(FormatFileCallable.java:26)
    
    opened by sormuras 16
  • JDK 9 module-info.java handling

    JDK 9 module-info.java handling

    Having a module-info.java in the source set leads to unexpected format exceptions starting with

    src/main/java/module-info.java:1:1: error: Syntax error on token "module", package expected
    

    Solution 1

    Skip module-info.java although it ends with .java Line Main.java:118 already skips non-Java files. Could easily be handled here.

    Solution 2

    Support module-info.java syntax and reformat it as well.

    opened by sormuras 16
  • Exception formatting switch expressions

    Exception formatting switch expressions

    Formatting this code:

    public class A {
    
        public static String foo(int in) {
            return switch (in) {
                case 1 -> "A";
                case 2 -> "B";
                default -> throw new IllegalStateException("Unknown input " + in);
            };
        }
    }
    

    Produces this exception: https://pastebin.com/yQ1kt8mh

    Formatting this code:

    public class A {
    
        public static String foo(int in) {
            return switch (in) {
                case 1 -> "A";
                case 2 -> "B";
                default -> "C";
            };
        }
    }
    

    Produces this exception: https://pastebin.com/SEC77wYT

    I am using version 1.8 through spotless java version 3.29.0 (latest) and running on JDK 14.

    opened by Octogonapus 15
  • Bump checker-qual from 3.21.2 to 3.29.0

    Bump checker-qual from 3.21.2 to 3.29.0

    Bumps checker-qual from 3.21.2 to 3.29.0.

    Release notes

    Sourced from checker-qual's releases.

    Checker Framework 3.29.0

    Version 3.29.0 (January 5, 2023)

    User-visible changes:

    Dropped support for -ApermitUnsupportedJdkVersion command-line argument. You can now run the Checker Framework under any JDK version, without a warning.

    Pass -Astubs=permit-nullness-assertion-exception.astub to not be warned about null pointer exceptions within nullness assertion methods like Objects.requireNonNull.

    Pass -Astubs=sometimes-nullable.astub to unsoundly permit passing null to calls if null is sometimes but not always permitted.

    Closed issues:

    #5412, #5431, #5435, #5438, #5447, #5450, #5453, #5471, #5472, #5487.

    Checker Framework 3.28.0

    Version 3.28.0 (December 1, 2022)

    User-visible changes:

    The Checker Framework runs under JDK 19 -- that is, it runs on a version 19 JVM.

    Implementation details:

    Renamed TryFinallyScopeCell to LabelCell.

    Renamed TreeUtils.isEnumSuper to isEnumSuperCall.

    Closed issues:

    #5390, #5399, #5390.

    Checker Framework 3.27.0

    Version 3.27.0 (November 1, 2022)

    User-visible changes:

    The Constant Value Checker supports new annotation @DoesNotMatchRegex.

    Closed issues:

    #5238, #5360, #5362, #5387.

    Checker Framework 3.26.0

    Version 3.26.0 (October 3, 2022)

    ... (truncated)

    Changelog

    Sourced from checker-qual's changelog.

    Version 3.29.0 (January 5, 2023)

    User-visible changes:

    Dropped support for -ApermitUnsupportedJdkVersion command-line argument. You can now run the Checker Framework under any JDK version, without a warning.

    Pass -Astubs=permit-nullness-assertion-exception.astub to not be warned about null pointer exceptions within nullness assertion methods like Objects.requireNonNull.

    Pass -Astubs=sometimes-nullable.astub to unsoundly permit passing null to calls if null is sometimes but not always permitted.

    Closed issues:

    #5412, #5431, #5435, #5438, #5447, #5450, #5453, #5471, #5472, #5487.

    Version 3.28.0 (December 1, 2022)

    User-visible changes:

    The Checker Framework runs under JDK 19 -- that is, it runs on a version 19 JVM.

    Implementation details:

    Renamed TryFinallyScopeCell to LabelCell.

    Renamed TreeUtils.isEnumSuper to isEnumSuperCall.

    Closed issues:

    #5390, #5399, #5390.

    Version 3.27.0 (November 1, 2022)

    User-visible changes:

    The Constant Value Checker supports new annotation @DoesNotMatchRegex.

    Closed issues:

    #5238, #5360, #5362, #5387.

    Version 3.26.0 (October 3, 2022)

    ... (truncated)

    Commits
    • 5759117 new release 3.29.0
    • 12d3bf6 Prep for release.
    • 27b7772 "datflow" => "dataflow" (#5494)
    • febb026 Add error message keys
    • c82aa14 Notes about making a snapshot release
    • 0e5f879 Annotation declarations are declarations
    • 45d54e4 Adjust nullness annotation
    • c6b4d5c Explain how to create a snapshot release
    • 46bd8bc RLC and Must Call Checker stub files for Apache Commons IOUtils class (#5478)
    • 7f1ff08 Add APIs to WPI for inferring 1) annotations on class declarations and 2) for...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Comments are indented before case statements in enhanced switch

    Comments are indented before case statements in enhanced switch

    Placing single-line or block comments before case statements in an enhanced switch causes them to be indented. This seems to be in violation of 4.8.6.1 Block comment style.

    Auto-formatted code:

    public class T {
      public static void main(String[] args) {
        int a = 1;
        switch (a) {
          case 1 -> System.out.println("1");
    
            // This is a comment before a case statement
          case 2 -> System.out.println("2");
    
            /*
             * Block comment before a case stement
             */
          case 3 -> System.out.println("3");
    
            // Comment before the default statement
          default -> System.out.println("N/A");
        }
      }
    }
    
    opened by sKwil 0
  • Bump error_prone_annotations from 2.16 to 2.17.0

    Bump error_prone_annotations from 2.16 to 2.17.0

    Bumps error_prone_annotations from 2.16 to 2.17.0.

    Release notes

    Sourced from error_prone_annotations's releases.

    Error Prone 2.17.0

    New Checkers:

    Fixed issues: #2321, #3144, #3297, #3428, #3437, #3462, #3482, #3494

    Full Changelog: https://github.com/google/error-prone/compare/v2.16...v2.17.0

    Commits
    • 27de40b Release Error Prone 2.17.0
    • bcf4dcf Optimize checks that report exactly the same fix in multiple diagnostics, lik...
    • 8ddb7cb Record Error Prone initialization time
    • 1d23141 Do the expensive bit last in UnusedMethod.
    • e360257 Fix yet another NonCanonicalType crash
    • 5768290 Make UnusedMethod recognize com.google.acai annotations, com.google.caliper.B...
    • 7340bdf Audit EP checks for argumentless mock().
    • b92c9b1 Rip out GuardedBy:CheckMemberReferences.
    • 63fb30b Have InvalidLink provide a hint about erasure if it sees < in an invalid meth...
    • 4a5fd7b Suppress FieldCanBeLocal based on unused prefices.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Exception when formatting files in IntelliJ

    Exception when formatting files in IntelliJ

    Plugin Version: 1.15.0.0 IntelliJ Version: Ultimate Edition 2022.3

    Exception:

    Got unexpected exception during formatting file://G:/Programming/IntelliJ/IdeaProjects/.../SampleClass.java
    
    java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: class com.google.googlejavaformat.java.JavaInput (in unnamed module @0x7e042804) cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x7e042804
    	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.checkStop(AbstractLayoutCodeProcessor.java:485)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.performFileProcessing(AbstractLayoutCodeProcessor.java:479)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.lambda$iteration$2(AbstractLayoutCodeProcessor.java:435)
    	at com.intellij.openapi.project.DumbService.withAlternativeResolveEnabled(DumbService.java:354)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.iteration(AbstractLayoutCodeProcessor.java:435)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.lambda$process$9(AbstractLayoutCodeProcessor.java:522)
    	at com.intellij.codeInsight.actions.FileRecursiveIterator.lambda$processAll$4(FileRecursiveIterator.java:69)
    	at com.intellij.openapi.roots.impl.FileIndexBase.lambda$toContentIteratorEx$0(FileIndexBase.java:82)
    	at com.intellij.openapi.roots.impl.FileIndexBase$1.visitFileEx(FileIndexBase.java:65)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:295)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.vfs.VfsUtilCore.visitChildrenRecursively(VfsUtilCore.java:327)
    	at com.intellij.openapi.roots.impl.FileIndexBase.iterateContentUnderDirectory(FileIndexBase.java:46)
    	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.iterateContentUnderDirectory(ProjectFileIndexImpl.java:32)
    	at com.intellij.openapi.roots.impl.FileIndexBase.iterateContentUnderDirectory(FileIndexBase.java:87)
    	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.iterateContentUnderDirectory(ProjectFileIndexImpl.java:32)
    	at com.intellij.codeInsight.actions.FileRecursiveIterator.processAll(FileRecursiveIterator.java:64)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.process(AbstractLayoutCodeProcessor.java:520)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.processFilesUnderProgress(AbstractLayoutCodeProcessor.java:371)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.lambda$runProcessFiles$1(AbstractLayoutCodeProcessor.java:327)
    	at com.intellij.openapi.progress.impl.CoreProgressManager$1.run(CoreProgressManager.java:256)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:425)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:509)
    	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:84)
    	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:190)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:591)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:590)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:177)
    	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
    	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    	at java.base/java.lang.Thread.run(Thread.java:833)
    Caused by: java.lang.IllegalAccessError: class com.google.googlejavaformat.java.JavaInput (in unnamed module @0x7e042804) cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x7e042804
    	at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:349)
    	at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:334)
    	at com.google.googlejavaformat.java.JavaInput.<init>(JavaInput.java:276)
    	at com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:260)
    	at com.google.googlejavaformat.intellij.FormatterUtil.getReplacements(FormatterUtil.java:40)
    	at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.format(GoogleJavaFormatCodeStyleManager.java:150)
    	at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.formatInternal(GoogleJavaFormatCodeStyleManager.java:137)
    	at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.reformatText(GoogleJavaFormatCodeStyleManager.java:69)
    	at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$doReformat$5(ReformatCodeProcessor.java:196)
    	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:167)
    	at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$doReformat$6(ReformatCodeProcessor.java:186)
    	at com.intellij.openapi.editor.ex.util.EditorScrollingPositionKeeper.perform(EditorScrollingPositionKeeper.java:100)
    	at com.intellij.codeInsight.actions.ReformatCodeProcessor.doReformat(ReformatCodeProcessor.java:186)
    	at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$prepareTask$2(ReformatCodeProcessor.java:134)
    	at com.intellij.application.options.CodeStyle.doWithTemporarySettings(CodeStyle.java:338)
    	at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$prepareTask$3(ReformatCodeProcessor.java:130)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.lambda$performFileProcessing$6(AbstractLayoutCodeProcessor.java:476)
    	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:150)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:955)
    	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:148)
    	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
    	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
    	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:157)
    	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:124)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.lambda$performFileProcessing$7(AbstractLayoutCodeProcessor.java:476)
    	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
    	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
    	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813)
    	at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:429)
    	at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:97)
    	at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:74)
    	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:114)
    	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:36)
    	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
    	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:756)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:774)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
    	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
    	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
    	at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:956)
    	at com.intellij.openapi.progress.util.ProgressWindow.lambda$startBlocking$4(ProgressWindow.java:215)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runUnlockingIntendedWrite(ApplicationImpl.java:839)
    	at com.intellij.openapi.progress.util.ProgressWindow.lambda$startBlocking$5(ProgressWindow.java:210)
    	at com.intellij.openapi.progress.util.ProgressWindow.executeInModalContext(ProgressWindow.java:191)
    	at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:208)
    	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$execFromEDT$6(ProgressRunner.java:329)
    	at java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:757)
    	at java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:735)
    	at java.base/java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2182)
    	at com.intellij.openapi.progress.impl.ProgressRunner.execFromEDT(ProgressRunner.java:326)
    	at com.intellij.openapi.progress.impl.ProgressRunner.submit(ProgressRunner.java:267)
    	at com.intellij.openapi.progress.impl.ProgressRunner.submitAndGet(ProgressRunner.java:193)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:395)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:520)
    	at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:85)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:252)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.runProcessFiles(AbstractLayoutCodeProcessor.java:325)
    	at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.run(AbstractLayoutCodeProcessor.java:226)
    	at com.intellij.codeInsight.actions.ReformatCodeAction.reformatModule(ReformatCodeAction.java:218)
    	at com.intellij.codeInsight.actions.ReformatCodeAction.actionPerformed(ReformatCodeAction.java:95)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:323)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:302)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:346)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:302)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$5(ActionMenuItem.java:296)
    	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:226)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:289)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$0(ActionMenuItem.java:64)
    	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$4(ActionMenuItem.java:111)
    	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
    	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:526)
    	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:558)
    	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648)
    	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392)
    	at java.desktop/java.awt.Component.processEvent(Component.java:6413)
    	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
    	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
    	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
    	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
    	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
    	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
    	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
    	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
    	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
    	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
    	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
    	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754)
    	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752)
    	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
    	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:831)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:753)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
    	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:774)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
    	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
    	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
    	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
    	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:813)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
    	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
    
    opened by einfachBlu 1
  • Intellij 2022.2.1 error

    Intellij 2022.2.1 error

    Got unexpected exception during formatting PsiJavaFile:User.java

    java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: class com.google.googlejavaformat.java.JavaInput (in unnamed module @0x4aeef022) cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x4aeef022 at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.checkStop(AbstractLayoutCodeProcessor.java:468) at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.performFileProcessing(AbstractLayoutCodeProcessor.java:462) at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor.lambda$runProcessFile$0(AbstractLayoutCodeProcessor.java:291) at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$2.run(AbstractLayoutCodeProcessor.java:316) at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442) at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.lang.IllegalAccessError: class com.google.googlejavaformat.java.JavaInput (in unnamed module @0x4aeef022) cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x4aeef022 at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:349) at com.google.googlejavaformat.java.JavaInput.buildToks(JavaInput.java:334) at com.google.googlejavaformat.java.JavaInput.(JavaInput.java:276) at com.google.googlejavaformat.java.Formatter.getFormatReplacements(Formatter.java:260) at com.google.googlejavaformat.intellij.FormatterUtil.getReplacements(FormatterUtil.java:40) at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.format(GoogleJavaFormatCodeStyleManager.java:150) at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.formatInternal(GoogleJavaFormatCodeStyleManager.java:137) at com.google.googlejavaformat.intellij.GoogleJavaFormatCodeStyleManager.reformatText(GoogleJavaFormatCodeStyleManager.java:69) at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$doReformat$5(ReformatCodeProcessor.java:196) at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:149) at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$doReformat$6(ReformatCodeProcessor.java:186) at com.intellij.openapi.editor.ex.util.EditorScrollingPositionKeeper.perform(EditorScrollingPositionKeeper.java:100) at com.intellij.codeInsight.actions.ReformatCodeProcessor.doReformat(ReformatCodeProcessor.java:186) at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$prepareTask$2(ReformatCodeProcessor.java:134) at com.intellij.application.options.CodeStyle.doWithTemporarySettings(CodeStyle.java:338) at com.intellij.codeInsight.actions.ReformatCodeProcessor.lambda$prepareTask$3(ReformatCodeProcessor.java:130) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.lambda$performFileProcessing$5(AbstractLayoutCodeProcessor.java:459) at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:150) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1023) at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:148) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184) at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:157) at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:124) at com.intellij.codeInsight.actions.AbstractLayoutCodeProcessor$ProcessingTask.lambda$performFileProcessing$6(AbstractLayoutCodeProcessor.java:459) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881) at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:513) at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:95) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:75) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:118) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:42) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:779) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:749) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:766) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

    opened by SerbanG 1
Releases(v1.15.0)
Owner
Google
Google ❤️ Open Source
Google
Inria 1.4k Dec 29, 2022
mobsfscan is a static analysis tool that can find insecure code patterns in your Android and iOS source code.

mobsfscan is a static analysis tool that can find insecure code patterns in your Android and iOS source code. Supports Java, Kotlin, Swift, and Objective C Code. mobsfscan uses MobSF static analysis rules and is powered by semgrep and libsast pattern matcher.

Mobile Security Framework 347 Dec 29, 2022
Astra: a Java tool for analysing and refactoring Java source code

What is Astra? Astra is a Java tool for analysing and refactoring Java source code. For example: "References to type A should instead reference type B

Alfa 51 Dec 26, 2022
OpenGrok is a fast and usable source code search and cross reference engine, written in Java

Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. OpenGrok - a wicked fast source browser OpenGrok - a wicked fast source br

Oracle 3.8k Jan 8, 2023
Sourcetrail - free and open-source interactive source explorer

Sourcetrail Sourcetrail is a free and open-source cross-platform source explorer that helps you get productive on unfamiliar source code. Windows: Lin

Coati Software 13.2k Jan 5, 2023
A tool to help eliminate NullPointerExceptions (NPEs) in your Java code with low build-time overhead

NullAway: Fast Annotation-Based Null Checking for Java NullAway is a tool to help eliminate NullPointerExceptions (NPEs) in your Java code. To use Nul

Uber Open Source 3.2k Dec 29, 2022
:coffee: SonarSource Static Analyzer for Java Code Quality and Security

Code Quality and Security for Java This SonarSource project is a code analyzer for Java projects. Information about the analysis of Java features is a

SonarSource 976 Jan 5, 2023
SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code.

SpotBugs is the spiritual successor of FindBugs, carrying on from the point where it left off with support of its community. SpotBugs is licensed unde

null 2.9k Jan 4, 2023
Java library for parsing report files from static code analysis.

Violations Lib This is a Java library for parsing report files like static code analysis. Example of supported reports are available here. A number of

Tomas Bjerre 127 Nov 23, 2022
An extensible multilanguage static code analyzer.

PMD About PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and

PMD 4.1k Jan 2, 2023
Catch common Java mistakes as compile-time errors

Error Prone Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time. public class ShortSet { public

Google 6.3k Dec 31, 2022
A static analyzer for Java, C, C++, and Objective-C

Infer Infer is a static analysis tool for Java, C++, Objective-C, and C. Infer is written in OCaml. Installation Read our Getting Started page for det

Facebook 13.7k Dec 28, 2022
A free injection hacked client for Minecraft using Java-agents

Swift Swift is a free and open-source injection hacked client base for Minecraft using Java-agents. Issues If you notice any bugs, you can let us know

static final 36 Oct 8, 2022
Java bytecode static analyzer

This project is abandoned and unlikely will be supported in future HuntBugs 0.0.11 New Java bytecode static analyzer tool based on Procyon Compiler To

Tagir Valeev 302 Aug 13, 2022
Google Mr4c GNU Lesser 3 Google Mr4c MR4C is an implementation framework that allows you to run native code within the Hadoop execution framework. License: GNU Lesser 3, .

Introduction to the MR4C repo About MR4C MR4C is an implementation framework that allows you to run native code within the Hadoop execution framework.

Google 911 Dec 9, 2022
Google App Engine Standard Environment Source Code for Java 8 and Java11

Google App Engine Standard Environment Source Code for Java 8 and Java11. This is a repository that contains the Java Source Code for Google App Engin

Google Cloud Platform 167 Jan 2, 2023
make async-await code style available in java just like csharp and es6

JAsync - the async-await pattern of Java 中文版 JAsync implements Async-Await pattern just like es in Java. It allows developers to write asynchronous co

null 124 Dec 26, 2022
Google Hash Code '22 Question

Answer for - Mentorship and Teamwork Google Hash Code '22 Question Credit goes to Google LLC - Hash Code '22 Work is so much more fun when we are part

Dilshan Karunarathne 4 Apr 12, 2022