aboutsummaryrefslogtreecommitdiff
path: root/test/core/src/lombok/RunTestsViaEcj.java
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2014-12-10 00:04:31 +0100
committerRoel Spilker <r.spilker@gmail.com>2014-12-10 00:04:31 +0100
commit091f6ee83a98ea2a303164380aeeac093ceb8e47 (patch)
tree1958a4cad2da27ad0995ff3cb808c40798bd4b21 /test/core/src/lombok/RunTestsViaEcj.java
parent671f2a202e9e8b597dccc30a7ac4c8a1fbdb3625 (diff)
downloadlombok-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.java4
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) {