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/java/ifc/text | |
parent | 8a2c6c29af41cd7a62f37861fb0d4e81a857bb45 (diff) |
java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
Diffstat (limited to 'qadevOOo/tests/java/ifc/text')
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_CellProperties.java | 4 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_CellRange.java | 4 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_Footnote.java | 4 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_FootnoteSettings.java | 8 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_TextFrame.java | 6 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_TextPortion.java | 4 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_TextSection.java | 4 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/text/_TextTable.java | 4 |
8 files changed, 19 insertions, 19 deletions
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); } |