diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-09-15 11:41:39 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-09-15 11:41:39 +0200 |
| commit | 3bb0aefa38c27221114a2db749d2eaa1a9df0336 (patch) | |
| tree | 022a172278d54a35ae464ecd3fc8a19ab6231bf9 /src/main/java/com/c2kernel/process/ClientShell.java | |
| parent | 95b8f12336bbc46f8d3e7cd407b89911aba8d2c5 (diff) | |
Add trim calls to ObjectProperties.getString() to discard any extra
whitespace around the values. Fixes #165
Remove old Gateway.getProperty methods - there should be no deprecated
methods in the 3.0 release
Move all getProperty() calls to getString or other so they will be
trimmed.
Introduce ObjectProperties.getInstances to create ArrayLists of objects
from comma-separated class name lists.
Diffstat (limited to 'src/main/java/com/c2kernel/process/ClientShell.java')
| -rw-r--r-- | src/main/java/com/c2kernel/process/ClientShell.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/c2kernel/process/ClientShell.java b/src/main/java/com/c2kernel/process/ClientShell.java index eeeb07f..d97a3de 100644 --- a/src/main/java/com/c2kernel/process/ClientShell.java +++ b/src/main/java/com/c2kernel/process/ClientShell.java @@ -41,9 +41,7 @@ public class ClientShell extends StandardClient { public static void main(String[] args) throws Exception {
Gateway.init(readC2KArgs(args));
- String authClassName = Gateway.getProperties().getProperty("cli.auth");
- Class<?> authClass = Gateway.getResource().getClassForName(authClassName);
- ProxyLogin auth = (ProxyLogin)authClass.newInstance();
+ ProxyLogin auth = (ProxyLogin)Gateway.getProperties().getInstance("cli.auth");
AgentProxy user = auth.authenticate(Gateway.getProperties().getProperty("Name"));
ClientShell shell = new ClientShell(user);
shell.run();
|
