summaryrefslogtreecommitdiff
path: root/xmerge
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-01 09:05:12 +0200
committerNoel Grandin <noel@peralex.com>2014-08-01 09:05:12 +0200
commit17f9b92414d04e49151f6d8818d458d9afa679a4 (patch)
treefe4e7529e6c1b679f85ed0c5cf1d784f3ef524d0 /xmerge
parentebe8792a37c21637cd9b5dc1522185b49ad7ac1c (diff)
xmerge: simplify static final constructors
Change-Id: I40f98c77c5f922fdce8242dac402feaf534da6bf
Diffstat (limited to 'xmerge')
-rw-r--r--xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java10
-rw-r--r--xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java16
2 files changed, 7 insertions, 19 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
index af82a6670066..27c25196aac0 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
@@ -26,15 +26,9 @@ package org.openoffice.xmerge;
*/
public final class Version {
- private static final Package pkg;
+ private static final Version version = new Version();
- private static final Version version;
-
- static {
-
- version = new Version();
- pkg = version.getClass().getPackage();
- }
+ private static final Package pkg = version.getClass().getPackage();
/**
* Private constructor to provide a singleton instance.
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java
index 6458290fdbe6..116ec08d052a 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java
@@ -37,19 +37,13 @@ public class ConverterInfo {
/**
* Keep track of the valid Office mime types
*/
- private static String[] validOfficeTypes;
- public static String SxwType = "staroffice/sxw";
- public static String SxcType = "staroffice/sxc";
+ private static final String[] validOfficeTypes = new String[] {
+ // This needs to be updated to reflect all valid office types.
+ "staroffice/sxw",
+ "staroffice/sxc"
+ };
- static {
- // This needs to be updated to reflect all valid office types.
-
- validOfficeTypes = new String[2];
- validOfficeTypes[0] = SxwType;
- validOfficeTypes[1] = SxcType;
- }
-
private String piJarName;
private String piOfficeMime;
private ArrayList<String> piDeviceMime;