Removed boxing

This commit is contained in:
nathan 2020-08-18 22:02:28 +02:00
parent 11050a86de
commit dbbec59db0
2 changed files with 14 additions and 10 deletions

View File

@ -71,9 +71,9 @@ public final class Exit {
private static int UPGRADE_EXECUTABLE = 103; // must match C source private static int UPGRADE_EXECUTABLE = 103; // must match C source
static { static {
RESERVED_LIST.add(new Integer(SAVED_IN_LOG_FILE)); RESERVED_LIST.add(SAVED_IN_LOG_FILE);
RESERVED_LIST.add(new Integer(RESTART)); RESERVED_LIST.add(RESTART);
RESERVED_LIST.add(new Integer(UPGRADE_EXECUTABLE)); RESERVED_LIST.add(UPGRADE_EXECUTABLE);
} }

View File

@ -15,12 +15,16 @@
*/ */
package dorkbox.util.properties; package dorkbox.util.properties;
import dorkbox.util.FileUtil; import java.awt.Color;
import java.io.File;
import java.awt.*; import java.io.FileInputStream;
import java.io.*; import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties; import java.util.Properties;
import dorkbox.util.FileUtil;
public public
class PropertiesProvider { class PropertiesProvider {
@ -136,13 +140,13 @@ class PropertiesProvider {
// special cases // special cases
try { try {
if (clazz.equals(Integer.class)) { if (clazz.equals(Integer.class)) {
return (T) new Integer(Integer.parseInt(property)); return (T) Integer.valueOf(Integer.parseInt(property));
} }
if (clazz.equals(Long.class)) { if (clazz.equals(Long.class)) {
return (T) new Long(Long.parseLong(property)); return (T) Long.valueOf(Long.parseLong(property));
} }
if (clazz.equals(Color.class)) { if (clazz.equals(Color.class)) {
return (T) new Color(new Integer(Integer.parseInt(property)), true); return (T) new Color(Integer.parseInt(property), true);
} }
else { else {