Skip to content

Commit

Permalink
Improve a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Aug 28, 2023
1 parent be9182b commit 6941523
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.regex.Pattern;

import org.crosswire.common.util.CWClassLoader;
import org.crosswire.common.util.ClassUtil;
Expand All @@ -39,6 +40,7 @@
* @author DM Smith
*/
public final class BibleNames {
public static final Pattern dashPattern = Pattern.compile("\\s*-\\s*");
/**
* Get the singleton instance of BibleNames.
*
Expand Down Expand Up @@ -414,7 +416,7 @@ private void store(ResourceBundle resources, BibleBook book, Map fullMap, Map sh
}

String altBook = getString(resources, osisName + ALT_KEY);
if(altBook != null && altBook.strip().equals("-")) {
if(altBook == null || dashPattern.matcher(altBook).matches()) {
altBook = "";
}

Expand Down

0 comments on commit 6941523

Please sign in to comment.