struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Conroy (JIRA)" <>
Subject [jira] [Created] (WW-4174) Make OgnlValueStack and OgnlValueStackFactory More Extensible
Date Mon, 12 Aug 2013 15:40:47 GMT
Kevin Conroy created WW-4174:

             Summary: Make OgnlValueStack and OgnlValueStackFactory More Extensible
                 Key: WW-4174
             Project: Struts 2
          Issue Type: Bug
          Components: Value Stack
    Affects Versions:
            Reporter: Kevin Conroy

I'm not trying to reopen XW-613 and have taken the advice from the mailing list seriously
about not just requesting changes to the default behavior or log levels.

Instead, I'd like to propose changing some private methods in OgnlValueStack to be protected
so that developers can more easily extend OgnlValueStack to implement their desired logging/warning/exception
behavior for their application.

I'd like to propose that the following methods in OgnlValueStack (currently private in scope)
should be changed to protected:

protected void handleRuntimeException(String expr, Object value, boolean throwExceptionOnFailure,
RuntimeException re)
protected void handleOgnlException(String expr, Object value, boolean throwExceptionOnFailure,
OgnlException e)
protected void setupExceptionOnFailure(boolean throwExceptionOnFailure)
protected Object handleOtherException(String expr, boolean throwExceptionOnFailure, Exception
protected Object handleOgnlException(String expr, boolean throwExceptionOnFailure, OgnlException
protected boolean shouldLogNoSuchPropertyWarning(OgnlException e)
protected Object findInContext(String name)

Additionally, to enable the OgnlValueStackFactory to be easily extended to return any overridden
OgnlValueStack implementations, the currently private data members should be given protected


   protected XWorkConverter getXworkConverter()
      return xworkConverter;

   protected CompoundRootAccessor getCompoundRootAccessor()
      return compoundRootAccessor;

   protected TextProvider getTextProvider()
      return textProvider;

   protected Container getContainer()
      return container;

   protected boolean isAllowStaticMethodAccess()
      return allowStaticMethodAccess;

This would allow developers like myself to more easily extend and override behavior to better
fit our own desired notification levels. For example, these changes would allow me to set
it up to provide info level warnings in the log file while suppressing the exception that
gets thrown.

Protected level scope ensures that my custom extensions can more easily inherit bug fixes
and behavior changes from future versions.


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message