summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-17 11:04:04 +0200
committerNoel Grandin <noel@peralex.com>2014-12-19 10:41:55 +0200
commit567592c9e24075173a6f396b81bff14f74596f83 (patch)
treed99677a62ad54d3d3049bf8e9dce615d444bd444 /forms
parent41f4417ba4ebbb29c614ad4ac1198efce709f495 (diff)
java: don't synch on an object and also assign to it
Change-Id: Ie0a098e935e640f10b77d259c96bbd1c604d701e
Diffstat (limited to 'forms')
-rw-r--r--forms/qa/integration/forms/TableCellTextBinding.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/forms/qa/integration/forms/TableCellTextBinding.java b/forms/qa/integration/forms/TableCellTextBinding.java
index 70649602039f..7f745a8f78cc 100644
--- a/forms/qa/integration/forms/TableCellTextBinding.java
+++ b/forms/qa/integration/forms/TableCellTextBinding.java
@@ -102,14 +102,11 @@ public class TableCellTextBinding
throw new com.sun.star.form.binding.IncompatibleTypesException();
}
// remember the new text
- synchronized( m_newCellText )
- {
- m_newCellText = text;
- m_haveNewCellText = true;
- }
// and wake up the thread which is waiting for it
synchronized( m_writeSignal )
{
+ m_newCellText = text;
+ m_haveNewCellText = true;
m_writeSignal.notify();
}
}
@@ -142,11 +139,7 @@ public class TableCellTextBinding
synchronized( m_writeSignal )
{
m_writeSignal.wait( 200 );
- }
-
- // if there's new text in the control, propagate it to the cell
- synchronized ( m_newCellText )
- {
+ // if there's new text in the control, propagate it to the cell
if ( m_haveNewCellText )
{
m_cellText.setString( m_newCellText );