Dec 28, 2004 / Java static and condition checking

0 comments
While reading Martin Fowler's book "Patterns of Enterprise Application Architecture ", found a good way to check input parameters. This is a kind of pre-condition checking in Design By Contract methodology.
class PluginFactory...
	private static Properties props = new Properties();

	static {
		try {
			String propsFile = System.getProperty("plugins");
			props.load(new FileInputStream(propsFile));
		} catch (Exception ex) {
			throw new ExceptionInInitializerError(ex);
		}
	}

0 Comments:

Post a Comment

<< Home

Subscribe to the RSS feed
Stay tuned by having the latest updates via RSS
Follow TargetProcess on Twitter
Get in touch with our team

TargetProcess is an agile project management tool. It is designed to solve distributed teams problems and support agile development processes.



Key Features

  • Full Agile Project Management Support (Scrum, XP, Custom)
  • Productivity Tools (Tp.Tray, ToDo list, dashboards, Inline editing)
  • Customizable Development Process
  • Subversion Integration
  • Integrated Bug Tracking, Help Desk, Time Tracking

Get TargetProcess for Free (5 users pack)

Previous Posts



    follow me on Twitter