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

com.cflint.tools.AllowedExtensionsLoader 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.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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy