@@ -165,10 +165,10 @@ static boolean checkUrl(final URL file) {
165165 *
166166 * @throws ConfigurationException if it encounters a fatal error.
167167 */
168- public void load (File ... propFile ) throws ConfigurationException {
168+ public void load () throws ConfigurationException {
169169 LOG .debug ("Start DeploymentConfiguration.load()" );
170170 try {
171- load (true , propFile );
171+ load (true );
172172 } catch (final MalformedURLException ex ) {
173173 throw new ConfigurationException (ex .toString ());
174174 } finally {
@@ -184,11 +184,12 @@ public void load(File... propFile) throws ConfigurationException {
184184 * resorting to the default values
185185 * @throws ConfigurationException if it encounters a fatal error.
186186 */
187- public void load (final boolean fixIssues , File ... propFile ) throws ConfigurationException , MalformedURLException {
187+ public void load (final boolean fixIssues ) throws ConfigurationException , MalformedURLException {
188+ final String owsUserPropertiesFilePath = System .getProperty ("owsUserPropertiesFilePath" );
188189 final SecurityManager sm = System .getSecurityManager ();
189190 if (sm != null ) {
190- if (propFile . length > 0 ) {
191- sm .checkRead (clean ( propFile [ 0 ]. getAbsolutePath ()) );
191+ if (owsUserPropertiesFilePath != null ) {
192+ sm .checkRead (owsUserPropertiesFilePath );
192193 } else {
193194 sm .checkRead (userDeploymentFileDescriptor .getFullPath ());
194195 }
@@ -208,7 +209,7 @@ public void load(final boolean fixIssues, File... propFile ) throws Configuratio
208209 /*
209210 * Third, read the user's subdirResult deployment.properties file or the custom config properties
210211 */
211- userPropertiesFile = propFile . length > 0 ? propFile [ 0 ] : userDeploymentFileDescriptor .getFile ();
212+ userPropertiesFile = owsUserPropertiesFilePath != null ? new File ( owsUserPropertiesFilePath ) : userDeploymentFileDescriptor .getFile ();
212213 final URL userPropertiesUrl = userPropertiesFile .toURI ().toURL ();
213214 final Map <String , Setting > userProperties = loadProperties (ConfigType .USER , userPropertiesUrl , false );
214215 userComments = loadComments (userPropertiesUrl );
0 commit comments