Kaydet (Commit) 17f9b924 authored tarafından Noel Grandin's avatar Noel Grandin

xmerge: simplify static final constructors

Change-Id: I40f98c77c5f922fdce8242dac402feaf534da6bf
üst ebe8792a
...@@ -26,15 +26,9 @@ package org.openoffice.xmerge; ...@@ -26,15 +26,9 @@ package org.openoffice.xmerge;
*/ */
public final class Version { public final class Version {
private static final Package pkg; private static final Version version = new Version();
private static final Version version; private static final Package pkg = version.getClass().getPackage();
static {
version = new Version();
pkg = version.getClass().getPackage();
}
/** /**
* Private constructor to provide a singleton instance. * Private constructor to provide a singleton instance.
......
...@@ -37,19 +37,13 @@ public class ConverterInfo { ...@@ -37,19 +37,13 @@ public class ConverterInfo {
/** /**
* Keep track of the valid Office mime types * Keep track of the valid Office mime types
*/ */
private static String[] validOfficeTypes; private static final String[] validOfficeTypes = new String[] {
public static String SxwType = "staroffice/sxw"; // This needs to be updated to reflect all valid office types.
public static String SxcType = "staroffice/sxc"; "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 piJarName;
private String piOfficeMime; private String piOfficeMime;
private ArrayList<String> piDeviceMime; private ArrayList<String> piDeviceMime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment