Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A second run should not change the result #1171

Closed
koppor opened this issue Oct 5, 2024 · 1 comment
Closed

A second run should not change the result #1171

koppor opened this issue Oct 5, 2024 · 1 comment

Comments

@koppor
Copy link

koppor commented Oct 5, 2024

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.

@koppor koppor changed the title x86-64.exe should behave similar to all-deps.jar when handling comment strings A second run should not change the result Oct 5, 2024
@cushon
Copy link
Collaborator

cushon commented Oct 10, 2024

#211

@cushon cushon closed this as completed Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants