mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-03 15:15:54 +00:00
set spotbugs ICAST_IDIV_CAST_TO_DOUBLE to ignore, because precision loss is intended
This commit is contained in:
1 parent
8b893a1cbe
commit
2fbc94bb87
1 file changed
+2
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
||||
import hudson.model.TaskListener;
|
||||
import jenkins.util.MemoryReductionUtil;
|
||||
import hudson.util.QuotedStringTokenizer;
|
||||
@@ -692,6 +693,7 @@ public class Util {
|
||||
* number of milliseconds.
|
||||
*/
|
||||
@Nonnull
|
||||
@SuppressFBWarnings(value = "ICAST_IDIV_CAST_TO_DOUBLE", justification = "We want to truncate here.")
|
||||
public static String getTimeSpanString(long duration) {
|
||||
// Break the duration up in to units.
|
||||
long years = duration / ONE_YEAR_MS;
|
||||
|
||||
Reference in new issue
Block a user