Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ide/api.debugger/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

is.autoload=true
javac.compilerargs=-Xlint:unchecked
javac.source=1.8
javac.release=17
javadoc.arch=${basedir}/arch.xml
javadoc.apichanges=${basedir}/apichanges.xml
40 changes: 20 additions & 20 deletions ide/api.debugger/src/org/netbeans/api/debugger/Properties.java
Original file line number Diff line number Diff line change
Expand Up @@ -1454,17 +1454,17 @@ public String[] getSupportedClassNames() {
@Override
public Object read(String className, Properties properties) {
if (classNames[0].equals(className)) {
return Boolean.valueOf(properties.getBoolean(propertyName, false));
return properties.getBoolean(propertyName, false);
} else if (classNames[1].equals(className)) {
return properties.getByte(propertyName, (byte)0);
} else if (classNames[2].equals(className)) {
return new Character(properties.getChar(propertyName, (char) 0));
return properties.getChar(propertyName, (char)0);
} else if (classNames[3].equals(className)) {
return properties.getShort(propertyName, (short)0);
} else if (classNames[4].equals(className)) {
return Integer.valueOf(properties.getInt(propertyName, 0));
return properties.getInt(propertyName, 0);
} else if (classNames[5].equals(className)) {
return new Long(properties.getLong(propertyName, 0l));
return properties.getLong(propertyName, 0l);
} else if (classNames[6].equals(className)) {
return properties.getFloat(propertyName, 0f);
} else if (classNames[7].equals(className)) {
Expand All @@ -1475,22 +1475,22 @@ public Object read(String className, Properties properties) {

@Override
public void write(Object object, Properties properties) {
if (object instanceof Boolean) {
properties.setBoolean(propertyName, ((Boolean) object).booleanValue());
} else if (object instanceof Byte) {
properties.setByte(propertyName, ((Byte) object).byteValue());
} else if (object instanceof Character) {
properties.setChar(propertyName, ((Character) object).charValue());
} else if (object instanceof Short) {
properties.setShort(propertyName, ((Short) object).shortValue());
} else if (object instanceof Integer) {
properties.setInt(propertyName, ((Integer) object).intValue());
} else if (object instanceof Long) {
properties.setLong(propertyName, ((Long) object).longValue());
} else if (object instanceof Float) {
properties.setFloat(propertyName, ((Float) object).floatValue());
} else if (object instanceof Double) {
properties.setDouble(propertyName, ((Double) object).doubleValue());
if (object instanceof Boolean b) {
properties.setBoolean(propertyName, b);
} else if (object instanceof Byte b) {
properties.setByte(propertyName, b);
} else if (object instanceof Character c) {
properties.setChar(propertyName, c);
} else if (object instanceof Short s) {
properties.setShort(propertyName, s);
} else if (object instanceof Integer i) {
properties.setInt(propertyName, i);
} else if (object instanceof Long l) {
properties.setLong(propertyName, l);
} else if (object instanceof Float f) {
properties.setFloat(propertyName, f);
} else if (object instanceof Double d) {
properties.setDouble(propertyName, d);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ void setIssue(BugzillaIssue issue,
} catch (ParseException pex) {
Bugzilla.LOG.log(Level.INFO, null, pex);
}
sections.add(addSection(layout,
new Long(0),
sections.add(addSection(layout, Long.valueOf(0),
issue.getFieldValue(IssueField.DESCRIPTION),
issue.getFieldValue(IssueField.REPORTER),
issue.getFieldValue(IssueField.REPORTER_NAME),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,20 +453,20 @@ public static Object validate(Object valueObj, DBColumn col) throws DBException

case Types.INTEGER: {
long ldata = Long.parseLong(valueObj.toString());
if(ldata >= ((long) Integer.MIN_VALUE) && ldata <= ((long) Integer.MAX_VALUE)) {
return Integer.valueOf((int) ldata);
} else if ( ldata < maxUnsignedInt ) {
return new Long(ldata);
if (ldata >= ((long) Integer.MIN_VALUE) && ldata <= ((long) Integer.MAX_VALUE)) {
return (int) ldata;
} else if (ldata < maxUnsignedInt) {
return ldata;
} else {
throw new NumberFormatException("Illegal value for java.sql.Type.Integer");
}
}

case Types.SMALLINT: {
int idata = Integer.parseInt(valueObj.toString());
if(idata >= ((int) Short.MIN_VALUE) && idata <= ((int) Short.MAX_VALUE)) {
if (idata >= ((int) Short.MIN_VALUE) && idata <= ((int) Short.MAX_VALUE)) {
return (short) idata;
} else if ( idata < maxUnsignedShort ) {
} else if ( idata < maxUnsignedShort ) {
return idata;
} else {
throw new NumberFormatException("Illegal value for java.sql.Type.SMALLINT");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ public static Object defaultScalarValue(int type) {
case Common.TYPE_BYTE:
return (byte)0;
case Common.TYPE_CHAR:
return new Character('\0');
return '\0';
case Common.TYPE_SHORT:
return (short)0;
case Common.TYPE_INT:
return Integer.valueOf(0);
return 0;
case Common.TYPE_LONG:
return new Long(0);
return 0L;
case Common.TYPE_FLOAT:
return 0.0F;
case Common.TYPE_DOUBLE:
Expand Down Expand Up @@ -415,7 +415,7 @@ public static String getMessage(String key, Object p1) {
}

public static String getMessage(String key, int p1) {
return Common.getMessage(key, new Object[] {Integer.valueOf(p1)});
return Common.getMessage(key, new Object[] {p1});
}

public static String getMessage(String key, Object p1, Object p2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -890,13 +890,13 @@ public Object defaultScalarValue(int type) {
case Common.TYPE_BYTE:
return (byte)0;
case Common.TYPE_CHAR:
return new Character('\0');
return '\0';
case Common.TYPE_SHORT:
return (short)0;
case Common.TYPE_INT:
return Integer.valueOf(0);
return 0;
case Common.TYPE_LONG:
return new Long(0);
return 0L;
case Common.TYPE_FLOAT:
return 0.0F;
case Common.TYPE_DOUBLE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3425,7 +3425,7 @@ public Object fetchPropertyByName(String name) {
if ("indent".equals(name))
return getIndent();
if ("indentAmount".equals(name))
return new java.lang.Integer(getIndentAmount());
return getIndentAmount();
if ("mddFile".equals(name))
return getMddFile();
if ("mddIn".equals(name))
Expand Down Expand Up @@ -3503,7 +3503,7 @@ public Object fetchPropertyByName(String name) {
if ("generateHasChanged".equals(name))
return (isGenerateHasChanged() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if ("newestSourceTime".equals(name))
return new java.lang.Long(getNewestSourceTime());
return getNewestSourceTime();
if ("writeBeanGraphFile".equals(name))
return getWriteBeanGraphFile();
if ("readBeanGraphFiles[]".equals(name))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,17 +741,17 @@ else if ("double".equals(type))
else if ("boolean".equals(type))
Boolean.valueOf(value).booleanValue();
else if ("java.lang.Double".equals(type))
new java.lang.Double(value);
Double.valueOf(value);
else if ("java.lang.Integer".equals(type))
new java.lang.Integer(value);
Integer.valueOf(value);
else if ("java.lang.Boolean".equals(type))
Boolean.valueOf(value);
else if ("java.lang.Float".equals(type))
new java.lang.Float(value);
Float.valueOf(value);
else if ("java.lang.Short".equals(type))
new java.lang.Short(value);
Short.valueOf(value);
else if ("java.lang.Long".equals(type))
new java.lang.Long(value);
Long.valueOf(value);
else if ("java.math.BigDecimal".equals(type))
new java.math.BigDecimal(value);
else if ("java.math.BigInteger".equals(type))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ public void run() {
} while (fileToRefresh != null);
if (logEnabled) {
LOG.log(Level.FINE, "refreshTask lasted {0} ms for {1} files, {2} files refreshed so far", new Object[] { //NOI18N
new Long(System.currentTimeMillis() - startTime), new Long(files), new Long(refreshedFilesCount)});
Long.valueOf(System.currentTimeMillis() - startTime), Long.valueOf(files), Long.valueOf(refreshedFilesCount)}
);
}
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -773,11 +773,11 @@ public void run() {
if(file.length() > 1024 * 1024) {
long size = file.length();
Object[] arr = {
getFilename(),
new Long (size), // bytes
new Long (size / 1024 + 1), // kilobytes
new Long (size / (1024 * 1024)), // megabytes
new Long (size / (1024 * 1024 * 1024)), // gigabytes
getFilename(),
Long.valueOf(size), // bytes
Long.valueOf(size / 1024 + 1), // kilobytes
Long.valueOf(size / (1024 * 1024)), // megabytes
Long.valueOf(size / (1024 * 1024 * 1024)) // gigabytes
};
DialogDescriptor c = new DialogDescriptor(
NbBundle.getMessage(AttachmentPanel.class, "MSG_ObjectIsTooBig", arr),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ public void setData(FileLock lock, String s, boolean modify) throws IOException
if (setData(s)) {
if (!modified) {
saveData(lock);
firePropertyChange(PROPERTY_DATA_UPDATED, new Long(oldTimeStamp), new Long(timeStamp));
firePropertyChange(PROPERTY_DATA_UPDATED, oldTimeStamp, timeStamp);
} else {
firePropertyChange(PROPERTY_DATA_MODIFIED, new Long(oldTimeStamp), new Long(timeStamp));
firePropertyChange(PROPERTY_DATA_MODIFIED, oldTimeStamp, timeStamp);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public final class CPLongInfo extends CPEntry {

CPLongInfo(ConstantPool pool, long v) {
super(pool);
value = new Long(v);
value = v;
}

/* The VM doesn't allow the next constant pool slot to be used
Expand All @@ -43,6 +43,7 @@ boolean usesTwoSlots() {
return true;
}

@Override
public final int getTag() {
return ConstantPool.CONSTANT_Long;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ public static void xmlTestResults(String path, String suite, String name, String
perfDataTag=allPerfDoc.createElement("PerformanceData");
if (i==1) perfDataTag.setAttribute("runOrder", "1");
else perfDataTag.setAttribute("runOrder", "2");
perfDataTag.setAttribute("value", new Long(results[i]).toString());
perfDataTag.setAttribute("value", Long.toString(results[i]));
testTag.appendChild(perfDataTag);
}
}
Expand All @@ -815,13 +815,13 @@ public static void xmlTestResults(String path, String suite, String name, String
testTag.setAttribute("name", name);
testTag.setAttribute("unit", unit);
testTag.setAttribute("results", pass);
testTag.setAttribute("threshold", new Long(threshold).toString());
testTag.setAttribute("threshold", Long.toString(threshold));
testTag.setAttribute("classname", classname);
for (int i=1;i<=repeat;i++) {
perfDataTag=allPerfDoc.createElement("PerformanceData");
if (i==1) perfDataTag.setAttribute("runOrder", "1");
else perfDataTag.setAttribute("runOrder", "2");
perfDataTag.setAttribute("value", new Long(results[i]).toString());
perfDataTag.setAttribute("value", Long.toString(results[i]));
testTag.appendChild(perfDataTag);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ protected static HashMap<String, Long> parseMeasuredValues(File measuredFile) th
}

value = readLine.substring(begin + str.length(), end);
measuredValues.put(str, new Long(value));
measuredValues.put(str, Long.valueOf(value));
startup_data.remove(str);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Long hash() {
result *= 1951;
}

return new Long(result);
return result;
}

private static HashMap<CacheEntry,BufferedImage> cache = new HashMap<CacheEntry,BufferedImage>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ private Object defaultValue() {

if (indexedProperty.getElementType().isPrimitive()) {
if (getConvertedType().equals(Integer.class)) {
value = new Integer(0);
value = 0;
}

if (getConvertedType().equals(Boolean.class)) {
Expand All @@ -356,7 +356,7 @@ private Object defaultValue() {
}

if (getConvertedType().equals(Character.class)) {
value = new Character('\u0000');
value = '\u0000';
}

if (getConvertedType().equals(Double.class)) {
Expand All @@ -368,7 +368,7 @@ private Object defaultValue() {
}

if (getConvertedType().equals(Long.class)) {
value = new Long(0L);
value = 0L;
}

if (getConvertedType().equals(Short.class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.PrintWriter;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.AbstractMap;
Expand Down Expand Up @@ -922,9 +921,9 @@ private Object getObject(Object[] params) throws Exception {
case 1:
return Short.valueOf(value);
case 2:
return new Integer(value); //(objI);
return Integer.valueOf(value); //(objI);
case 3:
return new Long(value);
return Long.valueOf(value);
case 4:
return Float.valueOf(value);
case 5:
Expand All @@ -935,7 +934,7 @@ private Object getObject(Object[] params) throws Exception {
if (value.trim().length() != 1) {
break;
}
return new Character(value.charAt(0));
return value.charAt(0);
case 8:
return value;
case 9:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ public SizeProperty() {
}

public Long getValue() {
return new Long(getDataObject().getPrimaryFile().getSize());
return getDataObject().getPrimaryFile().getSize();
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,11 +1116,11 @@ public ME (long size) {
public String getLocalizedMessage () {
Object[] arr = {
getFileImpl().getPath (),
getFileImpl().getNameExt (),
new Long (size), // bytes
new Long (size / 1024 + 1), // kilobytes
new Long (size / (1024 * 1024)), // megabytes
new Long (size / (1024 * 1024 * 1024)), // gigabytes
getFileImpl().getNameExt (),
Long.valueOf(size), // bytes
Long.valueOf(size / 1024 + 1), // kilobytes
Long.valueOf(size / (1024 * 1024)), // megabytes
Long.valueOf(size / (1024 * 1024 * 1024)) // gigabytes
};
return NbBundle.getMessage(DataObject.class, "MSG_ObjectIsTooBig", arr);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public byte[] getNpsContent() {

public LogRecord getLogRec(){
LogRecord rec = new LogRecord(Level.CONFIG, SLOWNESS_DATA);
rec.setParameters(new Object[]{new Long(time), latestActionName, slownessType});
rec.setParameters(new Object[]{time, latestActionName, slownessType});
return rec;
}

Expand Down
Loading
Loading