logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 42789] - Chainsaw can't remember filter expressions between restarts
Date Tue, 03 Jul 2007 13:45:07 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42789>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42789





------- Additional Comments From isurues@gmail.com  2007-07-03 06:45 -------
(In reply to comment #2)
> Patch looks reasonable to me.  Possibly backward compatibility problem with the
> new Vector being serialized.
> 
> Can we check if the returned Vector is null?  What if existing saved settings
> don't have this, my guess is the Vector will be either be null (and therefore
> the user will get an NPE on startup), or it will error during the xstream read
> operation.

Yes that's an issue. It returns an EOF exception when we try to load settings
when the vector is not in the XML file. This EOF exception is not handled in the
current implementation. I searched the javadoc for ObjectInputStream and
couldn't find a method to check whether the stream is over.

> 
> Isuru are you able to confirm this behaviour by deleting existing preferences,
> use the non-patched version, saved settings, then apply patch and open
> application.  Just want to confirm we do not introduce a bug to our existing
users.

As a solution for this issue,  we can save the vector before the last object
(Dimention object) and when reading, we can check the last element whether it is
an instance of Vector or Dimention. And read again only if it is a Vector
instance. This will avoid the possibility of occurring an EOF exception.
Will this be OK??

~Isuru



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message