// Copyright 2000 Jonathan White // Use/modify this however you want, just keep this and the previous line package mt.util; import java.util.Properties; public class StrictProperties extends Properties{ //A strict property is one that does not return null // it throws an exception instead public String getStrictProperty(String key) throws PropertyNotFoundException { String prop = getProperty(key); if(prop == null) throw new PropertyNotFoundException("Property \""+ key + "\" not found."); return prop; } }