From 79d3a4a47cbc1fcf17c77c6fc12ff826a3077bac Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Wed, 6 Apr 2016 13:50:00 -0400 Subject: Minor bugfixes/changes, as well as beginnings of CLI systems --- BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java b/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java index b09fbd8..37f7edf 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java +++ b/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleDialogs.java @@ -43,7 +43,9 @@ public class SimpleDialogs { int value = Integer.parseInt(strang); return (value < upperBound) && (value > lowerBound); - } catch (NumberFormatException nfe) { + } catch (@SuppressWarnings("unused") NumberFormatException nfex) { + // We don't care about the specifics of the exception, just + // that this value isn't good return false; } }, Integer::parseInt); @@ -125,7 +127,9 @@ public class SimpleDialogs { try { Integer.parseInt(strang); return true; - } catch (NumberFormatException nfe) { + } catch (@SuppressWarnings("unused") NumberFormatException nfex) { + // We don't care about this exception, just mark the value + // as not good return false; } }, Integer::parseInt); @@ -257,7 +261,7 @@ public class SimpleDialogs { throw new NullPointerException( "Error message must not be null"); } - + JOptionPane.showMessageDialog(parent, errorMessage, title, JOptionPane.ERROR_MESSAGE); } -- cgit v1.2.3