From d30f682523adfa08726f5e4afccd8744bc7b8a18 Mon Sep 17 00:00:00 2001 From: kordum Date: Thu, 15 Jun 2017 13:00:25 +0300 Subject: [PATCH] Code cleanup --- .../java/binnie/core/craftgui/database/PageBranchOverview.java | 2 +- .../extratrees/craftgui/dictionary/PagePlanksOverview.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/binnie/core/craftgui/database/PageBranchOverview.java b/src/main/java/binnie/core/craftgui/database/PageBranchOverview.java index 61eb7e5d..0757de71 100644 --- a/src/main/java/binnie/core/craftgui/database/PageBranchOverview.java +++ b/src/main/java/binnie/core/craftgui/database/PageBranchOverview.java @@ -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"); } diff --git a/src/main/java/binnie/extratrees/craftgui/dictionary/PagePlanksOverview.java b/src/main/java/binnie/extratrees/craftgui/dictionary/PagePlanksOverview.java index 7bdeca4a..a9f66c37 100644 --- a/src/main/java/binnie/extratrees/craftgui/dictionary/PagePlanksOverview.java +++ b/src/main/java/binnie/extratrees/craftgui/dictionary/PagePlanksOverview.java @@ -55,7 +55,7 @@ public class PagePlanksOverview extends PageAbstract { 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("\\|");