Skip to content

A second run should not change the result #1171

@koppor

Description

@koppor

When running the exe and then the all-deps, I get following diff:

--- a/src/main/java/org/jabref/logic/util/io/DatabaseFileLookup.java
+++ b/src/main/java/org/jabref/logic/util/io/DatabaseFileLookup.java
@@ -64,11 +64,8 @@ public class DatabaseFileLookup {
         Objects.requireNonNull(entry);
 
         return entry.getFiles().stream()
-                .filter(
-                        file ->
-                                !file
-                                        .isOnlineLink()) // Do not query external file links (huge
-                                                         // performance leak)
+                .filter(file -> !file.isOnlineLink()) // Do not query external file links (huge
+                // performance leak)
                 .map(file -> file.findIn(possibleFilePaths))
                 .filter(Optional::isPresent)
                 .map(Optional::get)
diff --git a/src/main/java/org/jabref/logic/xmp/XmpUtilReader.java b/src/main/java/org/jabref/logic/xmp/XmpUtilReader.java
index f616c44..663916e 100644
--- a/src/main/java/org/jabref/logic/xmp/XmpUtilReader.java
+++ b/src/main/java/org/jabref/logic/xmp/XmpUtilReader.java
@@ -33,7 +33,7 @@ public class XmpUtilReader {
         System.setProperty(
                 "sun.java2d.cmm",
                 "sun.java2d.cmm.kcms.KcmsServiceProvider"); // To get higher rendering speed on java
-                                                            // 8 oder 9 for images
+        // 8 oder 9 for images
     }
 
     /**

Tried with https://github.com/google/google-java-format/releases/tag/v1.24.0

find . -name "*.java" -exec /c/Users/koppor/Downloads/google-java-format_windows-x86-64.exe -r -a  --skip-reflowing-long-strings "{}" \;
find . -name "*.java" -exec /c/Program\ Files  --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 /c/Users/koppor/Downloads/google-java-format-1.24.0-all-deps.jar -r -a --skip-reflowing-long-strings --skip-javadoc-formatting "{}" \;

The issue is that one needs to run GJF twice to get a "stable" output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions