public static String secondsToTimeString(long in_seconds) {
StringBuilder buff = new StringBuilder(9);
+ if (in_seconds < 0) {
+ buff.append('-');
+ in_seconds = -in_seconds;
+ }
long rest = in_seconds;
long hour = rest / 3600;
rest = rest % 3600;
}
if (mb) {
+ StringBuilder buff = new StringBuilder();
+ if (bytes < 0) {
+ buff.append('-');
+ bytes = -bytes;
+ }
long mbytes = bytes / (1024 * 1024);
long rest =
((bytes - (mbytes * (1024 * 1024))) * 100) / (1024 * 1024);
- return (mbytes + "." + ((rest < 10) ? "0" : "") + rest + " MB");
+ buff.append(mbytes).append('.');
+ if (rest < 10) {
+ buff.append('0');
+ }
+ buff.append(rest).append(" MB");
+ return buff.toString();
} else {
return ((bytes / 1024) + " KB");
}
<fix>
CVE-2010-4172: Multiple XSS in Manager application. (markt/kkolinko)
</fix>
+ <fix>
+ <bug>50316</bug>: Fix display of negative values in Manager application.
+ (kkolinko)
+ </fix>
</changelog>
</subsection>
<subsection name="Other">