diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-05-29 20:13:05 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-05-29 20:13:05 +0200 |
commit | 912b96c1e55f9e400505cab2963a28ca1433b275 (patch) | |
tree | 9f790e3a9084291560582cb2b01db9c8acad4ce9 | |
parent | 2c1e300f1b171be4e06fe267097630a79a13fde0 (diff) | |
download | lombok-912b96c1e55f9e400505cab2963a28ca1433b275.tar.gz lombok-912b96c1e55f9e400505cab2963a28ca1433b275.tar.bz2 lombok-912b96c1e55f9e400505cab2963a28ca1433b275.zip |
#683: URI not absolute errors in mvn builds due to search for lombok.config being broken.
-rw-r--r-- | doc/changelog.markdown | 1 | ||||
-rw-r--r-- | src/core/lombok/core/configuration/FileSystemSourceCache.java | 7 | ||||
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/doc/changelog.markdown b/doc/changelog.markdown index f1854034..4a9958ed 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -2,6 +2,7 @@ Lombok Changelog ---------------- ### v1.14.1 "Edgy Guinea Pig" +* BUGFIX: mvn builds fail with a 'URI not absolute' exception. [Issue #683](https://code.google.com/p/projectlombok/issues/detail?id=683) ### v1.14.0 "Branching Cobra" (May 27th, 2014) * FEATURE: You can now configure aspects of lombok project wide (or even workspace wide, or just for a single package) via the [configuration system](http://projectlombok.org/features/configuration.html). You can configure many things; run `java -jar lombok.jar config -gv` for the complete list. diff --git a/src/core/lombok/core/configuration/FileSystemSourceCache.java b/src/core/lombok/core/configuration/FileSystemSourceCache.java index 50d8b13a..d502a56b 100644 --- a/src/core/lombok/core/configuration/FileSystemSourceCache.java +++ b/src/core/lombok/core/configuration/FileSystemSourceCache.java @@ -44,7 +44,12 @@ public class FileSystemSourceCache { public Iterable<ConfigurationSource> sourcesForJavaFile(URI javaFile, ConfigurationProblemReporter reporter) { if (javaFile == null) return Collections.emptyList(); - return sourcesForDirectory(new File(javaFile.normalize()).getParentFile(), reporter); + URI uri = javaFile.normalize(); + if (!uri.isAbsolute()) { + uri = new File(".").toURI().resolve(uri); + } + + return sourcesForDirectory(new File(uri).getParentFile(), reporter); } public Iterable<ConfigurationSource> sourcesForDirectory(URI directory, ConfigurationProblemReporter reporter) { diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index ccee5575..e14d1367 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -677,6 +677,7 @@ public class EclipsePatcher extends Agent { .request(StackRequest.PARAM1) .wrapMethod(new Hook(PATCH_EXTENSIONMETHOD, "resolveType", TYPE_BINDING_SIG, TYPE_BINDING_SIG, MESSAGE_SEND_SIG, BLOCK_SCOPE_SIG)) .build()); + sm.addScript(replaceMethodCall() .target(new MethodTarget(MESSAGE_SEND_SIG, "resolveType", TYPE_BINDING_SIG, BLOCK_SCOPE_SIG)) .methodToReplace(new Hook(PROBLEM_REPORTER_SIG, "errorNoMethodFor", "void", MESSAGE_SEND_SIG, TYPE_BINDING_SIG, TYPE_BINDINGS_SIG)) |