Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import jdk.graal.compiler.debug.DebugContext;
import org.graalvm.nativeimage.ImageSingletons;

import com.oracle.svm.core.SubstrateOptions;
import com.oracle.svm.core.SubstrateUtil;
import com.oracle.svm.core.c.libc.TemporaryBuildDirectoryProvider;

import jdk.graal.compiler.debug.DebugContext;

public class FileUtils {

public static void drainInputStream(InputStream source, OutputStream sink) {
Expand All @@ -64,20 +64,7 @@ public static void drainInputStream(InputStream source, OutputStream sink) {
}

public static List<String> readAllLines(InputStream source) {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(source));
List<String> result = new ArrayList<>();
while (true) {
String line = reader.readLine();
if (line == null) {
break;
}
result.add(line);
}
return result;
} catch (IOException ex) {
throw shouldNotReachHere(ex);
}
return new BufferedReader(new InputStreamReader(source)).lines().toList();
}

public static int executeCommand(String... args) throws IOException, InterruptedException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private static void registerJMXAgentResources() {
"jdk.internal.agent.resources.agent");

resourcesRegistry.addResourceBundles(ConfigurationCondition.alwaysTrue(),
"sun.security.util.Resources"); // required for password auth
"sun.security.util.resources.security"); // required for password auth
}

private static void configureProxy(BeforeAnalysisAccess access) {
Expand Down
Loading