com.cflint.Version Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of CFLint Show documentation
Show all versions of CFLint Show documentation
A static code analysis tool for ColdFusion (in the spirit of FindBugs and Lint). With CFLint, you are able to analyze your ColdFusion code base for code violations.
package com.cflint;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public class Version {
public static String getVersion() {
final InputStream is = Version.class.getResourceAsStream("/META-INF/maven/com.github.cflint/CFLint/pom.properties");
try {
final BufferedReader reader = new BufferedReader(new InputStreamReader(is));
String line = reader.readLine();
while (line != null && !line.startsWith("version=")) {
line = reader.readLine();
}
if (line != null) {
return line.replaceAll("version=", "");
}
} catch (final Exception e) {
try {
if (is != null) {
is.close();
}
} catch (final IOException e1) {
e1.printStackTrace();
}
}
return "";
}
}