You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cr...@apache.org on 2006/03/07 01:42:33 UTC

svn commit: r383728 - /beehive/trunk/netui/src/scoping/org/apache/beehive/netui/pageflow/scoping/internal/ScopedRequestImpl.java

Author: crogers
Date: Mon Mar  6 16:42:31 2006
New Revision: 383728

URL: http://svn.apache.org/viewcvs?rev=383728&view=rev
Log:
Fix for http://issues.apache.org/jira/browse/BEEHIVE-1075 - NPE in ScopedRequestImpl.registerOuterAttribute() when running without asserts.

With this change ScopedRequestImpl.registerOuterAttribute()  will log an error and return rather than throw an NPE when running without asserts.

tests: bvt in netui (WinXP)


Modified:
    beehive/trunk/netui/src/scoping/org/apache/beehive/netui/pageflow/scoping/internal/ScopedRequestImpl.java

Modified: beehive/trunk/netui/src/scoping/org/apache/beehive/netui/pageflow/scoping/internal/ScopedRequestImpl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/src/scoping/org/apache/beehive/netui/pageflow/scoping/internal/ScopedRequestImpl.java?rev=383728&r1=383727&r2=383728&view=diff
==============================================================================
--- beehive/trunk/netui/src/scoping/org/apache/beehive/netui/pageflow/scoping/internal/ScopedRequestImpl.java (original)
+++ beehive/trunk/netui/src/scoping/org/apache/beehive/netui/pageflow/scoping/internal/ScopedRequestImpl.java Mon Mar  6 16:42:31 2006
@@ -583,6 +583,12 @@
         assert ! _seeOuterRequestAttributes :
                 "(attribute " + attrName + ") " +
                 "this method is not valid unless the ScopedRequest is configured not to see outer request attributes";
+
+        if (_seeOuterRequestAttributes) {
+            _log.error("the ScopedRequest is already configured to see outer request attributes");
+            return;
+        }
+
         _visibleOuterRequestAttrs.add( attrName );
     }