details:   https://code.openbravo.com/erp/devel/pi/rev/cf2476a790bf
changeset: 24275:cf2476a790bf
user:      Rafa Alonso <rafael.alonso <at> openbravo.com>
date:      Tue Aug 19 12:39:04 2014 +0200
summary:   Fixes issue 27370: If the session is invalidated while retriving or 
removing session attributes,
- the session will end
- the console log will properly report that the session was invalidated

Methods involved (setSessionValue was fixed wth the above changeset):
- getSessionValue
- removeSessionValue

diffstat:

 src-core/src/org/openbravo/base/VariablesBase.java |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 292e42c68726 -r cf2476a790bf 
src-core/src/org/openbravo/base/VariablesBase.java
--- a/src-core/src/org/openbravo/base/VariablesBase.java        Tue Aug 19 
12:00:02 2014 +0200
+++ b/src-core/src/org/openbravo/base/VariablesBase.java        Tue Aug 19 
12:39:04 2014 +0200
@@ -1321,6 +1321,8 @@
       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;
     }
@@ -1362,7 +1364,8 @@
       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);
     }

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

Reply via email to