From 3bb0aefa38c27221114a2db749d2eaa1a9df0336 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Mon, 15 Sep 2014 11:41:39 +0200 Subject: 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. --- src/main/java/com/c2kernel/process/ClientShell.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java/com/c2kernel/process/ClientShell.java') 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(); -- cgit v1.2.3