mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 10:18:46 +00:00
Merge pull request #2780 from md-5/delombok-16
[jdk16] Add lombok opens in single location
This commit is contained in:
4 files changed
+4
-13
No files matched your search
@@ -168,6 +168,10 @@ public class Delombok {
|
||||
private boolean help;
|
||||
}
|
||||
|
||||
static {
|
||||
LombokProcessor.addOpensForLombok();
|
||||
}
|
||||
|
||||
private static String indentAndWordbreak(String in, int indent, int maxLen) {
|
||||
StringBuilder out = new StringBuilder();
|
||||
StringBuilder line = new StringBuilder();
|
||||
@@ -315,7 +319,6 @@ public class Delombok {
|
||||
}
|
||||
}
|
||||
|
||||
LombokProcessor.addOpensForLombok();
|
||||
delombok.delombok();
|
||||
} catch (Exception e) {
|
||||
if (!args.quiet) {
|
||||
|
||||
@@ -36,7 +36,6 @@ import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
import lombok.core.LombokApp;
|
||||
import lombok.javac.apt.LombokProcessor;
|
||||
import lombok.permit.Permit;
|
||||
import lombok.spi.Provides;
|
||||
|
||||
@@ -174,7 +173,6 @@ public class DelombokApp extends LombokApp {
|
||||
}
|
||||
|
||||
private void runDirectly(List<String> args) {
|
||||
LombokProcessor.addOpensForLombok();
|
||||
Delombok.main(args.toArray(new String[0]));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.util.List;
|
||||
|
||||
import lombok.delombok.Delombok;
|
||||
import lombok.delombok.Delombok.InvalidFormatOptionException;
|
||||
import lombok.javac.apt.LombokProcessor;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Location;
|
||||
@@ -47,10 +46,6 @@ public class DelombokTaskImpl {
|
||||
private Path path;
|
||||
private List<String> formatOptions = new ArrayList<String>();
|
||||
|
||||
static {
|
||||
LombokProcessor.addOpensForLombok();
|
||||
}
|
||||
|
||||
public void execute(Location location) throws BuildException {
|
||||
if (fromDir == null && path == null) throw new BuildException("Either 'from' attribute, or nested <fileset> tags are required.");
|
||||
if (fromDir != null && path != null) throw new BuildException("You can't specify both 'from' attribute and nested filesets. You need one or the other.");
|
||||
|
||||
@@ -62,15 +62,10 @@ import lombok.delombok.Delombok;
|
||||
import lombok.javac.CapturingDiagnosticListener;
|
||||
import lombok.javac.Javac;
|
||||
import lombok.javac.CapturingDiagnosticListener.CompilerMessage;
|
||||
import lombok.javac.apt.LombokProcessor;
|
||||
|
||||
public class RunTestsViaDelombok extends AbstractRunTests {
|
||||
private Delombok delombok = new Delombok();
|
||||
|
||||
static {
|
||||
LombokProcessor.addOpensForLombok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean transformCode(Collection<CompilerMessage> messages, StringWriter result, final File file, String encoding, Map<String, String> formatPreferences, int version, boolean checkPositions) throws Throwable {
|
||||
delombok.setVerbose(true);
|
||||
|
||||
Reference in new issue
Block a user