Tuesday, August 19, 2008

Megalomania - trust me, I know the answer!

In a recent project we had a code-review. The following piece of code turned up:

	
public static void configure(File cfgFile) {
		Configuration cfg = new Configuration();
		try {
			File mappingResources = new File("resource-gen/hibernate.cfg.xml");
			cfg.configure(mappingResources); // get configuration of mapping ressources from the generated hibernate.cfg.xml in src-gen
			cfg.configure(cfgFile); // get additional configuration from the passed file
			sessionFactory = cfg.buildSessionFactory();
		} catch (Exception e) {
			int n = 42;
		}
	}

I seem quite confident, that I know the answer to everything ...

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...