mirror of
https://github.com/sbt/sbt.git
synced 2026-09-03 16:39:24 +02:00
[2.x] ci: Update java file formatter plugin (#8892)
This commit is contained in:
+3
-3
@@ -16,6 +16,9 @@
|
||||
|
||||
package org.scalasbt.shadedgson.com.google.gson.typeadapters;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import org.scalasbt.shadedgson.com.google.errorprone.annotations.CanIgnoreReturnValue;
|
||||
import org.scalasbt.shadedgson.com.google.gson.Gson;
|
||||
import org.scalasbt.shadedgson.com.google.gson.JsonElement;
|
||||
@@ -27,9 +30,6 @@ import org.scalasbt.shadedgson.com.google.gson.TypeAdapterFactory;
|
||||
import org.scalasbt.shadedgson.com.google.gson.reflect.TypeToken;
|
||||
import org.scalasbt.shadedgson.com.google.gson.stream.JsonReader;
|
||||
import org.scalasbt.shadedgson.com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Adapts values whose runtime type may differ from their declaration type. This is necessary when a
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
package sbt.internal.worker1;
|
||||
|
||||
import java.net.URI;
|
||||
import java.io.Serializable;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ConsoleInfo implements Serializable {
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
package sbt.internal.worker1;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.nio.file.Paths;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import xsbti.compile.ConsoleInterface1;
|
||||
|
||||
public final class ForkConsoleMain {
|
||||
@@ -39,8 +37,7 @@ public final class ForkConsoleMain {
|
||||
|
||||
private void runInterface1(ConsoleInterface1 intf, ConsoleInfo info) throws Exception {
|
||||
String toolsJars =
|
||||
info.toolsJars
|
||||
.stream()
|
||||
info.toolsJars.stream()
|
||||
.map(u -> Paths.get(u).toString())
|
||||
.collect(Collectors.joining(File.pathSeparator));
|
||||
String classpathJars =
|
||||
@@ -75,8 +72,7 @@ public final class ForkConsoleMain {
|
||||
Object[].class,
|
||||
xsbti.Logger.class);
|
||||
String toolsJars =
|
||||
info.toolsJars
|
||||
.stream()
|
||||
info.toolsJars.stream()
|
||||
.map(u -> Paths.get(u).toString())
|
||||
.collect(Collectors.joining(File.pathSeparator));
|
||||
String classpathJars =
|
||||
|
||||
@@ -8,19 +8,16 @@
|
||||
|
||||
package sbt.internal.worker1;
|
||||
|
||||
import org.scalasbt.shadedgson.com.google.gson.Gson;
|
||||
|
||||
import sbt.testing.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
import org.scalasbt.shadedgson.com.google.gson.Gson;
|
||||
import sbt.testing.*;
|
||||
|
||||
public class ForkTestMain {
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
package sbt.internal.worker1;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import sbt.testing.TaskDef;
|
||||
|
||||
public class TestLogInfo implements Serializable {
|
||||
public final long id;
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
package sbt.internal.worker1;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import org.scalasbt.shadedgson.com.google.gson.Gson;
|
||||
import org.scalasbt.shadedgson.com.google.gson.TypeAdapter;
|
||||
import org.scalasbt.shadedgson.com.google.gson.TypeAdapterFactory;
|
||||
import org.scalasbt.shadedgson.com.google.gson.reflect.TypeToken;
|
||||
import org.scalasbt.shadedgson.com.google.gson.stream.JsonReader;
|
||||
import org.scalasbt.shadedgson.com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
class ThrowableAdapterFactory implements TypeAdapterFactory {
|
||||
private ThrowableAdapterFactory() {}
|
||||
|
||||
@@ -8,28 +8,25 @@
|
||||
|
||||
package sbt.internal.worker1;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.InetAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.Socket;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Scanner;
|
||||
import org.scalasbt.shadedgson.com.google.gson.Gson;
|
||||
import org.scalasbt.shadedgson.com.google.gson.GsonBuilder;
|
||||
import org.scalasbt.shadedgson.com.google.gson.JsonElement;
|
||||
import org.scalasbt.shadedgson.com.google.gson.JsonObject;
|
||||
import org.scalasbt.shadedgson.com.google.gson.JsonParser;
|
||||
import org.scalasbt.shadedgson.com.google.gson.JsonPrimitive;
|
||||
import org.scalasbt.shadedgson.com.google.gson.typeadapters.RuntimeTypeAdapterFactory;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
import sbt.testing.*;
|
||||
|
||||
/**
|
||||
@@ -203,8 +200,7 @@ public final class WorkerMain {
|
||||
|
||||
private URLClassLoader createClassLoader(RunInfo.JvmRunInfo info, ClassLoader parent) {
|
||||
URL[] urls =
|
||||
info.classpath
|
||||
.stream()
|
||||
info.classpath.stream()
|
||||
.map(
|
||||
filePath -> {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user