From 578ad0d6bc408edf9e6c875156054374f5fd8337 Mon Sep 17 00:00:00 2001
From: Thomas <>
Date: Mon, 22 Mar 2021 18:40:26 +0100
Subject: change to EGIZ codestyle
---
.../moaspss/util/ResourceBundleChain.java | 27 +++++++++++-----------
1 file changed, 13 insertions(+), 14 deletions(-)
(limited to 'moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/ResourceBundleChain.java')
diff --git a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/ResourceBundleChain.java b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/ResourceBundleChain.java
index 1edad95..a5c7ecc 100644
--- a/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/ResourceBundleChain.java
+++ b/moaSig/common/src/main/java/at/gv/egovernment/moaspss/util/ResourceBundleChain.java
@@ -21,7 +21,6 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
package at.gv.egovernment.moaspss.util;
import java.util.ArrayList;
@@ -32,7 +31,7 @@ import java.util.ResourceBundle;
/**
* A class to chain ResourceBundle
s.
- *
+ *
* @author Patrick Peck
* @version $Id$
*/
@@ -40,11 +39,11 @@ public class ResourceBundleChain {
/** Error message indicating the resource is not available. */
private static final String ERROR_MISSING_RESOURCE = "Missing resource";
/** The ResourceBundle
s contained in this chain. */
- private List resourceBundles = new ArrayList();
+ private final List resourceBundles = new ArrayList();
/**
* Add a ResourceBundle
to the chain.
- *
+ *
* @param resourceBundle The ResourceBundle
to add.
*/
public void addResourceBundle(ResourceBundle resourceBundle) {
@@ -53,13 +52,13 @@ public class ResourceBundleChain {
/**
* Return the value of the resource.
- *
+ *
* @param key The key to access the String
resource.
* @return The resource value. All the registered ResourceBundle
s
- * are searched in the order in which they have previously been added to this
- * ResourceBundleChain
.
+ * are searched in the order in which they have previously been added to
+ * this ResourceBundleChain
.
* @throws MissingResourceException The resource coult not be found in any of
- * the bundles.
+ * the bundles.
*/
public String getString(String key) throws MissingResourceException {
MissingResourceException lastException = null;
@@ -68,19 +67,19 @@ public class ResourceBundleChain {
// handle case where no resource bundles have been added
if (resourceBundles.size() == 0) {
throw new MissingResourceException(
- ERROR_MISSING_RESOURCE,
- this.getClass().getName(),
- key);
+ ERROR_MISSING_RESOURCE,
+ this.getClass().getName(),
+ key);
}
// try to find the resource in one of the bundles; if it cannot be found,
// return the exception thrown by the last bundle in the list
for (iter = resourceBundles.iterator(); iter.hasNext();) {
- ResourceBundle resourceBundle = (ResourceBundle) iter.next();
+ final ResourceBundle resourceBundle = (ResourceBundle) iter.next();
try {
- String value = resourceBundle.getString(key);
+ final String value = resourceBundle.getString(key);
return value;
- } catch (MissingResourceException e) {
+ } catch (final MissingResourceException e) {
lastException = e;
}
}
--
cgit v1.2.3