All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cflint.Version Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.5.0
Show newest version
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 "";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy