[Libreoffice-commits] core.git: 2 commits - forms/qa
Robert Antoni Buj i Gelonch
robert.buj at gmail.com
Tue Sep 30 10:42:35 PDT 2014
forms/qa/integration/forms/ListBox.java | 6 +++---
forms/qa/integration/forms/RadioButtons.java | 12 ++----------
2 files changed, 5 insertions(+), 13 deletions(-)
New commits:
commit 4badca074088b1f1a70b340d53fc464ec11e3d29
Author: Robert Antoni Buj i Gelonch <robert.buj at gmail.com>
Date: Tue Sep 30 17:20:31 2014 +0200
forms: use Arrays.toString in integration.forms.RadioButtons
Change-Id: I797692857c874d879192ca9a4ff73b98ed5ebd86
Reviewed-on: https://gerrit.libreoffice.org/11721
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
diff --git a/forms/qa/integration/forms/RadioButtons.java b/forms/qa/integration/forms/RadioButtons.java
index efcca58..4b6e5de 100644
--- a/forms/qa/integration/forms/RadioButtons.java
+++ b/forms/qa/integration/forms/RadioButtons.java
@@ -23,6 +23,7 @@ import com.sun.star.lang.*;
import com.sun.star.container.*;
import com.sun.star.beans.*;
import com.sun.star.awt.XRadioButton;
+import java.util.Arrays;
public class RadioButtons extends complexlib.ComplexTestCase
{
@@ -306,15 +307,6 @@ public class RadioButtons extends complexlib.ComplexTestCase
}
/* ------------------------------------------------------------------ */
- private String stateString( short[] states )
- {
- StringBuilder buf = new StringBuilder();
- for ( int i=0; i<states.length; ++i )
- buf.append( states[i] );
- return buf.toString();
- }
-
- /* ------------------------------------------------------------------ */
/** verifies a number of radio buttons for their states
*/
private boolean verifyRadios( XPropertySet[] radios, short[] expectedStates, String errorMessage ) throws com.sun.star.uno.Exception
@@ -332,7 +324,7 @@ public class RadioButtons extends complexlib.ComplexTestCase
{
if ( actualStates[i] != expectedStates[i] )
{
- failed( errorMessage + " (expected: " + stateString( expectedStates ) + ", found: " + stateString( actualStates ) + ")" );
+ failed( errorMessage + " (expected: " + Arrays.toString( expectedStates ) + ", found: " + Arrays.toString( actualStates ) + ")" );
return false;
}
}
commit 73d6c6b51ba690033b8fc8998b016a4709bf4b0b
Author: Robert Antoni Buj i Gelonch <robert.buj at gmail.com>
Date: Tue Sep 30 17:05:09 2014 +0200
forms: replace StringBuffer with StringBuilder
Change-Id: Iee1b7ea214e5ed2fdd8bd5fe93dc16fbaaf312a8
Reviewed-on: https://gerrit.libreoffice.org/11720
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
diff --git a/forms/qa/integration/forms/ListBox.java b/forms/qa/integration/forms/ListBox.java
index b4412a09..a6e5326 100644
--- a/forms/qa/integration/forms/ListBox.java
+++ b/forms/qa/integration/forms/ListBox.java
@@ -85,7 +85,7 @@ public class ListBox extends TestCase
formOperations.execute( FormFeature.MoveToFirst );
for ( int row=0; row<2; ++row )
{
- StringBuffer failedFieldTypes = new StringBuffer();
+ StringBuilder failedFieldTypes = new StringBuilder();
for ( int i=0; i<fieldTypes.length; ++i )
{
final String columnFKName = fieldTypes[i] + "_fk";
@@ -184,7 +184,7 @@ public class ListBox extends TestCase
ArrayList< String[] > foreignKeyValues = new ArrayList< String[] >();
- StringBuffer foreignKeyInsertSQL = new StringBuffer();
+ StringBuilder foreignKeyInsertSQL = new StringBuilder();
foreignKeyInsertSQL.append( "INSERT INTO \"" + m_foreignKeyTableName + "\" VALUES (?" );
final String[] displayValues = impl_getDisplayValues();
@@ -203,7 +203,7 @@ public class ListBox extends TestCase
) );
// insert a few rows
- StringBuffer sql = new StringBuffer();
+ StringBuilder sql = new StringBuilder();
sql.append( "INSERT INTO \"" );
sql.append( tableName );
sql.append( "\" VALUES (?, ?)");
diff --git a/forms/qa/integration/forms/RadioButtons.java b/forms/qa/integration/forms/RadioButtons.java
index 0156e00..efcca58 100644
--- a/forms/qa/integration/forms/RadioButtons.java
+++ b/forms/qa/integration/forms/RadioButtons.java
@@ -308,7 +308,7 @@ public class RadioButtons extends complexlib.ComplexTestCase
/* ------------------------------------------------------------------ */
private String stateString( short[] states )
{
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
for ( int i=0; i<states.length; ++i )
buf.append( states[i] );
return buf.toString();
More information about the Libreoffice-commits
mailing list