summaryrefslogtreecommitdiff
path: root/odk/examples/DevelopersGuide/Forms/DataAwareness.java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 15:12:27 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:18 +0200
commit0764292c5dcb7daa62e9adeb1ac9af1dbe14066f (patch)
tree17a4e9f2393d23aaba1e68bbc944aa8e18b9e2f6 /odk/examples/DevelopersGuide/Forms/DataAwareness.java
parent8a2c6c29af41cd7a62f37861fb0d4e81a857bb45 (diff)
java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
Diffstat (limited to 'odk/examples/DevelopersGuide/Forms/DataAwareness.java')
-rw-r--r--odk/examples/DevelopersGuide/Forms/DataAwareness.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/odk/examples/DevelopersGuide/Forms/DataAwareness.java b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
index e7401c13bb34..1386aa316385 100644
--- a/odk/examples/DevelopersGuide/Forms/DataAwareness.java
+++ b/odk/examples/DevelopersGuide/Forms/DataAwareness.java
@@ -704,8 +704,8 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
m_formLayer.insertControlLine( "FormattedField", "BIRTHDATE", "", 51 );
// for the salesman number / zip code, we don't want to have decimal places:
- xSNRField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
- xZipField.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
+ xSNRField.setPropertyValue( "DecimalAccuracy", Short.valueOf( (short)0 ) );
+ xZipField.setPropertyValue( "DecimalAccuracy", Short.valueOf( (short)0 ) );
/** need the form the control models belong to
@@ -771,10 +771,10 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
m_aSalesNameValidator = new GridFieldValidator( m_xCtx, xSalesNameColumn );
m_aSalesNameValidator.enableColumnWatch( m_bAllowEmptySales );
- xKeyColumn.setPropertyValue( "DecimalAccuracy", new Short( (short)0 ) );
+ xKeyColumn.setPropertyValue( "DecimalAccuracy", Short.valueOf( (short)0 ) );
// init the list box which is for choosing the customer a sale belongs to
- xCustomerColumn.setPropertyValue( "BoundColumn", new Short( (short)1 ) );
+ xCustomerColumn.setPropertyValue( "BoundColumn", Short.valueOf( (short)1 ) );
xCustomerColumn.setPropertyValue( "Label", "Customer" );
xCustomerColumn.setPropertyValue( "ListSourceType", ListSourceType.SQL );
@@ -859,7 +859,7 @@ public class DataAwareness extends DocumentBasedExample implements XPropertyChan
m_aSalesLocker.enableLock( m_bProtectKeyFields );
// initially, we want to generate keys when moving to a new record
- xKeyGen.setPropertyValue( "DefaultState", new Short( (short)1 ) );
+ xKeyGen.setPropertyValue( "DefaultState", Short.valueOf( (short)1 ) );
// second options block