summaryrefslogtreecommitdiff
path: root/base/src/main/java/bjc/utils/PropertyDB.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/main/java/bjc/utils/PropertyDB.java')
-rw-r--r--base/src/main/java/bjc/utils/PropertyDB.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/base/src/main/java/bjc/utils/PropertyDB.java b/base/src/main/java/bjc/utils/PropertyDB.java
index 713e1e0..9f95d0a 100644
--- a/base/src/main/java/bjc/utils/PropertyDB.java
+++ b/base/src/main/java/bjc/utils/PropertyDB.java
@@ -45,7 +45,7 @@ public class PropertyDB {
* Do the load with the write lock taken.
*/
loadLock.write(() -> {
- if (LOGLOAD) {
+ if(LOGLOAD) {
System.out.println("Reading regex properties:");
}
@@ -54,13 +54,13 @@ public class PropertyDB {
*/
regexes = new SimpleProperties();
regexes.loadFrom(PropertyDB.class.getResourceAsStream("/regexes.sprop"), false);
- if (LOGLOAD) {
+ if(LOGLOAD) {
regexes.outputProperties();
System.out.println();
}
compiledRegexes = new HashMap<>();
- if (LOGLOAD) {
+ if(LOGLOAD) {
System.out.println("Reading format properties:");
}
@@ -69,7 +69,7 @@ public class PropertyDB {
*/
formats = new SimpleProperties();
formats.loadFrom(PropertyDB.class.getResourceAsStream("/formats.sprop"), false);
- if (LOGLOAD) {
+ if(LOGLOAD) {
formats.outputProperties();
System.out.println();
}
@@ -80,13 +80,13 @@ public class PropertyDB {
* Retrieve a persisted regular expression.
*
* @param key
- * The name of the regular expression.
+ * The name of the regular expression.
*
* @return The regular expression with that name.
*/
public static String getRegex(final String key) {
return loadLock.read(() -> {
- if (!regexes.containsKey(key)) {
+ if(!regexes.containsKey(key)) {
final String msg = String.format("No regular expression named '%s' found", key);
throw new NoSuchElementException(msg);
@@ -101,13 +101,13 @@ public class PropertyDB {
* expression.
*
* @param key
- * The name of the regular expression.
+ * The name of the regular expression.
*
* @return The regular expression with that name.
*/
public static Pattern getCompiledRegex(final String key) {
return loadLock.read(() -> {
- if (!regexes.containsKey(key)) {
+ if(!regexes.containsKey(key)) {
final String msg = String.format("No regular expression named '%s' found", key);
throw new NoSuchElementException(msg);
@@ -126,13 +126,13 @@ public class PropertyDB {
* Retrieve a persisted format string.
*
* @param key
- * The name of the format string.
+ * The name of the format string.
*
* @return The format string with that name.
*/
public static String getFormat(final String key) {
return loadLock.read(() -> {
- if (!formats.containsKey(key)) {
+ if(!formats.containsKey(key)) {
final String msg = String.format("No format string named '%s' found", key);
throw new NoSuchElementException(msg);
@@ -147,10 +147,10 @@ public class PropertyDB {
* arguments.
*
* @param key
- * The name of the format string.
+ * The name of the format string.
*
* @param objects
- * The parameters to the format string.
+ * The parameters to the format string.
*
* @return The format string with that name.
*/