OpenJDK / jdk10 / jdk10 / corba
changeset 839:fee432a1b886
Merge
author | lana |
---|---|
date | Thu, 09 Feb 2017 18:09:42 +0000 |
parents | e81838a0d0ff 9eada61b403d |
children | 9383da04b385 |
files | |
diffstat | 1 files changed, 27 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.corba/share/classes/org/omg/CORBA/ORB.java Thu Feb 09 17:21:46 2017 +0000 +++ b/src/java.corba/share/classes/org/omg/CORBA/ORB.java Thu Feb 09 18:09:42 2017 +0000 @@ -106,13 +106,13 @@ * * <LI>check in properties parameter, if any * - * <LI>check in the System properties + * <LI>check in the System properties, if any * * <LI>check in the orb.properties file located in the user.home - * directory (if any) + * directory, if any * - * <LI>check in the orb.properties file located in the java.home/lib - * directory (if any) + * <LI>check in the orb.properties file located in the run-time image, + * if any * * <LI>fall back on a hardcoded default behavior (use the Java IDL * implementation) @@ -170,9 +170,15 @@ * Thus, where appropriate, it is necessary that * the classes for this alternative ORBSingleton are available on the application's class path. * It should be noted that the singleton ORB is system wide. - * + * <P> * When a per-application ORB is created via the 2-arg init methods, * then it will be located using the thread context class loader. + * <P> + * The IDL to Java Language OMG specification documents the ${java.home}/lib directory as the location, + * in the Java run-time image, to search for orb.properties. + * This location is not intended for user editable configuration files. + * Therefore, the implementation first checks the ${java.home}/conf directory for orb.properties, + * and thereafter the ${java.home}/lib directory. * * @since JDK1.2 */ @@ -271,14 +277,25 @@ } String javaHome = System.getProperty("java.home"); - fileName = javaHome + File.separator - + "lib" + File.separator + "orb.properties"; - props = getFileProperties( fileName ) ; + + fileName = javaHome + File.separator + "conf" + + File.separator + "orb.properties"; + props = getFileProperties(fileName); + + if (props != null) { + String value = props.getProperty(name); + if (value != null) + return value; + } + + fileName = javaHome + File.separator + "lib" + + File.separator + "orb.properties"; + props = getFileProperties(fileName); if (props == null) - return null ; + return null; else - return props.getProperty( name ) ; + return props.getProperty(name); } } );