jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1820116 - /jmeter/trunk/src/functions/org/apache/jmeter/functions/TimeShift.java
Date Thu, 04 Jan 2018 16:18:07 GMT
Author: pmouawad
Date: Thu Jan  4 16:18:07 2018
New Revision: 1820116

URL: http://svn.apache.org/viewvc?rev=1820116&view=rev
Log:
Format for better readability

Modified:
    jmeter/trunk/src/functions/org/apache/jmeter/functions/TimeShift.java

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/TimeShift.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/TimeShift.java?rev=1820116&r1=1820115&r2=1820116&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/TimeShift.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/TimeShift.java Thu Jan  4 16:18:07
2018
@@ -192,11 +192,16 @@ public class TimeShift extends AbstractF
 
     private DateTimeFormatter createFormatter(LocaleFormatObject format) {
         log.debug("Create a new instance of DateTimeFormatter for format '{}' in the cache",
format);
-        return new DateTimeFormatterBuilder().appendPattern(format.getFormat()).parseDefaulting(ChronoField.NANO_OF_SECOND,
0)
-                .parseDefaulting(ChronoField.MILLI_OF_SECOND, 0).parseDefaulting(ChronoField.SECOND_OF_MINUTE,
0)
-                .parseDefaulting(ChronoField.MINUTE_OF_HOUR, 0).parseDefaulting(ChronoField.HOUR_OF_DAY,
0)
-                .parseDefaulting(ChronoField.DAY_OF_MONTH, 1).parseDefaulting(ChronoField.MONTH_OF_YEAR,
1)
-                .parseDefaulting(ChronoField.YEAR_OF_ERA, Year.now().getValue()).toFormatter(format.getLocale());
+        return new DateTimeFormatterBuilder().appendPattern(format.getFormat())
+                .parseDefaulting(ChronoField.NANO_OF_SECOND, 0)
+                .parseDefaulting(ChronoField.MILLI_OF_SECOND, 0)
+                .parseDefaulting(ChronoField.SECOND_OF_MINUTE, 0)
+                .parseDefaulting(ChronoField.MINUTE_OF_HOUR, 0)
+                .parseDefaulting(ChronoField.HOUR_OF_DAY, 0)
+                .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
+                .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
+                .parseDefaulting(ChronoField.YEAR_OF_ERA, Year.now().getValue())
+                .toFormatter(format.getLocale());
 
     }
 



Mime
View raw message