The following comment has been added to this issue:
Author: Steve Gibson
Created: Thu, 12 Aug 2004 8:00 AM
Body:
Thanks for the exception handling and added logging.
I still think it is important to be able to check the depth (or at least be
able to peek without throwing an exception), but maybe that is because I am
trying to do things in ways not supported by the configuration parsing system.
What I am doing is creating a properties file from a hibernate configuration
(expressed in the hibernate xml format) embedded in my module definition as a
contribution. I have a custom rule which takes the name attribute and the
element body off the stack, gets a proeprties object off the stack (or creates
a new one), sets the property and puts everything back.
Maybe this can be further discussed on the mailing list.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/HIVEMIND-41?page=comments#action_37224
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/HIVEMIND-41
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HIVEMIND-41
Summary: No bounds checking in SchemaProcessorImpl stack
Type: Bug
Status: Closed
Priority: Major
Resolution: FIXED
Project: HiveMind
Components:
framework
Versions:
1.0
Assignee: Howard M. Lewis Ship
Reporter: Steve Gibson
Created: Fri, 6 Aug 2004 10:28 AM
Updated: Thu, 12 Aug 2004 8:00 AM
Description:
org.apache.hivemind.impl.SchemaProcessorImpl aggregates stack functionality
along with its other functions. This is achieved by a java.util.List and some
public methods.
Unfortunately, these methods do not perform bounds checking or a way to check
the size of thist stack. Java does do this, and throws
ArrayIndexOutOfBoundsException, but the resulting exception seen in client code
looks like:
2004-08-06 13:22:31,959 com.cowww.test.commons.hivemind.RegistryFactoryTestCase
[ERROR] org.apache.hivemind.ApplicationRuntimeException: Unable to construct
configuration cowww.HibernateConfiguration: -1
java.util.Stack throws an EmptyStackException in this case, which is a lot
easier to diagnose without having to check the rootCause.
My opinion is that:
1. EmptyStackException is thrown
2. A method for checking the stack depth is added.
It may be easier to just use a Stack internally and make the pertinent methods
available to calling classes.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]