Skip to content

Commit

Permalink
Merge pull request #643 from pcadabam/master
Browse files Browse the repository at this point in the history
Fix import
  • Loading branch information
pcadabam committed Jan 29, 2016
2 parents 09ccb55 + 5c4ad9c commit 061c715
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

import lombok.extern.slf4j.Slf4j;

import com.sun.tools.javac.util.StringUtils;
import org.apache.commons.lang.StringUtils;




/**
Expand All @@ -42,7 +44,7 @@ public static long timestamp_diff(Timestamp timestamp1, Timestamp timestamp2, St
private static long date_diff(long timestamp1, long timestamp2, String unitString) {

try {
TimeUnit unit = TimeUnit.valueOf(TimeUnit.class, StringUtils.toUpperCase(unitString));
TimeUnit unit = TimeUnit.valueOf(TimeUnit.class, StringUtils.upperCase(unitString));
return unit.convert(timestamp1 - timestamp2, TimeUnit.MILLISECONDS);
} catch (IllegalArgumentException e) {
log.error("Valid input for unitString is java.util.concurrent.TimeUnit", e);
Expand Down

0 comments on commit 061c715

Please sign in to comment.