Code cleanup

This commit is contained in:
kordum committed 2017-06-15 13:00:25 +03:00
1 parent c005bc02b5
commit d30f682523
2 files changed
+2 -2

No files matched your search

@@ -49,7 +49,7 @@ public class PageBranchOverview extends PageBranch {
branchDescription.clear();
String desc = branch.getDescription();
if (desc.matches("(\\w+\\.?)+")) { // unlocalized
if (desc == null || desc.isEmpty() || desc.matches("(\\w+\\.?)+")) { // unlocalized
desc = I18N.localise("binniecore.gui.database.branch.noDesc");
}
@@ -55,7 +55,7 @@ public class PagePlanksOverview extends PageAbstract<ItemStack> {
String descBody = EnumChatFormatting.ITALIC.toString();
String descSig = "";
if (desc == null || desc.length() == 0 || desc.matches("(\\w+\\.?)+")) {
if (desc == null || desc.isEmpty() || desc.matches("(\\w+\\.?)+")) {
descBody += I18N.localise("binniecore.gui.database.nodescription");
} else {
String[] descStrings = desc.split("\\|");