You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/06/22 13:15:36 UTC
[commons-lang] branch master updated (e291a60 -> b7b4ae3)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git.
from e291a60 Formatting.
new 4d403b4 Formatting.
new b7b4ae3 Formatting.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/main/java/org/apache/commons/lang3/time/DateUtils.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
[commons-lang] 02/02: Formatting.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit b7b4ae33dc1f275297a5125ca7ed323756130dff
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jun 22 09:15:29 2020 -0400
Formatting.
---
src/main/java/org/apache/commons/lang3/time/DateUtils.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
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 1df4e83..fd34049 100644
--- a/src/main/java/org/apache/commons/lang3/time/DateUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DateUtils.java
@@ -361,14 +361,14 @@ public class DateUtils {
* @throws ParseException if none of the date patterns were suitable
* @see java.util.Calendar#isLenient()
*/
- private static Date parseDateWithLeniency(
- final String str, final Locale locale, final String[] parsePatterns, final boolean lenient) throws ParseException {
+ private static Date parseDateWithLeniency(final String str, final Locale locale, final String[] parsePatterns,
+ final boolean lenient) throws ParseException {
if (str == null || parsePatterns == null) {
throw new IllegalArgumentException("Date and Patterns must not be null");
}
final TimeZone tz = TimeZone.getDefault();
- final Locale lcl = locale==null ? Locale.getDefault() : locale;
+ final Locale lcl = locale == null ? Locale.getDefault() : locale;
final ParsePosition pos = new ParsePosition(0);
final Calendar calendar = Calendar.getInstance(tz, lcl);
calendar.setLenient(lenient);
@@ -377,10 +377,10 @@ public class DateUtils {
final FastDateParser fdp = new FastDateParser(parsePattern, tz, lcl);
calendar.clear();
try {
- if (fdp.parse(str, pos, calendar) && pos.getIndex()==str.length()) {
+ if (fdp.parse(str, pos, calendar) && pos.getIndex() == str.length()) {
return calendar.getTime();
}
- } catch(final IllegalArgumentException ignore) {
+ } catch (final IllegalArgumentException ignore) {
// leniency is preventing calendar from being set
}
pos.setIndex(0);
[commons-lang] 01/02: Formatting.
Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit 4d403b4ff374eb7d3569a3e56cf135666ee9691d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jun 22 09:14:34 2020 -0400
Formatting.
---
src/main/java/org/apache/commons/lang3/time/DateUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 078c21e..1df4e83 100644
--- a/src/main/java/org/apache/commons/lang3/time/DateUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DateUtils.java
@@ -368,7 +368,7 @@ public class DateUtils {
}
final TimeZone tz = TimeZone.getDefault();
- final Locale lcl = locale==null ?Locale.getDefault() : locale;
+ final Locale lcl = locale==null ? Locale.getDefault() : locale;
final ParsePosition pos = new ParsePosition(0);
final Calendar calendar = Calendar.getInstance(tz, lcl);
calendar.setLenient(lenient);