Author: marrs
Date: Fri Apr 11 19:12:09 2014
New Revision: 1586753

URL: http://svn.apache.org/r1586753
Log:
ACE-442 Fixed a configuration parsing issue.

Modified:
    
ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java

Modified: 
ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
URL: 
http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java?rev=1586753&r1=1586752&r2=1586753&view=diff
==============================================================================
--- 
ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
 (original)
+++ 
ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/RESTClientServlet.java
 Fri Apr 11 19:12:09 2014
@@ -592,15 +592,17 @@ public class RESTClientServlet extends H
        else {
                try {
                        Object timeoutObject = 
properties.get(KEY_SESSION_TIMEOUT);
-                       if (timeoutObject instanceof Integer) {
-                               m_sessionTimeout = (Integer) timeoutObject;
-                       }
-                       else {
-                               m_sessionTimeout = 
Integer.parseInt(timeoutObject.toString());
-                       }
-                       if (m_sessionTimeout < 1) {
-                               m_sessionTimeout = DEFAULT_SESSION_TIMEOUT;
-                               throw new 
ConfigurationException(KEY_SESSION_TIMEOUT, "Session timeout should be at least 
1 second");
+                       if (timeoutObject != null) {
+                               if (timeoutObject instanceof Integer) {
+                                       m_sessionTimeout = (Integer) 
timeoutObject;
+                               }
+                               else {
+                                       m_sessionTimeout = 
Integer.parseInt(timeoutObject.toString());
+                               }
+                               if (m_sessionTimeout < 1) {
+                                       m_sessionTimeout = 
DEFAULT_SESSION_TIMEOUT;
+                                       throw new 
ConfigurationException(KEY_SESSION_TIMEOUT, "Session timeout should be at least 
1 second");
+                               }
                        }
                }
                catch (Exception e) {


Reply via email to