From b37a95a6a4fa70da38f990b14a0f9517dd5ed0bc Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 3 Jun 2014 18:21:39 +0200 Subject: bugfixed ‘print build time as part of version number if edge release’ feature. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.xml | 2 +- src/core/lombok/core/Version.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index 9be37d26..6e81138a 100644 --- a/build.xml +++ b/build.xml @@ -208,7 +208,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr - $releaseTimestamp + ${releaseTimestamp} diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index 6b1ed0f8..0ceabc51 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -71,7 +71,7 @@ public class Version { String version = String.format("v%s \"%s\"", VERSION, RELEASE_NAME); if (!isEdgeRelease()) return version; - InputStream in = Version.class.getResourceAsStream("release-timestamp.txt"); + InputStream in = Version.class.getResourceAsStream("/release-timestamp.txt"); if (in == null) return version; try { byte[] data = new byte[65536]; @@ -97,7 +97,7 @@ public class Version { int lastIdx = VERSION.lastIndexOf('.'); if (lastIdx == -1) return false; try { - return Integer.parseInt(VERSION.substring(lastIdx + 1)) % 1 == 1; + return Integer.parseInt(VERSION.substring(lastIdx + 1)) % 2 == 1; } catch (Exception e) { return false; } -- cgit