diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 15:12:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:18 +0200 |
commit | 0764292c5dcb7daa62e9adeb1ac9af1dbe14066f (patch) | |
tree | 17a4e9f2393d23aaba1e68bbc944aa8e18b9e2f6 /qadevOOo/tests | |
parent | 8a2c6c29af41cd7a62f37861fb0d4e81a857bb45 (diff) |
java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
Diffstat (limited to 'qadevOOo/tests')
43 files changed, 78 insertions, 78 deletions
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java index c1b700e29bc3..e4362339f976 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java @@ -320,7 +320,7 @@ public class _XAccessibleValue extends MultiMethodTest { return Integer.valueOf((int)val); } else if (clazz.equals(Short.class)) { - return new Short((short)val); + return Short.valueOf((short)val); } else if (clazz.equals(Float.class)) { return new Float((float)val); diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlButtonModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlButtonModel.java index d49fdb62cca1..93d2063d5ea6 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlButtonModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlButtonModel.java @@ -107,7 +107,7 @@ public class _UnoControlButtonModel extends MultiPropertyTest { public void _PushButtonType() { log.println("Testing with custom Property tester") ; testProperty("PushButtonType", - new Short((short)0), new Short((short)1)); + Short.valueOf((short)0), Short.valueOf((short)1)); } diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlComboBoxModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlComboBoxModel.java index 1d1bf7880bd0..7e3202eba111 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlComboBoxModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlComboBoxModel.java @@ -99,7 +99,7 @@ public class _UnoControlComboBoxModel extends MultiPropertyTest { public void _Text() { try { - oObj.setPropertyValue("MaxTextLen",new Short((short)0)); + oObj.setPropertyValue("MaxTextLen",Short.valueOf((short)0)); } catch (com.sun.star.beans.UnknownPropertyException ue) { } catch (com.sun.star.beans.PropertyVetoException pe) { } catch (com.sun.star.lang.IllegalArgumentException ie) { diff --git a/qadevOOo/tests/java/ifc/document/_Settings.java b/qadevOOo/tests/java/ifc/document/_Settings.java index c1f5e3ec0cd0..01e7be08f35e 100644 --- a/qadevOOo/tests/java/ifc/document/_Settings.java +++ b/qadevOOo/tests/java/ifc/document/_Settings.java @@ -40,7 +40,7 @@ public class _Settings extends MultiPropertyTest { public void _PrinterIndependentLayout() { try{ Short oldVal = (Short) oObj.getPropertyValue("PrinterIndependentLayout"); - Short newVal = oldVal.intValue() == 1 ? new Short("3") : new Short("1"); + Short newVal = oldVal.intValue() == 1 ? Short.valueOf("3") : Short.valueOf("1"); testProperty("PrinterIndependentLayout", oldVal, newVal); diff --git a/qadevOOo/tests/java/ifc/drawing/_RotationDescriptor.java b/qadevOOo/tests/java/ifc/drawing/_RotationDescriptor.java index 760446d2e022..85db87e12c88 100644 --- a/qadevOOo/tests/java/ifc/drawing/_RotationDescriptor.java +++ b/qadevOOo/tests/java/ifc/drawing/_RotationDescriptor.java @@ -74,7 +74,7 @@ public class _RotationDescriptor extends MultiPropertyTest { } try { - oObj.setPropertyValue("RotateAngle",new Short((short) 0)); + oObj.setPropertyValue("RotateAngle",Short.valueOf((short) 0)); } catch (Exception e) { } log.println("Testing with custom Property tester") ; diff --git a/qadevOOo/tests/java/ifc/frame/_XComponentLoader.java b/qadevOOo/tests/java/ifc/frame/_XComponentLoader.java index eb12935a20c6..b5efcabbe44c 100644 --- a/qadevOOo/tests/java/ifc/frame/_XComponentLoader.java +++ b/qadevOOo/tests/java/ifc/frame/_XComponentLoader.java @@ -58,7 +58,7 @@ public class _XComponentLoader extends MultiMethodTest { PropertyValue [] szArgs = new PropertyValue [1]; PropertyValue Arg = new PropertyValue(); Arg.Name = "UpdateDocMode"; - Arg.Value = new Short(com.sun.star.document.UpdateDocMode.NO_UPDATE); + Arg.Value = Short.valueOf(com.sun.star.document.UpdateDocMode.NO_UPDATE); szArgs[0]=Arg; String url = util.utils.getFullTestURL("Writer_link.sxw"); log.println("try to load '" + url + "'"); diff --git a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java index 81777db051d5..cd8ef6b894d6 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java +++ b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java @@ -576,7 +576,7 @@ public class _XBreakIterator extends MultiMethodTest { vCharBlockBounds.add(new Boundary(startPos, endPos)); log.println("" + vCharBlockBounds.size() + "). Bounds: [" + startPos + "," + endPos + "]; Type = " + charType); - vCharBlockTypes.add(new Short(charType)); + vCharBlockTypes.add(Short.valueOf(charType)); } for(int i = 0; i < vCharBlockBounds.size() - 1; i++) { diff --git a/qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings.java b/qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings.java index 5aa4994daf98..2e90a1f666c2 100644 --- a/qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings.java +++ b/qadevOOo/tests/java/ifc/sheet/_SpreadsheetViewSettings.java @@ -52,8 +52,8 @@ import lib.MultiPropertyTest; */ public class _SpreadsheetViewSettings extends MultiPropertyTest { public void _ZoomType() { - testProperty("ZoomType", new Short(DocumentZoomType.PAGE_WIDTH), - new Short(DocumentZoomType.BY_VALUE)); + testProperty("ZoomType", Short.valueOf(DocumentZoomType.PAGE_WIDTH), + Short.valueOf(DocumentZoomType.BY_VALUE)); } /** diff --git a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java index da30b2cbed20..7a53627de3e4 100644 --- a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java +++ b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java @@ -250,13 +250,13 @@ public class _CharacterProperties extends MultiPropertyTest { Object oPara = tEnv.getObjRelation("PARA"); Object oPort = tEnv.getObjRelation("PORTION"); if (oPara == null) { - testProperty("RubyAdjust",new Short((short)0),new Short((short)1)); + testProperty("RubyAdjust",Short.valueOf((short)0),Short.valueOf((short)1)); } else { - Short aShort = new Short((short) 1); + Short aShort = Short.valueOf((short) 1); changeProp((XPropertySet) oPara, (XPropertySet) oPort,"RubyAdjust", aShort); } - new Short((short) 1); + Short.valueOf((short) 1); } /** @@ -324,7 +324,7 @@ public class _CharacterProperties extends MultiPropertyTest { * new value must be specified. */ public void _CharRotation() { - Short aShort = new Short((short) 10); + Short aShort = Short.valueOf((short) 10); changeProp(oObj,oObj, "CharRotation", aShort); } @@ -360,8 +360,8 @@ public class _CharacterProperties extends MultiPropertyTest { } if (name.equals("CharRotation")) { - Short s1 = new Short((short) 0); - Short s2 = new Short((short) 900); + Short s1 = Short.valueOf((short) 0); + Short s2 = Short.valueOf((short) 900); if (gValue.equals(s1)) { ValueToSet = s2; } else { diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java index 33caa19966f3..27f5788caf51 100644 --- a/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java +++ b/qadevOOo/tests/java/ifc/style/_ParagraphProperties.java @@ -171,10 +171,10 @@ public class _ParagraphProperties extends MultiPropertyTest { @Override protected Object getNewValue(String propName, Object oldValue) { if ((oldValue != null) && - (oldValue.equals(new Short((short) 0)))) { - return new Short((short) 2); + (oldValue.equals(Short.valueOf((short) 0)))) { + return Short.valueOf((short) 2); } else { - return new Short((short) 0); + return Short.valueOf((short) 0); } } }; diff --git a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java index a05b4d2946cb..09c00af10e26 100644 --- a/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java +++ b/qadevOOo/tests/java/ifc/style/_ParagraphPropertiesComplex.java @@ -32,9 +32,9 @@ public class _ParagraphPropertiesComplex extends MultiPropertyTest { protected PropertyTester WritingModeTester = new PropertyTester() { @Override protected Object getNewValue(String propName, Object oldValue) { - if ((oldValue != null) && (oldValue.equals(new Short(com.sun.star.text.WritingMode2.LR_TB)))) - return new Short(com.sun.star.text.WritingMode2.PAGE); else - return new Short(com.sun.star.text.WritingMode2.LR_TB); + if ((oldValue != null) && (oldValue.equals(Short.valueOf(com.sun.star.text.WritingMode2.LR_TB)))) + return Short.valueOf(com.sun.star.text.WritingMode2.PAGE); else + return Short.valueOf(com.sun.star.text.WritingMode2.LR_TB); } } ; diff --git a/qadevOOo/tests/java/ifc/text/_CellProperties.java b/qadevOOo/tests/java/ifc/text/_CellProperties.java index 6cefdad8ac12..25b739cc71e7 100644 --- a/qadevOOo/tests/java/ifc/text/_CellProperties.java +++ b/qadevOOo/tests/java/ifc/text/_CellProperties.java @@ -84,8 +84,8 @@ public class _CellProperties extends MultiPropertyTest { * Redefined method returns value, that differs from property value. */ public void _BackColor() { - final Short val1 = new Short( (short) 4 ); - final Short val2 = new Short( (short) 6 ); + final Short val1 = Short.valueOf( (short) 4 ); + final Short val2 = Short.valueOf( (short) 6 ); log.println("Testing with custom Property tester") ; testProperty("BackColor", new PropertyTester() { @Override diff --git a/qadevOOo/tests/java/ifc/text/_CellRange.java b/qadevOOo/tests/java/ifc/text/_CellRange.java index e98b2f791b72..c2942a1c5766 100644 --- a/qadevOOo/tests/java/ifc/text/_CellRange.java +++ b/qadevOOo/tests/java/ifc/text/_CellRange.java @@ -51,8 +51,8 @@ public class _CellRange extends MultiPropertyTest { * Redefined method returns value, that differs from property value. */ public void _BackColor() { - final Short val1 = new Short( (short) 4 ); - final Short val2 = new Short( (short) 6 ); + final Short val1 = Short.valueOf( (short) 4 ); + final Short val2 = Short.valueOf( (short) 6 ); log.println("Testing with custom Property tester") ; testProperty("BackColor", new PropertyTester() { @Override diff --git a/qadevOOo/tests/java/ifc/text/_Footnote.java b/qadevOOo/tests/java/ifc/text/_Footnote.java index 6f9793ab79b3..4af1725644be 100644 --- a/qadevOOo/tests/java/ifc/text/_Footnote.java +++ b/qadevOOo/tests/java/ifc/text/_Footnote.java @@ -36,8 +36,8 @@ public class _Footnote extends MultiPropertyTest { * value must be defined. */ public void _ReferenceId() { - final Short val1 = new Short( (short) 1); - final Short val2 = new Short( (short) 2); + final Short val1 = Short.valueOf( (short) 1); + final Short val2 = Short.valueOf( (short) 2); log.println("Testing with custom Property tester"); testProperty("ReferenceId", val1, val2); diff --git a/qadevOOo/tests/java/ifc/text/_FootnoteSettings.java b/qadevOOo/tests/java/ifc/text/_FootnoteSettings.java index 8e6db87a3f31..77cc50d87274 100644 --- a/qadevOOo/tests/java/ifc/text/_FootnoteSettings.java +++ b/qadevOOo/tests/java/ifc/text/_FootnoteSettings.java @@ -73,8 +73,8 @@ public class _FootnoteSettings extends MultiPropertyTest { * value must be defined. */ public void _NumberingType() { - Short val1 = new Short(com.sun.star.text.FootnoteNumbering.PER_DOCUMENT); - Short val2 = new Short(com.sun.star.text.FootnoteNumbering.PER_PAGE); + Short val1 = Short.valueOf(com.sun.star.text.FootnoteNumbering.PER_DOCUMENT); + Short val2 = Short.valueOf(com.sun.star.text.FootnoteNumbering.PER_PAGE); log.println("Testing with custom Property tester") ; testProperty("NumberingType", val1, val2) ; } @@ -84,8 +84,8 @@ public class _FootnoteSettings extends MultiPropertyTest { * value must be defined. */ public void _FootnoteCounting() { - Short val1 = new Short( (short) 1 ); - Short val2 = new Short( (short) 2 ); + Short val1 = Short.valueOf( (short) 1 ); + Short val2 = Short.valueOf( (short) 2 ); log.println("Testing with custom Property tester") ; testProperty("FootnoteCounting", val1, val2) ; } diff --git a/qadevOOo/tests/java/ifc/text/_TextFrame.java b/qadevOOo/tests/java/ifc/text/_TextFrame.java index c501654f4a40..a23d22862a37 100644 --- a/qadevOOo/tests/java/ifc/text/_TextFrame.java +++ b/qadevOOo/tests/java/ifc/text/_TextFrame.java @@ -43,9 +43,9 @@ public class _TextFrame extends MultiPropertyTest { @Override protected Object getNewValue(String propName, Object oldValue) throws java.lang.IllegalArgumentException { - if (oldValue.equals(new Short(com.sun.star.text.WritingMode2.LR_TB))) - return new Short(com.sun.star.text.WritingMode2.TB_LR); else - return new Short(com.sun.star.text.WritingMode2.LR_TB); + if (oldValue.equals(Short.valueOf(com.sun.star.text.WritingMode2.LR_TB))) + return Short.valueOf(com.sun.star.text.WritingMode2.TB_LR); else + return Short.valueOf(com.sun.star.text.WritingMode2.LR_TB); } } ; diff --git a/qadevOOo/tests/java/ifc/text/_TextPortion.java b/qadevOOo/tests/java/ifc/text/_TextPortion.java index 7a1c8569dbff..24096fe6daa5 100644 --- a/qadevOOo/tests/java/ifc/text/_TextPortion.java +++ b/qadevOOo/tests/java/ifc/text/_TextPortion.java @@ -40,8 +40,8 @@ public class _TextPortion extends MultiPropertyTest { */ public void _ControlCharacter() { testProperty("ControlCharacter", - new Short(ControlCharacter.LINE_BREAK), - new Short(ControlCharacter.PARAGRAPH_BREAK)) ; + Short.valueOf(ControlCharacter.LINE_BREAK), + Short.valueOf(ControlCharacter.PARAGRAPH_BREAK)) ; } } //finish class _TextPortion diff --git a/qadevOOo/tests/java/ifc/text/_TextSection.java b/qadevOOo/tests/java/ifc/text/_TextSection.java index b3e3a34eb265..3c756a60f7f0 100644 --- a/qadevOOo/tests/java/ifc/text/_TextSection.java +++ b/qadevOOo/tests/java/ifc/text/_TextSection.java @@ -82,8 +82,8 @@ public class _TextSection extends MultiPropertyTest { public void _FootnoteNumberingType() { log.println("Testing with custom Property tester") ; testProperty("FootnoteNumberingType", - new Short(com.sun.star.text.FootnoteNumbering.PER_DOCUMENT), - new Short(com.sun.star.text.FootnoteNumbering.PER_PAGE)) ; + Short.valueOf(com.sun.star.text.FootnoteNumbering.PER_DOCUMENT), + Short.valueOf(com.sun.star.text.FootnoteNumbering.PER_PAGE)) ; } diff --git a/qadevOOo/tests/java/ifc/text/_TextTable.java b/qadevOOo/tests/java/ifc/text/_TextTable.java index fac44cdb96fc..ad3645d220a3 100644 --- a/qadevOOo/tests/java/ifc/text/_TextTable.java +++ b/qadevOOo/tests/java/ifc/text/_TextTable.java @@ -69,7 +69,7 @@ public class _TextTable extends MultiPropertyTest { * set to non-automatic. */ public void _Width() { - Short align = new Short(com.sun.star.text.HoriOrientation.CENTER); + Short align = Short.valueOf(com.sun.star.text.HoriOrientation.CENTER); try { oObj.setPropertyValue("HoriOrient",align); } @@ -86,7 +86,7 @@ public class _TextTable extends MultiPropertyTest { * set to non-automatic. */ public void _RelativeWidth() { - Short align = new Short(com.sun.star.text.HoriOrientation.CENTER); + Short align = Short.valueOf(com.sun.star.text.HoriOrientation.CENTER); try { oObj.setPropertyValue("HoriOrient",align); } diff --git a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java index f57ccc97374e..b67ed2d5a324 100644 --- a/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java +++ b/qadevOOo/tests/java/ifc/ui/_XUIConfigurationManager.java @@ -300,7 +300,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { prop[1].Value = sLabelName; prop[2] = new PropertyValue(); prop[2].Name = "Type"; - prop[2].Value = new Short((short)0); + prop[2].Value = Short.valueOf((short)0); prop[3] = new PropertyValue(); prop[3].Name = "ItemDescriptorContainer"; @@ -337,7 +337,7 @@ public class _XUIConfigurationManager extends MultiMethodTest { aMenuItem[1].Value = sLabelName; aMenuItem[2] = new PropertyValue(); aMenuItem[2].Name = "Type"; - aMenuItem[2].Value = new Short((short)0); + aMenuItem[2].Value = Short.valueOf((short)0); try { xDescriptionContainer.insertByIndex(0, aMenuItem); diff --git a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java index 58cd7a252c94..4bdc611e2aa9 100644 --- a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java +++ b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java @@ -622,7 +622,7 @@ public class ODatabaseForm extends TestCase { params.add("SAU99") ; params.add(Boolean.FALSE) ; params.add(new Byte((byte) 123)) ; - params.add(new Short((short) 234)) ; + params.add(Short.valueOf((short) 234)) ; params.add(Integer.valueOf(12345)) ; params.add(Long.valueOf(23456)) ; params.add(new Float(1.234)) ; diff --git a/qadevOOo/tests/java/mod/_fps/FilePicker.java b/qadevOOo/tests/java/mod/_fps/FilePicker.java index 82c34e67c44c..6ce1107eda1d 100644 --- a/qadevOOo/tests/java/mod/_fps/FilePicker.java +++ b/qadevOOo/tests/java/mod/_fps/FilePicker.java @@ -93,7 +93,7 @@ public class FilePicker extends TestCase { Object oInterface = null; XMultiServiceFactory xMSF = Param.getMSF(); - Object[] iniArgs = new Object[] { new Short + Object[] iniArgs = new Object[] { Short.valueOf (com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_READONLY_VERSION)}; short ctrlId = com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_READONLY; @@ -114,7 +114,7 @@ public class FilePicker extends TestCase { // adding relation for XFilePickerControlAccess tEnv.addObjRelation("XFilePickerControlAccess.ControlID", - new Short(ctrlId)) ; + Short.valueOf(ctrlId)) ; tEnv.addObjRelation("XFilePickerControlAccess.ControlValue", Boolean.FALSE) ; diff --git a/qadevOOo/tests/java/mod/_sm/XMLSettingsExporter.java b/qadevOOo/tests/java/mod/_sm/XMLSettingsExporter.java index e8c198ebf1a2..501e2b82d873 100644 --- a/qadevOOo/tests/java/mod/_sm/XMLSettingsExporter.java +++ b/qadevOOo/tests/java/mod/_sm/XMLSettingsExporter.java @@ -132,7 +132,7 @@ public class XMLSettingsExporter extends TestCase { XPropertySet xPS = UnoRuntime.queryInterface (XPropertySet.class, xMathDoc) ; - xPS.setPropertyValue("TopMargin", new Short(expMargin)) ; + xPS.setPropertyValue("TopMargin", Short.valueOf(expMargin)) ; } catch (com.sun.star.uno.Exception e) { e.printStackTrace(log) ; throw new StatusException("Can't create component.", e) ; diff --git a/qadevOOo/tests/java/mod/_stm/DataInputStream.java b/qadevOOo/tests/java/mod/_stm/DataInputStream.java index 7a3a5a31864e..fae8af2c044b 100644 --- a/qadevOOo/tests/java/mod/_stm/DataInputStream.java +++ b/qadevOOo/tests/java/mod/_stm/DataInputStream.java @@ -131,7 +131,7 @@ public class DataInputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_stm/DataOutputStream.java b/qadevOOo/tests/java/mod/_stm/DataOutputStream.java index 73500ddc95ba..3ffd18444cc9 100644 --- a/qadevOOo/tests/java/mod/_stm/DataOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/DataOutputStream.java @@ -108,7 +108,7 @@ public class DataOutputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java b/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java index 289de5cc02ca..6ec2d548c115 100644 --- a/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java @@ -131,7 +131,7 @@ public class MarkableOutputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java b/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java index 350ca4d19d63..3664491099e0 100644 --- a/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java +++ b/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java @@ -245,7 +245,7 @@ public class ObjectInputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java b/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java index 7308371932c6..f8b84c1f90f0 100644 --- a/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java @@ -234,7 +234,7 @@ public class ObjectOutputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_streams/uno/DataInputStream.java b/qadevOOo/tests/java/mod/_streams/uno/DataInputStream.java index 6e7f81bfcc14..b24f50d7fbdc 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/DataInputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/DataInputStream.java @@ -128,7 +128,7 @@ public class DataInputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_streams/uno/DataOutputStream.java b/qadevOOo/tests/java/mod/_streams/uno/DataOutputStream.java index f91e967eed39..8144e67b1536 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/DataOutputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/DataOutputStream.java @@ -105,7 +105,7 @@ public class DataOutputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_streams/uno/MarkableOutputStream.java b/qadevOOo/tests/java/mod/_streams/uno/MarkableOutputStream.java index 94065169be7a..a90b0aef9a75 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/MarkableOutputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/MarkableOutputStream.java @@ -128,7 +128,7 @@ public class MarkableOutputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_streams/uno/ObjectInputStream.java b/qadevOOo/tests/java/mod/_streams/uno/ObjectInputStream.java index a2acc83c62f8..6c851658ea61 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/ObjectInputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/ObjectInputStream.java @@ -242,7 +242,7 @@ public class ObjectInputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java b/qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java index 0a26e9fb1f63..fbe7a0d00872 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java @@ -231,7 +231,7 @@ public class ObjectOutputStream extends TestCase { data.add(Boolean.TRUE) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; - data.add(new Short((short)1234)) ; + data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(new Float(1.234)) ; data.add(new Double(1.23456)) ; diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java index c6823a6c742e..651975828ea3 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleEndnoteView.java @@ -97,7 +97,7 @@ public class SwAccessibleEndnoteView extends TestCase { try { //change zoom value to 10% //footer should be in the vissible area of the document - xPropSet.setPropertyValue("ZoomValue", new Short("10")); + xPropSet.setPropertyValue("ZoomValue", Short.valueOf("10")); } catch ( com.sun.star.lang.WrappedTargetException e ) { e.printStackTrace(log); throw new StatusException("Couldn't set propertyValue...", e); @@ -133,9 +133,9 @@ public class SwAccessibleEndnoteView extends TestCase { public void fireEvent() { try { //change zoom value to 130% - PropSet.setPropertyValue("ZoomValue", new Short("15")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("15")); //and back to 10% - PropSet.setPropertyValue("ZoomValue", new Short("10")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("10")); } catch ( com.sun.star.lang.WrappedTargetException e ) { } catch ( com.sun.star.lang.IllegalArgumentException e ) { diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java index 76e0f7846b1d..4d70c06cc72a 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java @@ -110,7 +110,7 @@ public class SwAccessibleFooterView extends TestCase { XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class, xController); XPropertySet xPropSet = xViewSetSup.getViewSettings(); - xPropSet.setPropertyValue("ZoomValue", new Short("20")); + xPropSet.setPropertyValue("ZoomValue", Short.valueOf("20")); } catch ( com.sun.star.lang.WrappedTargetException e ) { e.printStackTrace(log); throw new StatusException("Couldn't set propertyValue...", e); diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java index efdd158eb842..92621b0ae27e 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleFootnoteView.java @@ -98,7 +98,7 @@ public class SwAccessibleFootnoteView extends TestCase { try { //change zoom value to 10% //footer should be in the vissible area of the document - xPropSet.setPropertyValue("ZoomValue", new Short("10")); + xPropSet.setPropertyValue("ZoomValue", Short.valueOf("10")); } catch ( com.sun.star.lang.WrappedTargetException e ) { e.printStackTrace(log); throw new StatusException("Couldn't set propertyValue...", e); @@ -134,9 +134,9 @@ public class SwAccessibleFootnoteView extends TestCase { public void fireEvent() { try { //change zoom value to 130% - PropSet.setPropertyValue("ZoomValue", new Short("15")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("15")); //and back to 10% - PropSet.setPropertyValue("ZoomValue", new Short("10")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("10")); } catch ( com.sun.star.lang.WrappedTargetException e ) { } catch ( com.sun.star.lang.IllegalArgumentException e ) { diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java index cb8bfea423db..3696797dd8ff 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java @@ -107,9 +107,9 @@ public class SwAccessibleTableView extends TestCase { public void fireEvent() { try { //change zoom value to 15% - PropSet.setPropertyValue("ZoomValue", new Short("15")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("15")); //and back to 100% - PropSet.setPropertyValue("ZoomValue", new Short("100")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("100")); } catch ( com.sun.star.lang.WrappedTargetException e ) { } catch ( com.sun.star.lang.IllegalArgumentException e ) { diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java index ab9a9764b359..da7b10d138f4 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextEmbeddedObject.java @@ -91,9 +91,9 @@ public class SwAccessibleTextEmbeddedObject extends TestCase { public void fireEvent() { try { //change zoom value to 15% - PropSet.setPropertyValue("ZoomValue", new Short("15")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("15")); //and back to 100% - PropSet.setPropertyValue("ZoomValue", new Short("100")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("100")); } catch ( com.sun.star.lang.WrappedTargetException e ) { } catch ( com.sun.star.lang.IllegalArgumentException e ) { diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java index db0679727650..04aef60e68e4 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java @@ -124,9 +124,9 @@ public class SwAccessibleTextFrameView extends TestCase { public void fireEvent() { try { //change zoom value to 15% - PropSet.setPropertyValue("ZoomValue", new Short("15")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("15")); //and back to 100% - PropSet.setPropertyValue("ZoomValue", new Short("100")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("100")); } catch ( com.sun.star.lang.WrappedTargetException e ) { } catch ( com.sun.star.lang.IllegalArgumentException e ) { diff --git a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java index c7c682eed8e4..66a14e7cc89f 100644 --- a/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java +++ b/qadevOOo/tests/java/mod/_sw/SwAccessibleTextGraphicObject.java @@ -113,9 +113,9 @@ public class SwAccessibleTextGraphicObject extends TestCase { public void fireEvent() { try { //change zoom value to 15% - PropSet.setPropertyValue("ZoomValue", new Short("15")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("15")); //and back to 100% - PropSet.setPropertyValue("ZoomValue", new Short("100")); + PropSet.setPropertyValue("ZoomValue", Short.valueOf("100")); } catch ( com.sun.star.lang.WrappedTargetException e ) { } catch ( com.sun.star.lang.IllegalArgumentException e ) { diff --git a/qadevOOo/tests/java/mod/_sw/SwXMailMerge.java b/qadevOOo/tests/java/mod/_sw/SwXMailMerge.java index 92623758637f..4bbd95dcf74a 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXMailMerge.java +++ b/qadevOOo/tests/java/mod/_sw/SwXMailMerge.java @@ -156,7 +156,7 @@ public class SwXMailMerge extends TestCase { oObjProps.setPropertyValue("DataSourceName", cDataSourceName); oObjProps.setPropertyValue("Command", cDataCommand); oObjProps.setPropertyValue("CommandType", Integer.valueOf(CommandType.TABLE)); - oObjProps.setPropertyValue("OutputType", new Short(MailMergeType.FILE)); + oObjProps.setPropertyValue("OutputType", Short.valueOf(MailMergeType.FILE)); oObjProps.setPropertyValue("DocumentURL", cTestDoc); oObjProps.setPropertyValue("OutputURL", cOutputURL); oObjProps.setPropertyValue("FileNamePrefix", "Author"); @@ -186,7 +186,7 @@ public class SwXMailMerge extends TestCase { vXJobArg0[0] = new NamedValue("DataSourceName", cDataSourceName); vXJobArg0[1] = new NamedValue("Command", cDataCommand); vXJobArg0[2] = new NamedValue("CommandType",Integer.valueOf(CommandType.TABLE)); - vXJobArg0[3] = new NamedValue("OutputType",new Short(MailMergeType.FILE)); + vXJobArg0[3] = new NamedValue("OutputType",Short.valueOf(MailMergeType.FILE)); vXJobArg0[4] = new NamedValue("DocumentURL", cTestDoc); vXJobArg0[5] = new NamedValue("OutputURL", cOutputURL); vXJobArg0[6] = new NamedValue("FileNamePrefix", "Identifier"); @@ -197,7 +197,7 @@ public class SwXMailMerge extends TestCase { vXJobArg1[1] = new NamedValue("Command", cDataCommand); vXJobArg1[2] = new NamedValue("CommandType",Integer.valueOf(CommandType.TABLE)); vXJobArg1[3] = new NamedValue("OutputType", - new Short(MailMergeType.PRINTER)); + Short.valueOf(MailMergeType.PRINTER)); vXJobArg1[4] = new NamedValue("DocumentURL", cTestDoc); vXJobArg1[5] = new NamedValue("FileNamePrefix", "Author"); vXJobArg1[6] = new NamedValue("FileNameFromColumn", Boolean.TRUE); @@ -208,7 +208,7 @@ public class SwXMailMerge extends TestCase { vXJobArg2[2] = new NamedValue("Command", cDataCommand); vXJobArg2[3] = new NamedValue("CommandType",Integer.valueOf(CommandType.TABLE)); vXJobArg2[4] = new NamedValue("OutputType", - new Short(MailMergeType.FILE)); + Short.valueOf(MailMergeType.FILE)); vXJobArg2[5] = new NamedValue("ResultSet", oResultSet); vXJobArg2[6] = new NamedValue("OutputURL", cOutputURL); vXJobArg2[7] = new NamedValue("FileNamePrefix", "Identifier"); diff --git a/qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java b/qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java index 819d27ce87ed..d0943ae08160 100644 --- a/qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java +++ b/qadevOOo/tests/java/mod/_sw/XMLSettingsExporter.java @@ -139,7 +139,7 @@ public class XMLSettingsExporter extends TestCase { XViewSettingsSupplier xViewSetSup = UnoRuntime.queryInterface(XViewSettingsSupplier.class, xController); XPropertySet xPropSet = xViewSetSup.getViewSettings(); - xPropSet.setPropertyValue("ZoomValue", new Short(ZOOM)); + xPropSet.setPropertyValue("ZoomValue", Short.valueOf(ZOOM)); } catch (com.sun.star.uno.Exception e) { e.printStackTrace(log) ; diff --git a/qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java b/qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java index 347562e094dd..7b34cde66845 100644 --- a/qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java +++ b/qadevOOo/tests/java/mod/_toolkit/UnoControlDialogModel.java @@ -108,7 +108,7 @@ public class UnoControlDialogModel extends TestCase { xPSetButton.setPropertyValue("Width", Integer.valueOf(50)); xPSetButton.setPropertyValue("Height", Integer.valueOf(14)); xPSetButton.setPropertyValue("Name", _buttonName); - xPSetButton.setPropertyValue("TabIndex", new Short((short) 0)); + xPSetButton.setPropertyValue("TabIndex", Short.valueOf((short) 0)); xPSetButton.setPropertyValue("Label", "Click Me"); // create the label model and set the properties @@ -121,7 +121,7 @@ public class UnoControlDialogModel extends TestCase { xPSetLabel.setPropertyValue("Width", Integer.valueOf(100)); xPSetLabel.setPropertyValue("Height", Integer.valueOf(14)); xPSetLabel.setPropertyValue("Name", _labelName); - xPSetLabel.setPropertyValue("TabIndex", new Short((short) 1)); + xPSetLabel.setPropertyValue("TabIndex", Short.valueOf((short) 1)); xPSetLabel.setPropertyValue("Label", _labelPrefix); // insert the control models into the dialog model |