diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 15:27:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:18 +0200 |
commit | 4b4bff34027cca49fd13e82d33d1b399848838fa (patch) | |
tree | 361bde1ae9cf88160694bec9d5f3c1893d398f66 /scripting/examples | |
parent | c552aac9f889b094caaa35c3fd9d12fe7c3fc73c (diff) |
java: no need to instantiate String objects directly
Change-Id: I7610774c94bf673ed3b574ffce04c4ee6ca93c03
Diffstat (limited to 'scripting/examples')
-rw-r--r-- | scripting/examples/java/Newsgroup/OfficeAttachment.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripting/examples/java/Newsgroup/OfficeAttachment.java b/scripting/examples/java/Newsgroup/OfficeAttachment.java index 8e36d1fb47f1..8a008ae18ea8 100644 --- a/scripting/examples/java/Newsgroup/OfficeAttachment.java +++ b/scripting/examples/java/Newsgroup/OfficeAttachment.java @@ -104,11 +104,11 @@ public class OfficeAttachment status.setStatus( 4, statusLine ); PropertyValue[] propertyvalue_html = new PropertyValue[2]; propertyvalue_html[0] = new PropertyValue(); - propertyvalue_html[0].Name = new String("Overwrite"); + propertyvalue_html[0].Name = "Overwrite"; propertyvalue_html[0].Value = Boolean.TRUE; propertyvalue_html[1] = new PropertyValue(); propertyvalue_html[1].Name = ("FilterName"); - propertyvalue_html[1].Value = new String("swriter: HTML (StarWriter)"); + propertyvalue_html[1].Value = "swriter: HTML (StarWriter)"; storedDoc.storeAsURL( filenameURL + ".html", propertyvalue_html); File homedir = new File( templocationSystem ); @@ -130,10 +130,10 @@ public class OfficeAttachment status.setStatus( 4, statusLine ); PropertyValue[] propertyvalue_sxw = new PropertyValue[2]; propertyvalue_sxw[0] = new PropertyValue(); - propertyvalue_sxw[0].Name = new String("Overwrite"); + propertyvalue_sxw[0].Name = "Overwrite"; propertyvalue_sxw[0].Value = Boolean.TRUE; propertyvalue_sxw[1] = new PropertyValue(); - propertyvalue_sxw[1].Name = new String("Overwrite"); + propertyvalue_sxw[1].Name = "Overwrite"; propertyvalue_sxw[1].Value = Boolean.TRUE; storedDoc.storeAsURL( filenameURL + ".sxw", propertyvalue_sxw); |