"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/java/edu/umd/cs/findbugs/Version.java" between
findbugs-3.0.0-source.zip and findbugs-3.0.1-source.zip

About: FindBugs uses static analysis to look for bugs in Java code. Source.

Version.java  (findbugs-3.0.0-source):Version.java  (findbugs-3.0.1-source)
skipping to change at line 57 skipping to change at line 57
public static final int MAJOR = 3; public static final int MAJOR = 3;
/** /**
* Minor version number. * Minor version number.
*/ */
public static final int MINOR = 0; public static final int MINOR = 0;
/** /**
* Patch level. * Patch level.
*/ */
public static final int PATCHLEVEL = 0; public static final int PATCHLEVEL = 1;
/** /**
* Development version or release candidate? * Development version or release candidate?
*/ */
public static final boolean IS_DEVELOPMENT = false; public static final boolean IS_DEVELOPMENT = true;
/** /**
* Release candidate number. "0" indicates that the version is not a release * Release candidate number. "0" indicates that the version is not a release
* candidate. * candidate.
*/ */
public static final int RELEASE_CANDIDATE = 0; public static final int RELEASE_CANDIDATE = 0;
public static final String GIT_REVISION = System.getProperty("git.revision" , "UNKNOWN"); public static final String GIT_REVISION = System.getProperty("git.revision" , "UNKNOWN");
/** /**
skipping to change at line 115 skipping to change at line 115
private static final String RELEASE_SUFFIX_WORD; private static final String RELEASE_SUFFIX_WORD;
static { static {
String suffix; String suffix;
if (RELEASE_CANDIDATE > 0) { if (RELEASE_CANDIDATE > 0) {
suffix = "rc" + RELEASE_CANDIDATE; suffix = "rc" + RELEASE_CANDIDATE;
} else if (PREVIEW > 0) { } else if (PREVIEW > 0) {
suffix = "preview" + PREVIEW; suffix = "preview" + PREVIEW;
} else { } else {
suffix = "dev-" + COMPUTED_ECLIPSE_DATE; suffix = "dev-" + COMPUTED_ECLIPSE_DATE;
if (!GIT_REVISION.equals("Unknown")) { if (!"Unknown".equals(GIT_REVISION)) {
suffix += "-" + GIT_REVISION; suffix += "-" + GIT_REVISION;
} }
} }
RELEASE_SUFFIX_WORD = suffix; RELEASE_SUFFIX_WORD = suffix;
} }
public static final String RELEASE_BASE = MAJOR + "." + MINOR + "." + PATCHL EVEL; public static final String RELEASE_BASE = MAJOR + "." + MINOR + "." + PATCHL EVEL;
/** /**
* Release version string. * Release version string.
skipping to change at line 142 skipping to change at line 142
public static final String RELEASE; public static final String RELEASE;
/** /**
* Version of Eclipse plugin. * Version of Eclipse plugin.
*/ */
private static final String COMPUTED_ECLIPSE_UI_VERSION = RELEASE_BASE + "." + COMPUTED_ECLIPSE_DATE; private static final String COMPUTED_ECLIPSE_UI_VERSION = RELEASE_BASE + "." + COMPUTED_ECLIPSE_DATE;
static { static {
Class<Version> c = Version.class; Class<Version> c = Version.class;
URL u = c.getResource(c.getSimpleName() + ".class"); URL u = c.getResource(c.getSimpleName() + ".class");
boolean fromFile = u.getProtocol().equals("file"); boolean fromFile = "file".equals(u.getProtocol());
InputStream in = null; InputStream in = null;
String release = null; String release = null;
String date = null; String date = null;
String plugin_release_date = null; String plugin_release_date = null;
if (!fromFile) { if (!fromFile) {
try { try {
Properties versionProperties = new Properties(); Properties versionProperties = new Properties();
in = Version.class.getResourceAsStream("version.properties"); in = Version.class.getResourceAsStream("version.properties");
if (in != null) { if (in != null) {
versionProperties.load(in); versionProperties.load(in);
skipping to change at line 231 skipping to change at line 231
if (!IS_DEVELOPMENT && RELEASE_CANDIDATE != 0) { if (!IS_DEVELOPMENT && RELEASE_CANDIDATE != 0) {
throw new IllegalStateException("Non developmental version, but is r elease candidate " + RELEASE_CANDIDATE); throw new IllegalStateException("Non developmental version, but is r elease candidate " + RELEASE_CANDIDATE);
} }
if (argv.length == 0) { if (argv.length == 0) {
printVersion(false); printVersion(false);
return; return;
} }
String arg = argv[0]; String arg = argv[0];
if (arg.equals("-release")) { if ("-release".equals(arg)) {
System.out.println(RELEASE); System.out.println(RELEASE);
} else if (arg.equals("-date")) { } else if ("-date".equals(arg)) {
System.out.println(DATE); System.out.println(DATE);
} else if (arg.equals("-props")) { } else if ("-props".equals(arg)) {
System.out.println("release.base=" + RELEASE_BASE); System.out.println("release.base=" + RELEASE_BASE);
System.out.println("release.number=" + COMPUTED_RELEASE); System.out.println("release.number=" + COMPUTED_RELEASE);
System.out.println("release.date=" + COMPUTED_DATE); System.out.println("release.date=" + COMPUTED_DATE);
System.out.println("plugin.release.date=" + COMPUTED_PLUGIN_RELEASE_ DATE); System.out.println("plugin.release.date=" + COMPUTED_PLUGIN_RELEASE_ DATE);
System.out.println("eclipse.ui.version=" + COMPUTED_ECLIPSE_UI_VERSI ON); System.out.println("eclipse.ui.version=" + COMPUTED_ECLIPSE_UI_VERSI ON);
System.out.println("findbugs.website=" + WEBSITE); System.out.println("findbugs.website=" + WEBSITE);
System.out.println("findbugs.downloads.website=" + DOWNLOADS_WEBSITE ); System.out.println("findbugs.downloads.website=" + DOWNLOADS_WEBSITE );
System.out.println("findbugs.git.revision=" + GIT_REVISION); System.out.println("findbugs.git.revision=" + GIT_REVISION);
} else if (arg.equals("-plugins")) { } else if ("-plugins".equals(arg)) {
DetectorFactoryCollection.instance(); DetectorFactoryCollection.instance();
for(Plugin p : Plugin.getAllPlugins()) { for(Plugin p : Plugin.getAllPlugins()) {
System.out.println("Plugin: " + p.getPluginId()); System.out.println("Plugin: " + p.getPluginId());
System.out.println(" description: " + p.getShortDescription()); System.out.println(" description: " + p.getShortDescription());
System.out.println(" provider: " + p.getProvider()); System.out.println(" provider: " + p.getProvider());
String version = p.getVersion(); String version = p.getVersion();
if (version != null && version.length() > 0) { if (version != null && version.length() > 0) {
System.out.println(" version: " + version); System.out.println(" version: " + version);
} }
String website = p.getWebsite(); String website = p.getWebsite();
if (website != null && website.length() > 0) { if (website != null && website.length() > 0) {
System.out.println(" website: " + website); System.out.println(" website: " + website);
} }
System.out.println(); System.out.println();
} }
} else if (arg.equals("-configuration")){ } else if ("-configuration".equals(arg)){
printVersion(true); printVersion(true);
} else { } else {
usage(); usage();
System.exit(1); System.exit(1);
} }
} }
private static void usage() { private static void usage() {
System.err.println("Usage: " + Version.class.getName() + " [(-release|- date|-props|-configuration)]"); System.err.println("Usage: " + Version.class.getName() + " [(-release|- date|-props|-configuration)]");
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS