From 9cec84e1594129c4035cb5e258e13cd1191eac19 Mon Sep 17 00:00:00 2001 From: Serban Jora Date: Thu, 5 Oct 2017 00:53:51 -0400 Subject: Add Docker build plugin and support Change-Id: I5dde9d9c12a5f62f53a1ce943fe5acf8a2c236bd Issue-Id: MODELING-26 Signed-off-by: Serban Jora --- .../src/main/java/org/onap/tosca/checker/Messages.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'javatoscachecker/checker') diff --git a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Messages.java b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Messages.java index 98158da..be10ea9 100644 --- a/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Messages.java +++ b/javatoscachecker/checker/src/main/java/org/onap/tosca/checker/Messages.java @@ -13,6 +13,7 @@ package org.onap.tosca.checker; import java.text.MessageFormat; +import java.util.Locale; import java.util.ResourceBundle; import java.util.MissingResourceException; @@ -28,9 +29,14 @@ public class Messages { this.messages = ResourceBundle.getBundle("org/onap/tosca/checker/messages"); } catch (MissingResourceException mrx) { - throw new RuntimeException("", mrx); + //default + try { + this.messages = ResourceBundle.getBundle("org/onap/tosca/checker/messages", new Locale("en", "US")); + } + catch (MissingResourceException mrxx) { + throw new RuntimeException("Faile to load resources for locale or default resources", mrx); + } } - //check that the Message enum is in sync with the resource bundle } @@ -52,3 +58,4 @@ public class Messages { INCOMPATIBLE_REQUIREMENT_TARGET } } + -- cgit 1.2.3-korg