diff options
author | Roel Spilker <r.spilker@gmail.com> | 2014-12-10 00:04:31 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2014-12-10 00:04:31 +0100 |
commit | 091f6ee83a98ea2a303164380aeeac093ceb8e47 (patch) | |
tree | 1958a4cad2da27ad0995ff3cb808c40798bd4b21 /test/core/src/lombok/RunTestsViaEcj.java | |
parent | 671f2a202e9e8b597dccc30a7ac4c8a1fbdb3625 (diff) | |
download | lombok-091f6ee83a98ea2a303164380aeeac093ceb8e47.tar.gz lombok-091f6ee83a98ea2a303164380aeeac093ceb8e47.tar.bz2 lombok-091f6ee83a98ea2a303164380aeeac093ceb8e47.zip |
[issue #759] delombok now plays nicely with exotic characters, encodings, and backslash U escapes.
Diffstat (limited to 'test/core/src/lombok/RunTestsViaEcj.java')
-rw-r--r-- | test/core/src/lombok/RunTestsViaEcj.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core/src/lombok/RunTestsViaEcj.java b/test/core/src/lombok/RunTestsViaEcj.java index f4584493..1a94baf1 100644 --- a/test/core/src/lombok/RunTestsViaEcj.java +++ b/test/core/src/lombok/RunTestsViaEcj.java @@ -93,7 +93,7 @@ public class RunTestsViaEcj extends AbstractRunTests { } @Override - public void transformCode(Collection<CompilerMessage> messages, StringWriter result, File file) throws Throwable { + public void transformCode(Collection<CompilerMessage> messages, StringWriter result, File file, String encoding) throws Throwable { final AtomicReference<CompilationResult> compilationResult_ = new AtomicReference<CompilationResult>(); final AtomicReference<CompilationUnitDeclaration> compilationUnit_ = new AtomicReference<CompilationUnitDeclaration>(); ICompilerRequestor bitbucketRequestor = new ICompilerRequestor() { @@ -103,7 +103,7 @@ public class RunTestsViaEcj extends AbstractRunTests { }; String source = readFile(file); - final CompilationUnit sourceUnit = new CompilationUnit(source.toCharArray(), file.getName(), "UTF-8"); + final CompilationUnit sourceUnit = new CompilationUnit(source.toCharArray(), file.getName(), encoding == null ? "UTF-8" : encoding); Compiler ecjCompiler = new Compiler(createFileSystem(file), ecjErrorHandlingPolicy(), ecjCompilerOptions(), bitbucketRequestor, new DefaultProblemFactory(Locale.ENGLISH)) { @Override protected synchronized void addCompilationUnit(ICompilationUnit inUnit, CompilationUnitDeclaration parsedUnit) { |