Commit 7e90fbfc authored by Christian Schudt's avatar Christian Schudt

Remove unnecessary (un)boxing of primitive types.

parent 09dde899
......@@ -284,7 +284,7 @@ public class BrowserLauncher {
String mrjVersion = System.getProperty("mrj.version");
String majorMRJVersion = mrjVersion.substring(0, 3);
try {
double version = Double.valueOf(majorMRJVersion).doubleValue();
double version = Double.valueOf(majorMRJVersion);
if (version == 2) {
jvm = MRJ_2_0;
}
......
......@@ -37,14 +37,14 @@ public class ByteFormat extends Format {
* Formats a long which represent a number of bytes.
*/
public String format(long bytes) {
return format(new Long(bytes));
return format(bytes);
}
/**
* Formats a long which represent a number of kilobytes.
*/
public String formatKB(long kilobytes) {
return format(new Long(kilobytes * 1024));
return format(kilobytes * 1024);
}
/**
......@@ -58,7 +58,7 @@ public class ByteFormat extends Format {
@Override
public StringBuffer format(Object obj, StringBuffer buf, FieldPosition pos) {
if (obj instanceof Long) {
long numBytes = ((Long)obj).longValue();
long numBytes = (Long) obj;
if (numBytes < 1024 * 1024) {
DecimalFormat formatter = new DecimalFormat("#,##0.0");
buf.append(formatter.format((double)numBytes / 1024.0)).append(" K");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment