71 |
71 |
72 /** |
72 /** |
73 * Default value when FEATURE_SECURE_PROCESSING (FSP) is set to true |
73 * Default value when FEATURE_SECURE_PROCESSING (FSP) is set to true |
74 */ |
74 */ |
75 public static final String EXTERNAL_ACCESS_DEFAULT_FSP = ""; |
75 public static final String EXTERNAL_ACCESS_DEFAULT_FSP = ""; |
76 /** |
76 |
77 * JDK version by which the default is to restrict external connection |
|
78 */ |
|
79 public static final int RESTRICT_BY_DEFAULT_JDK_VERSION = 8; |
|
80 /** |
77 /** |
81 * FEATURE_SECURE_PROCESSING (FSP) is false by default |
78 * FEATURE_SECURE_PROCESSING (FSP) is false by default |
82 */ |
79 */ |
83 public static final String EXTERNAL_ACCESS_DEFAULT = ACCESS_EXTERNAL_ALL; |
80 public static final String EXTERNAL_ACCESS_DEFAULT = ACCESS_EXTERNAL_ALL; |
84 |
81 |
|
82 public static final String XML_SECURITY_PROPERTY_MANAGER = |
|
83 ORACLE_JAXP_PROPERTY_PREFIX + "xmlSecurityPropertyManager"; |
|
84 |
|
85 /** |
|
86 * Check if we're in jdk8 or above |
|
87 */ |
|
88 public static final boolean IS_JDK8_OR_ABOVE = isJavaVersionAtLeast(8); |
|
89 |
|
90 /* |
|
91 * Check the version of the current JDK against that specified in the |
|
92 * parameter |
|
93 * |
|
94 * There is a proposal to change the java version string to: |
|
95 * MAJOR.MINOR.FU.CPU.PSU-BUILDNUMBER_BUGIDNUMBER_OPTIONAL |
|
96 * This method would work with both the current format and that proposed |
|
97 * |
|
98 * @param compareTo a JDK version to be compared to |
|
99 * @return true if the current version is the same or above that represented |
|
100 * by the parameter |
|
101 */ |
|
102 public static boolean isJavaVersionAtLeast(int compareTo) { |
|
103 String javaVersion = SecuritySupport.getSystemProperty("java.version"); |
|
104 String versions[] = javaVersion.split("\\.", 3); |
|
105 if (Integer.parseInt(versions[0]) >= compareTo || |
|
106 Integer.parseInt(versions[1]) >= compareTo) { |
|
107 return true; |
|
108 } |
|
109 return false; |
|
110 } |
85 } // class Constants |
111 } // class Constants |