diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-02-13 13:48:36 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-02-13 13:48:36 -0330 |
commit | 51454ae5a6219fb8e3a6464b35f545b620001279 (patch) | |
tree | 42ad16d4151a9ffb5f7675c5307c5e20f01cd159 /java/src/IceBox/ServiceManagerI.java | |
parent | Added deprecated warning to error outputs (diff) | |
download | ice-51454ae5a6219fb8e3a6464b35f545b620001279.tar.bz2 ice-51454ae5a6219fb8e3a6464b35f545b620001279.tar.xz ice-51454ae5a6219fb8e3a6464b35f545b620001279.zip |
Bug 2491 - Use getPropertyAsList
Diffstat (limited to 'java/src/IceBox/ServiceManagerI.java')
-rw-r--r-- | java/src/IceBox/ServiceManagerI.java | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/java/src/IceBox/ServiceManagerI.java b/java/src/IceBox/ServiceManagerI.java index 297438f06f4..6545cd39473 100644 --- a/java/src/IceBox/ServiceManagerI.java +++ b/java/src/IceBox/ServiceManagerI.java @@ -280,16 +280,6 @@ public class ServiceManagerI extends _ServiceManagerDisp } // - // Parse the IceBox.LoadOrder property. - // - String order = properties.getProperty("IceBox.LoadOrder"); - String[] loadOrder = null; - if(order.length() > 0) - { - loadOrder = order.trim().split("[,\t ]+"); - } - - // // Load and start the services defined in the property set // with the prefix "IceBox.Service.". These properties should // have the following format: @@ -301,23 +291,21 @@ public class ServiceManagerI extends _ServiceManagerDisp // final String prefix = "IceBox.Service."; java.util.Map<String, String> services = properties.getPropertiesForPrefix(prefix); - if(loadOrder != null) + String[] loadOrder = properties.getPropertyAsList("IceBox.LoadOrder"); + for(int i = 0; i < loadOrder.length; ++i) { - for(int i = 0; i < loadOrder.length; ++i) + if(loadOrder[i].length() > 0) { - if(loadOrder[i].length() > 0) + String key = prefix + loadOrder[i]; + String value = services.get(key); + if(value == null) { - String key = prefix + loadOrder[i]; - String value = services.get(key); - if(value == null) - { - FailureException ex = new FailureException(); - ex.reason = "ServiceManager: no service definition for `" + loadOrder[i] + "'"; - throw ex; - } - load(loadOrder[i], value); - services.remove(key); + FailureException ex = new FailureException(); + ex.reason = "ServiceManager: no service definition for `" + loadOrder[i] + "'"; + throw ex; } + load(loadOrder[i], value); + services.remove(key); } } java.util.Iterator<java.util.Map.Entry<String, String> > p = services.entrySet().iterator(); |