/**
* Constructor with i18n translation key and CSS style class
* <p>
- * @param messageKey Message key (i18n)
+ * @param messageKey Message key (i18n)
* @param styleClass CSS style class
*/
private FinancialInterval (final String messageKey, final String styleClass) {
+ // Validate parameter
+ if (null == messageKey) {
+ // Throw NPE
+ throw new NullPointerException("messageKey is null"); //NOI18N
+ } else if (messageKey.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("messageKey is empty"); //NOI18N
+ } else if (null == styleClass) {
+ // Throw NPE
+ throw new NullPointerException("styleClass is null"); //NOI18N
+ } else if (styleClass.isEmpty()) {
+ // Throw IAE
+ throw new IllegalArgumentException("styleClass is empty"); //NOI18N
+ }
+
// Set it here
this.messageKey = messageKey;
this.styleClass = styleClass;