From d6a556dad71a7d785b9c40608d0bf56062b134a5 Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Thu, 6 Feb 2014 13:51:45 +0000 Subject: [PATCH] Add explict default case git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1565257 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/commons/lang3/text/ExtendedMessageFormat.java | 2 ++ src/main/java/org/apache/commons/lang3/time/DateUtils.java | 6 ++++++ .../java/org/apache/commons/lang3/time/FastDateParser.java | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java index 1d1c5a5a4..35604caca 100644 --- a/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java +++ b/src/main/java/org/apache/commons/lang3/text/ExtendedMessageFormat.java @@ -389,6 +389,8 @@ public class ExtendedMessageFormat extends MessageFormat { case QUOTE: getQuotedString(pattern, pos, false); break; + default: + break; } } throw new IllegalArgumentException( diff --git a/src/main/java/org/apache/commons/lang3/time/DateUtils.java b/src/main/java/org/apache/commons/lang3/time/DateUtils.java index 61400f073..e57b53765 100644 --- a/src/main/java/org/apache/commons/lang3/time/DateUtils.java +++ b/src/main/java/org/apache/commons/lang3/time/DateUtils.java @@ -1073,6 +1073,8 @@ public class DateUtils { offsetSet = true; } break; + default: + break; } if (!offsetSet) { final int min = val.getActualMinimum(aField[0]); @@ -1195,6 +1197,8 @@ public class DateUtils { startCutoff = focus.get(Calendar.DAY_OF_WEEK) - 3; endCutoff = focus.get(Calendar.DAY_OF_WEEK) + 3; break; + default: + break; } break; default: @@ -1694,6 +1698,8 @@ public class DateUtils { case Calendar.MONTH: result += ((calendar.get(Calendar.DAY_OF_MONTH) -1) * MILLIS_PER_DAY) / millisPerUnit; break; + default: + break; } switch (fragment) { diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java index c8448e1f6..591556bbb 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java @@ -346,6 +346,8 @@ public class FastDateParser implements DateParser, Serializable { c = 'Q'; // appended below } break; + default: + break; } regex.append(c); }