From 8cb5409e11ae5533927c50293e8b22dd9fca7e3d Mon Sep 17 00:00:00 2001 From: Fengyun Liu Date: Mon, 31 Jul 2023 10:40:11 +0200 Subject: [PATCH] Fix style --- .../oracle/graal/pointsto/ObjectScanner.java | 4 +-- .../analysis/ReachabilityTracePrinter.java | 28 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/ObjectScanner.java b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/ObjectScanner.java index 055868db9fbb9..23962ccfdd6ac 100644 --- a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/ObjectScanner.java +++ b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/ObjectScanner.java @@ -107,8 +107,8 @@ public void scanBootImageHeapRoots(Comparator fieldComparator, Co Map embeddedRoots = bb.getUniverse().getEmbeddedRoots(); if (embeddedRootComparator != null) { embeddedRoots.entrySet().stream() - .sorted(Map.Entry.comparingByValue(embeddedRootComparator)) - .forEach(entry -> execute(() -> scanEmbeddedRoot(entry.getKey(), entry.getValue()))); + .sorted(Map.Entry.comparingByValue(embeddedRootComparator)) + .forEach(entry -> execute(() -> scanEmbeddedRoot(entry.getKey(), entry.getValue()))); } else { embeddedRoots.forEach((key, value) -> execute(() -> scanEmbeddedRoot(key, value))); } diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/analysis/ReachabilityTracePrinter.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/analysis/ReachabilityTracePrinter.java index 738ef3c573eb0..c613421a0202b 100644 --- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/analysis/ReachabilityTracePrinter.java +++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/analysis/ReachabilityTracePrinter.java @@ -28,20 +28,20 @@ import java.io.StringWriter; import java.util.List; -import com.oracle.graal.pointsto.reports.ObjectTreePrinter; -import com.oracle.graal.pointsto.reports.ReportUtils; -import com.oracle.svm.core.option.HostedOptionKey; -import com.oracle.svm.core.option.LocatableMultiOptionValue; import org.graalvm.compiler.debug.MethodFilter; +import org.graalvm.compiler.options.Option; +import org.graalvm.compiler.options.OptionValues; import com.oracle.graal.pointsto.BigBang; import com.oracle.graal.pointsto.meta.AnalysisElement; import com.oracle.graal.pointsto.meta.AnalysisField; import com.oracle.graal.pointsto.meta.AnalysisMethod; import com.oracle.graal.pointsto.meta.AnalysisType; +import com.oracle.graal.pointsto.reports.ObjectTreePrinter; +import com.oracle.graal.pointsto.reports.ReportUtils; import com.oracle.graal.pointsto.util.AnalysisError; -import org.graalvm.compiler.options.Option; -import org.graalvm.compiler.options.OptionValues; +import com.oracle.svm.core.option.HostedOptionKey; +import com.oracle.svm.core.option.LocatableMultiOptionValue; public final class ReachabilityTracePrinter { public static class Options { @@ -67,10 +67,10 @@ public static void report(String imageName, OptionValues options, String reports if (count > 0) { String trace = stringWriter.toString(); ReportUtils.report("trace for types", reportsPath, "trace_types_" + baseImageName, "txt", - writer -> writer.print(trace)); - String abortOnTypeReachableOption = "-H:" + Options.AbortOnTypeReachable.getName() + "=" + String.join(",", typePatterns); + writer -> writer.print(trace)); + String abortOnTypeReachableOption = "-H:" + Options.AbortOnTypeReachable.getName() + "=" + String.join(",", typePatterns); String message = "Image building is interrupted as the types specified via " + abortOnTypeReachableOption + - " are reachable. See the generated report for a complete reachability trace."; + " are reachable. See the generated report for a complete reachability trace."; consoleMessageBuilder.append(message); } } @@ -82,10 +82,10 @@ public static void report(String imageName, OptionValues options, String reports if (count > 0) { String trace = stringWriter.toString(); ReportUtils.report("trace for methods", reportsPath, "trace_methods_" + baseImageName, "txt", - writer -> writer.print(trace)); + writer -> writer.print(trace)); String abortOnMethodReachableOption = "-H:" + Options.AbortOnMethodReachable.getName() + "=" + String.join(",", methodPatterns); String message = "Image building is interrupted as the methods specified via " + abortOnMethodReachableOption + - " are reachable. See the generated report for a complete reachability trace."; + " are reachable. See the generated report for a complete reachability trace."; consoleMessageBuilder.append(message); } } @@ -97,10 +97,10 @@ public static void report(String imageName, OptionValues options, String reports if (count > 0) { String trace = stringWriter.toString(); ReportUtils.report("trace for fields", reportsPath, "trace_fields_" + baseImageName, "txt", - writer -> writer.print(trace)); - String abortOnFieldReachableOption = "-H:" + Options.AbortOnFieldReachable.getName() + "=" + String.join(",", fieldPatterns); + writer -> writer.print(trace)); + String abortOnFieldReachableOption = "-H:" + Options.AbortOnFieldReachable.getName() + "=" + String.join(",", fieldPatterns); String message = "Image building is interrupted as the fields specified via " + abortOnFieldReachableOption + - " are reachable. See the generated report for a complete reachability trace."; + " are reachable. See the generated report for a complete reachability trace."; consoleMessageBuilder.append(message); } }