Kaydet (Commit) ff0ad049 authored tarafından Noel Grandin's avatar Noel Grandin

java: use 'Integer.valueOf' instead of 'new Integer'

Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
üst be1bb7b1
......@@ -48,7 +48,7 @@ import com.sun.star.awt.*;
{
if (SystemType == localSystemType) {
return new Integer((int)hWindow);
return Integer.valueOf((int)hWindow);
}
else return null;
}
......
......@@ -157,7 +157,7 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler
if (method_name.equals( "hashCode" ))
{
// int hashCode()
return new Integer( m_oid.hashCode() );
return Integer.valueOf( m_oid.hashCode() );
}
else if (method_name.equals( "equals" ))
{
......
......@@ -82,15 +82,15 @@ public final class PolyStructTest extends ComplexTestCase {
new TestPolyStruct(new Short(Short.MAX_VALUE))).member);
assertEquals(
new Integer(0), t.transportLong(new TestPolyStruct()).member);
Integer.valueOf(0), t.transportLong(new TestPolyStruct()).member);
assertEquals(
new Integer(Integer.MIN_VALUE),
Integer.valueOf(Integer.MIN_VALUE),
t.transportLong(
new TestPolyStruct(new Integer(Integer.MIN_VALUE))).member);
new TestPolyStruct(Integer.valueOf(Integer.MIN_VALUE))).member);
assertEquals(
new Integer(Integer.MAX_VALUE),
Integer.valueOf(Integer.MAX_VALUE),
t.transportLong(
new TestPolyStruct(new Integer(Integer.MAX_VALUE))).member);
new TestPolyStruct(Integer.valueOf(Integer.MAX_VALUE))).member);
assertEquals(
new Long(0L), t.transportHyper(new TestPolyStruct()).member);
......@@ -161,10 +161,10 @@ public final class PolyStructTest extends ComplexTestCase {
Any.VOID, t.transportAny(new TestPolyStruct(Any.VOID)).member);
assertEquals(null, t.transportAny(new TestPolyStruct(null)).member);
assertEquals(
new Any(Type.UNSIGNED_LONG, new Integer(5)),
new Any(Type.UNSIGNED_LONG, Integer.valueOf(5)),
t.transportAny(
new TestPolyStruct(
new Any(Type.UNSIGNED_LONG, new Integer(5)))).member);
new Any(Type.UNSIGNED_LONG, Integer.valueOf(5)))).member);
assertEquals(
TestEnum.VALUE1, t.transportEnum(new TestPolyStruct()).member);
......
......@@ -168,29 +168,29 @@ final class TestAny {
new CompareBoxed());
// LONG:
success &= testMapAny(transport, new Integer(-2147483648),
success &= testMapAny(transport, Integer.valueOf(-2147483648),
new CompareBoxed());
success &= testMapAny(transport, new Integer(0),
success &= testMapAny(transport, Integer.valueOf(0),
new CompareBoxed());
success &= testMapAny(transport, new Integer(2147483647),
success &= testMapAny(transport, Integer.valueOf(2147483647),
new CompareBoxed());
success &= testMapAny(transport,
new Any(Type.LONG, new Integer(-2147483648)),
new Any(Type.LONG, Integer.valueOf(-2147483648)),
new CompareUnboxed());
success &= testMapAny(transport,
new Any(Type.LONG, new Integer(0)),
new Any(Type.LONG, Integer.valueOf(0)),
new CompareUnboxed());
success &= testMapAny(transport,
new Any(Type.LONG, new Integer(2147483647)),
new Any(Type.LONG, Integer.valueOf(2147483647)),
new CompareUnboxed());
// UNSIGNED LONG:
success &= testMapAny(transport,
new Any(Type.UNSIGNED_LONG, new Integer(0)),
new Any(Type.UNSIGNED_LONG, Integer.valueOf(0)),
new CompareBoxed());
success &= testMapAny(transport,
new Any(Type.UNSIGNED_LONG,
new Integer(-2147483648)),
Integer.valueOf(-2147483648)),
new CompareBoxed());
// HYPER:
......
......@@ -213,7 +213,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
float fWeight = FontWeight.BOLD;
float fHeight = (float)14.0;
xTitleProp.setPropertyValue( "CharColor", new Integer( nColor ) );
xTitleProp.setPropertyValue( "CharColor", Integer.valueOf( nColor ) );
xTitleProp.setPropertyValue( "CharWeight", new Float( fWeight ));
xTitleProp.setPropertyValue( "CharHeight", new Float( fHeight ) );
......@@ -253,7 +253,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
if( xProp != null )
{
int nColor = 0xffe1ff; // thistle1
xProp.setPropertyValue( "FillColor", new Integer( nColor ) );
xProp.setPropertyValue( "FillColor", Integer.valueOf( nColor ) );
int nNewColor = AnyConverter.toInt( xProp.getPropertyValue( "FillColor" ) );
assure( "Changing FillColor via old API failed", nNewColor == nColor );
}
......@@ -387,7 +387,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
! AnyConverter.toBoolean( xProp.getPropertyValue( "Logarithmic" )) );
int nNewColor = 0xcd853f; // peru
xProp.setPropertyValue( "LineColor", new Integer( nNewColor ));
xProp.setPropertyValue( "LineColor", Integer.valueOf( nNewColor ));
assure( "Property LineColor",
AnyConverter.toInt( xProp.getPropertyValue( "LineColor" )) == nNewColor );
float fNewCharHeight = (float)(16.0);
......@@ -396,7 +396,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
AnyConverter.toFloat( xProp.getPropertyValue( "CharHeight" )) == fNewCharHeight );
int nNewTextRotation = 700; // in 1/100 degrees
xProp.setPropertyValue( "TextRotation", new Integer( nNewTextRotation ));
xProp.setPropertyValue( "TextRotation", Integer.valueOf( nNewTextRotation ));
assure( "Property TextRotation",
AnyConverter.toInt( xProp.getPropertyValue( "TextRotation" )) == nNewTextRotation );
......@@ -481,7 +481,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
try
{
int nColor = 0xf5fffa; // mint cream
xArea.setPropertyValue( "FillColor", new Integer( nColor ) );
xArea.setPropertyValue( "FillColor", Integer.valueOf( nColor ) );
xArea.setPropertyValue( "FillStyle", FillStyle.SOLID );
int nNewColor = AnyConverter.toInt( xArea.getPropertyValue( "FillColor" ) );
......@@ -582,7 +582,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
// FillColor
XPropertySet xProp = xDia.getDataRowProperties( 0 );
int nColor = 0xffd700; // gold
xProp.setPropertyValue( "FillColor", new Integer( nColor ));
xProp.setPropertyValue( "FillColor", Integer.valueOf( nColor ));
int nNewColor = AnyConverter.toInt( xProp.getPropertyValue( "FillColor" ) );
assure( "Changing FillColor of Data Series failed", nNewColor == nColor );
......@@ -778,7 +778,7 @@ public class TestCaseOldAPI extends ComplexTestCase {
assure( "No MinMaxLine", xMinMaxProp != null );
int nLineColor = 0x458b00; // chartreuse4
xMinMaxProp.setPropertyValue( "LineColor", new Integer( nLineColor ));
xMinMaxProp.setPropertyValue( "LineColor", Integer.valueOf( nLineColor ));
int nNewColor = AnyConverter.toInt( xMinMaxProp.getPropertyValue( "LineColor" ) );
assure( "Changing LineColor of MinMax Line", nNewColor == nLineColor );
}
......
......@@ -222,7 +222,7 @@ public final class Test extends ComplexTestCase {
//TODO:
Struct2 s = new Struct2(
true, (byte) 1, (short) 2, (short) 3, 4, 5, 6L, 7L, 0.8f, 0.9, 'A',
"BCD", Type.UNSIGNED_HYPER, new Integer(22), Enum2.VALUE4,
"BCD", Type.UNSIGNED_HYPER, Integer.valueOf(22), Enum2.VALUE4,
new Struct1(1), null, null, false, (byte) 0, (short) 0, (short) 0,
0, 0, 0L, 0L, 0.0f, 0.0, '\u0000', "", Type.VOID, Any.VOID,
Enum2.VALUE0, new Struct1(), null, null,
......@@ -255,7 +255,7 @@ public final class Test extends ComplexTestCase {
assure(s.p11 == 'A');
assure(s.p12.equals("BCD"));
assure(s.p13.equals(Type.UNSIGNED_HYPER));
assure(s.p14.equals(new Integer(22)));
assure(s.p14.equals(Integer.valueOf(22)));
assure(s.p15 == Enum2.VALUE4);
assure(s.p16.member1 == 1);
assure(s.p17 == null);
......
......@@ -236,7 +236,7 @@ public class Map /* extends complexlib.ComplexTestCase */
{
case 0: someValue = Boolean.FALSE; break;
case 1: someValue = new Short( (short)0 ); break;
case 2: someValue = new Integer( 0 ); break;
case 2: someValue = Integer.valueOf( 0 ); break;
case 3: someValue = new Long( 0 ); break;
case 4: someValue = UnoRuntime.queryInterface( XInterface.class, new DummyInterface() ); break;
case 5: someValue = UnoRuntime.queryInterface( XSet.class, new DummySet() ); break;
......
......@@ -79,7 +79,7 @@ public class HsqlTableDescriptor
try
{
columnDesc.setPropertyValue( "Name", myColumns[i].getName() );
columnDesc.setPropertyValue( "IsNullable", new Integer( myColumns[i].isRequired() ? ColumnValue.NO_NULLS : ColumnValue.NULLABLE) );
columnDesc.setPropertyValue( "IsNullable", Integer.valueOf( myColumns[i].isRequired() ? ColumnValue.NO_NULLS : ColumnValue.NULLABLE) );
columnDesc.setPropertyValue( "TypeName", myColumns[i].getTypeName() );
if ( myColumns[i].isPrimaryKey() || myColumns[i].isForeignKey() )
// not yet implemented
......
......@@ -50,7 +50,7 @@ public class RowSet implements XRowSet, XRow
{
m_rowSetProps = UnoRuntime.queryInterface( XPropertySet.class, _orb.createInstance( "com.sun.star.sdb.RowSet" ) );
m_rowSetProps.setPropertyValue( "DataSourceName", _dataSource );
m_rowSetProps.setPropertyValue( "CommandType", new Integer( _commandType ) );
m_rowSetProps.setPropertyValue( "CommandType", Integer.valueOf( _commandType ) );
m_rowSetProps.setPropertyValue( "Command", _command );
m_rowSet = UnoRuntime.queryInterface( XRowSet.class, m_rowSetProps );
......
......@@ -1453,7 +1453,7 @@ public class EmbedContApp extends Applet
{
Object aArgs[] = new Object[2];
aArgs[0] = aFileURI;
aArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );
aArgs[1] = Integer.valueOf( ElementModes.ELEMENT_READWRITE );
Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs );
XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );
......@@ -1503,7 +1503,7 @@ public class EmbedContApp extends Applet
oStorageFactory );
Object aArgs[] = new Object[2];
aArgs[0] = aFileURI;
aArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );
aArgs[1] = Integer.valueOf( ElementModes.ELEMENT_READWRITE );
Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs );
XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );
......@@ -1631,7 +1631,7 @@ public class EmbedContApp extends Applet
{
Object aArgs[] = new Object[2];
aArgs[0] = aFileURI;
aArgs[1] = new Integer( ElementModes.ELEMENT_READWRITE );
aArgs[1] = Integer.valueOf( ElementModes.ELEMENT_READWRITE );
Object oStorage = xStorageFactory.createInstanceWithArguments( aArgs );
XStorage xTargetStorage = (XStorage)UnoRuntime.queryInterface( XStorage.class, oStorage );
......
......@@ -137,7 +137,7 @@ public class NativeView extends java.awt.Canvas
{
if( maHandle == null )
{
maHandle = new Integer( (int )getNativeWindow() );
maHandle = Integer.valueOf( (int )getNativeWindow() );
maSystem = getNativeWindowSystemType();
}
return maHandle;
......
......@@ -509,7 +509,7 @@ public class CellBinding extends complexlib.ComplexTestCase
XAccessibleValue xValue = UnoRuntime.queryInterface(
XAccessibleValue.class, accessible.getAccessibleContext() );
Integer newValue = new Integer( 1 );
Integer newValue = Integer.valueOf( 1 );
xValue.setCurrentValue( newValue );
}
......
......@@ -532,13 +532,13 @@ public class FormControlTest extends complexlib.ComplexTestCase implements XSQLE
xCheckBox.setPropertyValue( "TriState", Boolean.TRUE );
xCheckBox.setPropertyValue( "DefaultState", new Short( (short)2 ) );
xTimeField.setPropertyValue( "TimeFormat", new Short( (short)1 ) );
xTimeField.setPropertyValue( "TimeMax", new Integer( 23595999 ) );
xTimeField.setPropertyValue( "TimeMax", Integer.valueOf( 23595999 ) );
xReqField.setPropertyValue( "ConvertEmptyToNull", Boolean.FALSE );
// the logical form
m_masterForm = (XPropertySet)dbfTools.getParent( xIDField, XPropertySet.class );
m_masterForm.setPropertyValue( "DataSourceName", m_dataSourceProps.getPropertyValue( "Name" ) );
m_masterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) );
m_masterForm.setPropertyValue( "CommandType", Integer.valueOf( CommandType.TABLE ) );
m_masterForm.setPropertyValue( "Command", s_tableName );
insertRadio( 3, "none", "none" );
......
......@@ -219,7 +219,7 @@ public class FormLayer
{
xFieldModel.setPropertyValue( "Border", new Short( VisualEffect.FLAT ) );
if ( xFieldModel.getPropertySetInfo().hasPropertyByName( "BorderColor" ) )
xFieldModel.setPropertyValue( "BorderColor", new Integer( 0x00C0C0C0 ) );
xFieldModel.setPropertyValue( "BorderColor", Integer.valueOf( 0x00C0C0C0 ) );
}
// knit it to it's label component
xFieldModel.setPropertyValue( "LabelControl", xLabelModel );
......
......@@ -102,7 +102,7 @@ public class FormPropertyBags extends complexlib.ComplexTestCase implements XPro
propContainer.addProperty( "SomeBoundText", PropertyAttribute.BOUND, "InitialBoundText" );
propContainer.addProperty( "SomeTransientText", PropertyAttribute.TRANSIENT, "InitialTransientProperty" );
propContainer.addProperty( "SomeReadonlyText", PropertyAttribute.READONLY, "InitialReadonlyText" );
propContainer.addProperty( "SomeNumericValue", PropertyAttribute.BOUND, new Integer( 42 ) );
propContainer.addProperty( "SomeNumericValue", PropertyAttribute.BOUND, Integer.valueOf( 42 ) );
XPropertySetInfo propertyInfo = textFieldModel.getPropertySetInfo();
assure( "Per service definition, dynamic properties are expected to be forced to be removable",
......@@ -171,7 +171,7 @@ public class FormPropertyBags extends complexlib.ComplexTestCase implements XPro
// all persistent properties should have the expected values
assure( "persistent properties did not survive reload (1)!", ((String)textFieldModel.getPropertyValue( "SomeBoundText" )).equals( "ChangedBoundText" ) );
assure( "persistent properties did not survive reload (2)!", ((String)textFieldModel.getPropertyValue( "SomeReadonlyText" )).equals( "InitialReadonlyText" ) );
// assure( "persistent properties did not survive reload (3)!", ((Integer)textFieldModel.getPropertyValue( "SomeNumericValue" )).equals( new Integer( 42 ) ) );
// assure( "persistent properties did not survive reload (3)!", ((Integer)textFieldModel.getPropertyValue( "SomeNumericValue" )).equals( Integer.valueOf( 42 ) ) );
// cannot check this until the types really survice - at the moment, integers are converted to doubles ...
// the transient property should not have survived
......
......@@ -119,14 +119,14 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
{
m_masterForm = dbfTools.queryPropertySet( m_orb.createInstance( "com.sun.star.form.component.DataForm" ) );
m_masterForm.setPropertyValue( "ActiveConnection", _databaseDocument.defaultConnection().getXConnection() );
m_masterForm.setPropertyValue( "CommandType", new Integer( com.sun.star.sdb.CommandType.TABLE ) );
m_masterForm.setPropertyValue( "CommandType", Integer.valueOf( com.sun.star.sdb.CommandType.TABLE ) );
m_masterForm.setPropertyValue( "Command", "master" );
m_masterResult = new ResultSet( m_masterForm );
m_detailForm = dbfTools.queryPropertySet( m_orb.createInstance( "com.sun.star.form.component.DataForm" ) );
m_detailForm.setPropertyValue( "ActiveConnection", _databaseDocument.defaultConnection().getXConnection() );
m_detailForm.setPropertyValue( "CommandType", new Integer( com.sun.star.sdb.CommandType.TABLE ) );
m_detailForm.setPropertyValue( "CommandType", Integer.valueOf( com.sun.star.sdb.CommandType.TABLE ) );
m_detailForm.setPropertyValue( "Command", "detail" );
m_detailResult = new ResultSet( m_detailForm );
......@@ -241,12 +241,12 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
m_masterForm = (XPropertySet)dbfTools.getParent( controlModel, XPropertySet.class );
m_masterForm.setPropertyValue( "Command", "categories" );
m_masterForm.setPropertyValue( "CommandType", new Integer( CommandType.TABLE ) );
m_masterForm.setPropertyValue( "CommandType", Integer.valueOf( CommandType.TABLE ) );
// create a detail form
m_detailForm = UnoRuntime.queryInterface( XPropertySet.class, subDocument.createSubForm( m_masterForm, "products" ) );
m_detailForm.setPropertyValue( "Command", "SELECT \"ID\", \"Name\", \"CategoryID\" FROM \"products\"" );
m_detailForm.setPropertyValue( "CommandType", new Integer( CommandType.COMMAND ) );
m_detailForm.setPropertyValue( "CommandType", Integer.valueOf( CommandType.COMMAND ) );
m_detailForm.setPropertyValue( "MasterFields", new String[] { "ID" } );
m_detailForm.setPropertyValue( "DetailFields", new String[] { "CategoryID" } );
......@@ -256,7 +256,7 @@ public class MasterDetailForms extends complexlib.ComplexTestCase implements com
XIndexContainer gridColumns = UnoRuntime.queryInterface( XIndexContainer.class, gridControlModel );
impl_createGridColumn( gridColumns, "TextField", "ID" );
XPropertySet nameColumn = impl_createGridColumn( gridColumns, "TextField", "Name" );
nameColumn.setPropertyValue( "Width", new Integer( 600 ) ); // 6 cm
nameColumn.setPropertyValue( "Width", Integer.valueOf( 600 ) ); // 6 cm
nameColumn.setPropertyValue( "DefaultText", "default text" );
// go live
......
......@@ -155,7 +155,7 @@ public class SingleControlValidation implements XFormComponentValidityListener
boolean isValid = xComp.isValid();
m_statusField.setPropertyValue("Label", isValid ? "valid" : "invalid" );
m_statusField.setPropertyValue( "TextColor", new Integer( isValid ? 0x008000 : 0x800000 ) );
m_statusField.setPropertyValue( "TextColor", Integer.valueOf( isValid ? 0x008000 : 0x800000 ) );
String validityMessage = "";
if ( !isValid )
......
......@@ -565,7 +565,7 @@ public class AcceleratorsConfigurationTest
Object aArgs[] = new Object[2];
aArgs[0] = sDocCfgName;
aArgs[1] = new Integer(com.sun.star.embed.ElementModes.READ);
aArgs[1] = Integer.valueOf(com.sun.star.embed.ElementModes.READ);
XStorage xRootStorage = UnoRuntime.queryInterface(XStorage.class, xStorageFactory.createInstanceWithArguments(aArgs));
XStorage xUIConfig = xRootStorage.openStorageElement("Configurations2", com.sun.star.embed.ElementModes.READ);
......@@ -601,7 +601,7 @@ public class AcceleratorsConfigurationTest
Object aArgs[] = new Object[2];
aArgs[0] = sDocCfgName;
aArgs[1] = new Integer(com.sun.star.embed.ElementModes.WRITE);
aArgs[1] = Integer.valueOf(com.sun.star.embed.ElementModes.WRITE);
XStorage xRootStorage = UnoRuntime.queryInterface(XStorage.class, xStorageFactory.createInstanceWithArguments(aArgs));
XStorage xUIConfig = xRootStorage.openStorageElement("Configurations2", com.sun.star.embed.ElementModes.WRITE);
......
......@@ -196,7 +196,7 @@ public class AutoSave
// make sure it will be started every 1 min
ConfigHelper aConfig = new ConfigHelper(connection.getComponentContext(), "org.openoffice.Office.Recovery", false);
aConfig.writeRelativeKey("AutoSave", "Enabled" , Boolean.TRUE );
aConfig.writeRelativeKey("AutoSave", "TimeIntervall", new Integer(1)); // 1 min
aConfig.writeRelativeKey("AutoSave", "TimeIntervall", Integer.valueOf(1)); // 1 min
aConfig.flush();
aConfig = null;
......
......@@ -250,7 +250,7 @@ public class RecoveryTest extends ComplexTestCase {
assure(msg, expectedDocumentCount == documents.length);
log.println("disable automatically launch of Office");
oUITools.setCheckBoxValue("Launch StarOffice automatically", new Integer(0));
oUITools.setCheckBoxValue("Launch StarOffice automatically", Integer.valueOf(0));
log.println("start saving...");
oUITools.clickButton("OK");
......
......@@ -216,7 +216,7 @@ XMultiPropertySet
*/
protected Property getPropertyByHandle(int nHandle)
{
return _handleToPropertyMap.get(new Integer(nHandle));
return _handleToPropertyMap.get(Integer.valueOf(nHandle));
}
/** Returns an array of all Property objects or an array of length null if there
......@@ -246,7 +246,7 @@ XMultiPropertySet
{
_nameToPropertyMap.put(prop.Name, prop);
if (prop.Handle != -1)
_handleToPropertyMap.put(new Integer(prop.Handle), prop);
_handleToPropertyMap.put(Integer.valueOf(prop.Handle), prop);
}
/** Assigns an identifyer object to a Property object so that the identifyer
......@@ -739,7 +739,7 @@ XMultiPropertySet
else if (cl.equals(short.class))
retVal= new Short(AnyConverter.toShort(obj));
else if (cl.equals(int.class))
retVal= new Integer(AnyConverter.toInt(obj));
retVal= Integer.valueOf(AnyConverter.toInt(obj));
else if (cl.equals(long.class))
retVal= new Long(AnyConverter.toLong(obj));
else if (cl.equals(float.class))
......@@ -761,7 +761,7 @@ XMultiPropertySet
else if (cl.equals(Short.class))
retVal= new Short(AnyConverter.toShort(obj));
else if (cl.equals(Integer.class))
retVal= new Integer(AnyConverter.toInt(obj));
retVal= Integer.valueOf(AnyConverter.toInt(obj));
else if (cl.equals(Long.class))
retVal= new Long(AnyConverter.toLong(obj));
else if (cl.equals(Float.class))
......
......@@ -29,12 +29,12 @@ public class ComponentContext_Test {
public static void main(String args[]) {
try {
HashMap<String,Object> table = new HashMap<String,Object>();
table.put( "bla1", new ComponentContextEntry( null, new Integer( 1 ) ) );
table.put( "bla1", new ComponentContextEntry( null, Integer.valueOf( 1 ) ) );
XComponentContext xInitialContext = Bootstrap.createInitialComponentContext( table );
table = new HashMap<String,Object>();
table.put( "bla2", new ComponentContextEntry( new Integer( 2 ) ) );
table.put( "bla3", new Integer( 3 ) );
table.put( "bla2", new ComponentContextEntry( Integer.valueOf( 2 ) ) );
table.put( "bla3", Integer.valueOf( 3 ) );
XComponentContext xContext = new ComponentContext( table, xInitialContext );
XMultiComponentFactory xSMgr = xContext.getServiceManager();
......
......@@ -107,7 +107,7 @@ final class ProxyFactory {
return Boolean.valueOf(args[0] != null
&& oid.equals(UnoRuntime.generateOid(args[0])));
} else if (method.equals(METHOD_HASH_CODE)) {
return new Integer(oid.hashCode());
return Integer.valueOf(oid.hashCode());
} else if (method.equals(METHOD_TO_STRING)) {
return "[Proxy:" + System.identityHashCode(proxy) + "," + oid
+ "," + type + "]";
......
......@@ -226,7 +226,7 @@ final class Unmarshal {
private Integer readLongValue() {
try {
return new Integer(input.readInt());
return Integer.valueOf(input.readInt());
} catch (IOException e) {
throw new RuntimeException(e.toString());
}
......
......@@ -204,7 +204,7 @@ public final class urp implements IProtocol {
true, PROPERTIES_OID,
TypeDescription.getTypeDescription(XProtocolProperties.class),
PROPERTIES_FUN_REQUEST_CHANGE, propertiesTid,
new Object[] { new Integer(random) });
new Object[] { Integer.valueOf(random) });
state = STATE_REQUESTED;
}
......@@ -225,7 +225,7 @@ public final class urp implements IProtocol {
case STATE_INITIAL0:
case STATE_INITIAL:
writeReply(
false, message.getThreadId(), new Integer(1));
false, message.getThreadId(), Integer.valueOf(1));
state = STATE_WAIT;
break;
case STATE_REQUESTED:
......@@ -233,16 +233,16 @@ public final class urp implements IProtocol {
= ((Integer) message.getArguments()[0]).intValue();
if (random < n) {
writeReply(
false, message.getThreadId(), new Integer(1));
false, message.getThreadId(), Integer.valueOf(1));
state = STATE_WAIT;
} else if (random == n) {
writeReply(
false, message.getThreadId(), new Integer(-1));
false, message.getThreadId(), Integer.valueOf(-1));
state = STATE_INITIAL;
sendRequestChange();
} else {
writeReply(
false, message.getThreadId(), new Integer(0));
false, message.getThreadId(), Integer.valueOf(0));
}
break;
default:
......
......@@ -555,10 +555,10 @@ public class AnyConverter
case TypeClass.LONG_value:
switch (tc) {
case TypeClass.BYTE_value:
return new Integer( ((Byte)object).byteValue() );
return Integer.valueOf( ((Byte)object).byteValue() );
case TypeClass.SHORT_value:
case TypeClass.UNSIGNED_SHORT_value:
return new Integer( ((Short)object).shortValue() );
return Integer.valueOf( ((Short)object).shortValue() );
case TypeClass.LONG_value:
return object;
}
......@@ -566,7 +566,7 @@ public class AnyConverter
case TypeClass.UNSIGNED_LONG_value:
switch (tc) {
case TypeClass.UNSIGNED_SHORT_value:
return new Integer( ((Short)object).shortValue() );
return Integer.valueOf( ((Short)object).shortValue() );
case TypeClass.UNSIGNED_LONG_value:
return object;
}
......