details:   https://code.openbravo.com/erp/devel/pi/rev/53ea1d3637f9
changeset: 24278:53ea1d3637f9
user:      Rafa Alonso <rafael.alonso <at> openbravo.com>
date:      Tue Aug 19 17:32:35 2014 +0200
summary:   Related to issue 27370: Backed out rev 24275, changeset: cf2476a790bf
If the session is invalidated while retrieving session attributes...
(getSessionValue, removeSessionValue)

details:   https://code.openbravo.com/erp/devel/pi/rev/b6c3c0ad739e
changeset: 24279:b6c3c0ad739e
user:      Rafa Alonso <rafael.alonso <at> openbravo.com>
date:      Tue Aug 19 17:34:25 2014 +0200
summary:   Related to issue 27370: Backed out rev 24274, changeset: 292e42c68726
If the session is invalidated while retrieving session attributes...
(setSessionValue)

diffstat:

 src-core/src/org/openbravo/base/VariablesBase.java         |  9 ++-------
 src/org/openbravo/base/secureApp/HttpSecureAppServlet.java |  5 +----
 2 files changed, 3 insertions(+), 11 deletions(-)

diffs (48 lines):

diff -r 644aee6a8041 -r b6c3c0ad739e 
src-core/src/org/openbravo/base/VariablesBase.java
--- a/src-core/src/org/openbravo/base/VariablesBase.java        Tue Aug 19 
15:10:36 2014 +0200
+++ b/src-core/src/org/openbravo/base/VariablesBase.java        Tue Aug 19 
17:34:25 2014 +0200
@@ -1321,8 +1321,6 @@
       auxStr = (String) session.getAttribute(sessionAttribute.toUpperCase());
       if (auxStr == null || auxStr.trim().equals(""))
         auxStr = defaultValue;
-    } catch (final IllegalStateException ise) {
-      throw new IllegalStateException(ise);
     } catch (Exception e) {
       auxStr = defaultValue;
     }
@@ -1346,9 +1344,7 @@
       if (!attribute.equalsIgnoreCase("menuVertical"))
         if (log4j.isDebugEnabled())
           log4j.debug("Set session attribute: " + attribute + ":..." + 
value.toString());
-    } catch (final IllegalStateException ise) {
-      throw new IllegalStateException(ise);
-    } catch (final Exception e) {
+    } catch (Exception e) {
       log4j.error("setSessionValue error: " + attribute + ":..." + value);
     }
   }
@@ -1364,8 +1360,7 @@
       if (log4j.isDebugEnabled())
         log4j.debug("Remove session attribute: " + attribute + ":..." + 
getSessionValue(attribute));
       session.removeAttribute(attribute.toUpperCase());
-    } catch (final IllegalStateException ise) {
-      throw new IllegalStateException(ise);
+
     } catch (Exception e) {
       log4j.error("removeSessionValue error: " + attribute);
     }
diff -r 644aee6a8041 -r b6c3c0ad739e 
src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java        Tue Aug 
19 15:10:36 2014 +0200
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java        Tue Aug 
19 17:34:25 2014 +0200
@@ -346,10 +346,7 @@
       roleError.setType("Error");
       roleError.setMessage(msg);
       invalidLogin(request, response, roleError);
-      return;
-    } catch (final IllegalStateException ise) {
-      log4j.error("HTTPSecureAppServlet.service() - exception caught: ", ise);
-      invalidateSession(request);
+
       return;
     } catch (final Exception e) {
       // Re-login

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to