Author: kturner
Date: Thu Apr 18 23:29:17 2013
New Revision: 1469632
URL: http://svn.apache.org/r1469632
Log:
ACCUMULO-259 made proxy give informative message if token type not configured
Modified:
accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
Modified:
accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java?rev=1469632&r1=1469631&r2=1469632&view=diff
==============================================================================
---
accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
(original)
+++
accumulo/branches/1.5/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
Thu Apr 18 23:29:17 2013
@@ -155,7 +155,10 @@ public class ProxyServer implements Accu
props.getProperty("org.apache.accumulo.proxy.ProxyServer.zookeepers"));
try {
- tokenClass =
Class.forName(props.getProperty("org.apache.accumulo.proxy.ProxyServer.tokenClass")).asSubclass(AuthenticationToken.class);
+ String tokenProp =
props.getProperty("org.apache.accumulo.proxy.ProxyServer.tokenClass");
+ if (tokenProp == null)
+ throw new IllegalArgumentException("Missing property :
org.apache.accumulo.proxy.ProxyServer.tokenClass");
+ tokenClass =
Class.forName(tokenProp).asSubclass(AuthenticationToken.class);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}