Skip to content

Commit

Permalink
Merge pull request #2780 from md-5/delombok-16
Browse files Browse the repository at this point in the history
[jdk16] Add lombok opens in single location
  • Loading branch information
rzwitserloot authored Mar 21, 2021
2 parents c607673 + 8f6d2d1 commit 5ef5c77
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
5 changes: 4 additions & 1 deletion src/delombok/lombok/delombok/Delombok.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ private static class CmdArgs {
private boolean help;
}

static {
LombokProcessor.addOpensForLombok();
}

private static String indentAndWordbreak(String in, int indent, int maxLen) {
StringBuilder out = new StringBuilder();
StringBuilder line = new StringBuilder();
Expand Down Expand Up @@ -315,7 +319,6 @@ public static void main(String[] rawArgs) {
}
}

LombokProcessor.addOpensForLombok();
delombok.delombok();
} catch (Exception e) {
if (!args.quiet) {
Expand Down
2 changes: 0 additions & 2 deletions src/delombok/lombok/delombok/DelombokApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import java.util.jar.JarFile;

import lombok.core.LombokApp;
import lombok.javac.apt.LombokProcessor;
import lombok.permit.Permit;
import lombok.spi.Provides;

Expand Down Expand Up @@ -174,7 +173,6 @@ private Class<?> loadStreamAsClass(String name, boolean resolve, InputStream in)
}

private void runDirectly(List<String> args) {
LombokProcessor.addOpensForLombok();
Delombok.main(args.toArray(new String[0]));
}

Expand Down
5 changes: 0 additions & 5 deletions src/delombok/lombok/delombok/ant/DelombokTaskImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

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;
Expand All @@ -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.");
Expand Down
5 changes: 0 additions & 5 deletions test/core/src/lombok/RunTestsViaDelombok.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,10 @@
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);
Expand Down

0 comments on commit 5ef5c77

Please sign in to comment.