-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jesse Gorzinski <17914061+ThePrez@users.noreply.github.com>
- Loading branch information
Showing
10 changed files
with
242 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.ibm.as400.access; | ||
|
||
import java.text.SimpleDateFormat; | ||
|
||
|
||
// This class is merely an input template to an autogenerated source class | ||
// See use of maven-replacer-plugin in the project manifests | ||
public class BuildInfo { | ||
static String s_compileDateTime = "@timestamp@ (GMT)"; | ||
static String s_jtopenVersion = "@jtopenversion@"; | ||
static boolean s_isDevelopmentBuild = !Boolean.valueOf("@prod.build@"); | ||
|
||
public static boolean isDevelopmentBuild() { | ||
return s_isDevelopmentBuild; | ||
} | ||
public static String getVersion() { | ||
String devBuildSuffix = isDevelopmentBuild() ? " (development build)" : ""; | ||
String v = s_jtopenVersion; | ||
if (v.startsWith("@")) { | ||
return "<unknown>"+devBuildSuffix; | ||
} | ||
return v.trim().replaceFirst("^v", "")+devBuildSuffix; | ||
} | ||
|
||
public static String getTimestampString() { | ||
String ts = s_compileDateTime; | ||
if (ts.startsWith("@")) { | ||
return "<unknown>"; | ||
} | ||
return ts.trim(); | ||
} | ||
|
||
public static String getTimestampYear() { | ||
try { | ||
SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
return ""+ fmt.parse("@timestamp@").getYear() + 1900; | ||
} catch(Exception e) { | ||
return "<unknown>"; | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.