summaryrefslogtreecommitdiffstats
path: root/build-tools
diff options
context:
space:
mode:
authorKevin Rushforth <[email protected]>2004-09-23 02:51:05 +0000
committerKevin Rushforth <[email protected]>2004-09-23 02:51:05 +0000
commit7a5f73109c44b123dd6e785163f2a2aa2d53730a (patch)
treeb216b967d23dbd1989ae0989c0a05e105ba53edf /build-tools
parent8d7f0d554a8ba13906ade445a07afdc52ab8f8b3 (diff)
More cleanup of version info (and workaround for JDK 1.5 bug in static
final string assignments) git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@49 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'build-tools')
-rw-r--r--build-tools/VersionInfo.java27
1 files changed, 18 insertions, 9 deletions
diff --git a/build-tools/VersionInfo.java b/build-tools/VersionInfo.java
index 976bbb0..d2c3986 100644
--- a/build-tools/VersionInfo.java
+++ b/build-tools/VersionInfo.java
@@ -113,14 +113,14 @@ class VersionInfo extends Object {
* This will typically by null for final, released builds, but
* should be non-null for all other builds.
*/
- private static final String VERSION_BUILD = devPhase ? "@VERSION_BUILD@" : null;
+ private static final String VERSION_BUILD = "@VERSION_BUILD@";
/**
* Date stamp
*
* This is only used for daily builds.
*/
- private static final String BUILDTIME = dailyBuild ? "@BUILDTIME@" : null;
+ private static final String BUILDTIME = "@BUILDTIME@";
/**
* Specification version (major and minor version only). This
@@ -177,35 +177,44 @@ class VersionInfo extends Object {
* will automatically be added) and before the optional dev
* string. This string is only used for non-fcs (non-production) builds.
*/
- private static final String BUILDTIME_VERBOSE = devPhase ? "@BUILDTIME_VERBOSE@" : null;
+ private static final String BUILDTIME_VERBOSE = "@BUILDTIME_VERBOSE@";
+
+ private static boolean isNonEmpty(String str) {
+ if ((str == null) || (str.length() == 0)) {
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
// The static initializer composes the version and vendor strings
static {
// Assign the vendor by concatenating primary and developer
// vendor strings
String tmpVendor = VENDOR_PRIMARY;
- if (VENDOR_DEVELOPER != null) {
+ if (isNonEmpty(VENDOR_DEVELOPER)) {
tmpVendor += " & " + VENDOR_DEVELOPER;
}
String tmpVersion = VERSION_BASE;
- if (VERSION_BUILD != null) {
+ if (devPhase && isNonEmpty(VERSION_BUILD)) {
tmpVersion += "-" + VERSION_BUILD;
}
- if (BUILDTIME != null) {
+ if (dailyBuild && isNonEmpty(BUILDTIME)) {
tmpVersion += "-" + BUILDTIME;
}
- if (VERSION_SUFFIX != null) {
+ if (isNonEmpty(VERSION_SUFFIX)) {
tmpVersion += "-" + VERSION_SUFFIX;
}
- if (BUILDTIME_VERBOSE != null) {
+ if (devPhase && isNonEmpty(BUILDTIME_VERBOSE)) {
tmpVersion += " " + BUILDTIME_VERBOSE;
}
- if (VERSION_DEV_STRING != null) {
+ if (isNonEmpty(VERSION_DEV_STRING)) {
tmpVersion += " " + VERSION_DEV_STRING;
}