Author: fschumacher
Date: Mon Feb 12 12:24:10 2018
New Revision: 1823955

URL: http://svn.apache.org/viewvc?rev=1823955&view=rev
Log:
Fix Typo, use method reference and re-format a log-message. Part of #358

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=1823955&r1=1823954&r2=1823955&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/TimeShift.java 
(original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/TimeShift.java Mon 
Feb 12 12:24:10 2018
@@ -51,7 +51,7 @@ import com.github.benmanes.caffeine.cach
  *
  * Parameters: - format date @see
  * 
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
- * (optional - defaults to epoch time in millisecond) - date to shift formated
+ * (optional - defaults to epoch time in millisecond) - date to shift formatted
  * as first param (optional - defaults now) - amount of (seconds, minutes,
  * hours, days ) to add (optional - default nothing is add ) - a string of the 
locale for the format
  * ( optional ) - variable name ( optional )
@@ -143,10 +143,10 @@ public class TimeShift extends AbstractF
         if (!StringUtils.isEmpty(format)) {
             try {
                 LocaleFormatObject lfo = new LocaleFormatObject(format, 
locale);
-                formatter = dateTimeFormatterCache.get(lfo, key -> 
createFormatter((LocaleFormatObject) key));
+                formatter = dateTimeFormatterCache.get(lfo, 
this::createFormatter);
             } catch (IllegalArgumentException ex) {
-                log.error(
-                        "Format date pattern '{}' is invalid (see 
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html)",
+                log.error("Format date pattern '{}' is invalid "
+                        + "(see 
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html)",
                         format, ex); // $NON-NLS-1$
                 return "";
             }


Reply via email to