com.cflint.tools.AllowedExtensionsLoader 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.tools;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.ResourceBundle;
public class AllowedExtensionsLoader {
public static final String CFC_DEFAULT_EXTENSION = ".cfc";
public static final String CFM_DEFAULT_EXTENSION = ".cfm";
public static List init(final String resourceBundleName) {
List allowedExtensions = new ArrayList();
try {
allowedExtensions.addAll(Arrays
.asList(ResourceBundle.getBundle(resourceBundleName).getString("allowedextensions").split(",")));
} catch (final Exception e) {
allowedExtensions.add(CFC_DEFAULT_EXTENSION);
allowedExtensions.add(CFM_DEFAULT_EXTENSION);
}
return allowedExtensions;
}
}