- From: Mercurial notifier <nobody@w3.org>
- Date: Fri, 18 Jun 2010 16:19:01 -0400
- To: Unicorn Updates <www-validator-cvs@w3.org>
changeset: 1275:ac55724157c7 tag: tip user: Thomas Gambet <tgambet@w3.org> date: Fri Jun 18 16:21:25 2010 -0400 files: src/org/w3c/unicorn/Framework.java description: fixed: threw a npe if messages.properties does not exist diff -r 2f327d07c235 -r ac55724157c7 src/org/w3c/unicorn/Framework.java --- a/src/org/w3c/unicorn/Framework.java Fri Jun 18 16:12:39 2010 -0400 +++ b/src/org/w3c/unicorn/Framework.java Fri Jun 18 16:21:25 2010 -0400 @@ -567,6 +567,13 @@ logger.debug("-------------------------------------------------------"); logger.debug("Loading messages from messages.properties"); + InputStream stream = Framework.class.getResourceAsStream("/messages.properties"); + + if (stream == null) { + logger.info("File messages.properties not found in classpath. No default message has been added."); + return; + } + Properties props = new Properties(); try { props.load(Framework.class.getResourceAsStream("/messages.properties"));
Received on Friday, 18 June 2010 20:21:49 UTC