commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Grobmeier <grobme...@gmail.com>
Subject Re: [OGNL] CacheException
Date Wed, 01 Feb 2012 16:03:51 GMT
On Wed, Feb 1, 2012 at 4:55 PM, Maurizio Cucchiara
<mcucchiara@apache.org> wrote:
> Hi guys,
> I was trying to integrate Struts2 with the new api layout.
> Unfortunately I realized that due to the introduction of the new checked
> CacheException [1] (which basically inherits the Exception class), every
> method (which uses a cache, practically all of them) of OgnlRuntime [2]
> must throw the aforementioned exception.
> Furthermore it seems that there is only one class able to produce
> exceptions [3]
> This is make very hard the integration process of Struts2.
> I was thinking to change the exception in a unchecked version, but [3]
> makes me think the contrary.

Why do you now think contrary?

When I read the first part of your message I thought: heck, why is it
a checked exception?
Stupid question: can a OgnlException exception occur on objects in the
cache? I mean in practice...
To my understanding the checked OgnlException occurs before putting
something into the cache. Therefore the CachedException is more or
less an exception which is somehow produced at runtime, due to a
programming error. Sounds like a runtime exception for me, but  I
would love to hear why you are not thinking different

Cheers

>
> I would like to know your thought.
>
>
> [1]
> http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/CacheException.java?revision=1194943&view=markup
> [2]
> http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlRuntime.java?revision=1203594&view=markup
> [3]
> http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/internal/entry/PropertyDescriptorCacheEntryFactory.java?revision=1194960&view=markup
>
> Twitter     :http://www.twitter.com/m_cucchiara
> G+          :https://plus.google.com/107903711540963855921
> Linkedin    :http://www.linkedin.com/in/mauriziocucchiara
>
> Maurizio Cucchiara



-- 
http://www.grobmeier.de
https://www.timeandbill.de

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message