You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Jon Scott Stevens <jo...@latchkey.com> on 2002/06/12 02:58:30 UTC

[betwixt] two bugs

Bug #1:

If I remove the getModules() method from the code below, then the
addModule() method is never called and no error is reported.

import java.util.List;
import java.util.ArrayList;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.tigris.scarab.util.xmlissues.Module;

public class ScarabIssues implements java.io.Serializable
{
    private final static Log log = LogFactory.getLog(ScarabIssues.class);

    public ScarabIssues()
    {
    }

    public List getModules()
    {
        return new ArrayList();
    }

    public void addModule(Module module)
    {
        log.debug("Module: " + module.getName());
    }
}

Bug #2:

If the Module class referenced above does not implement Serializable, then
it is also not called and no error is reported.


-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by Martin van den Bemt <ml...@mvdb.net>.
> > Using the tescase of scarab in the betwixt tree, this is working for me
> > (just removed the implement serializable in ScarabSettings). Can you
> > give me the non working example (or can I get it from scarab cvs
> > anywhere?).
> 
> Arg. I can't duplicate this one now either. ;-(

Cool.. maybe it was fixed by the commit yesterday, but I don't recall
changing something in that area though..
If you try with the old betwixt from sandbox and it fails, it must have
something to do with my patch probably.. 

Mvgr,
Martin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 6/12/02 12:42 AM, "Martin van den Bemt" <ml...@mvdb.net> wrote:

>> 
>> Bug #2:
>> 
>> If the Module class referenced above does not implement Serializable, then
>> it is also not called and no error is reported.
> 
> Using the tescase of scarab in the betwixt tree, this is working for me
> (just removed the implement serializable in ScarabSettings). Can you
> give me the non working example (or can I get it from scarab cvs
> anywhere?).

Arg. I can't duplicate this one now either. ;-(

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "robert burrell donkin" <ro...@mac.com>
> i'd personally say that really betwixt should probably find addModule even
> without a matching getModules but jason or james are the ones who should
> be able to give a definitely answer.

I think I agree. Someone may only want to parse XML and use betwixt to
default digester rules, but they may never want to output XML again. The
worry though is that if their beans are turned back to XML then information
will be lost. So a warning should be generated I guess.

> if it's decided that it shouldn't be found then this should probably be
> documented and a warning log message added. either way, shouldn't take too
> long to do once the correct approach is clear.

Agreed. I think I'm leaning towards just generating a warning. Would that be
OK with you Jon?

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by Martin van den Bemt <ml...@mvdb.net>.
> 
> there are many johns but only one jon :)

I cannot even remember my own name sometimes and if I say both
variations, they still sound the same ;)

> 
> jon's so famous he even has his own page ;)

it's hard not to notice him (at least on jakarta). 

> 
> http://jakarta.apache.org/site/jon.html

Hmm.. curious who wrote that.. 
Btw Some sun wouldn't hurt jon ;)

Mvgr,
Martin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by robert burrell donkin <ro...@mac.com>.
On Wednesday, June 12, 2002, at 08:29 PM, Martin van den Bemt wrote:

> On Wed, 2002-06-12 at 20:47, Jon Scott Stevens wrote:
>> on 6/12/02 12:42 AM, "Martin van den Bemt" <ml...@mvdb.net> wrote:
>>
>>> Hi John,
>>
>> My name is 'Jon'.
>
> Sorry, just know to many Johns I guess ;)

there are many johns but only one jon :)

jon's so famous he even has his own page ;)

http://jakarta.apache.org/site/jon.html


>>>> If I remove the getModules() method from the code below, then the
>>>> addModule() method is never called and no error is reported.
>>>
>>> AFAIK this behaviour is intended in the code.
>>> Do you want just an error or warning or do you want it to just call
>>> addModule and in this way transform the xml files to another form when
>>> writing it again?
>>
>> At least a warning should be shown.

i'd personally say that really betwixt should probably find addModule even 
without a matching getModules but jason or james are the ones who should 
be able to give a definitely answer.

if it's decided that it shouldn't be found then this should probably be 
documented and a warning log message added. either way, shouldn't take too 
long to do once the correct approach is clear.

- robert


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 6/12/02 12:29 PM, "Martin van den Bemt" <ml...@mvdb.net> wrote:

> I'll dig into that and await your testcase.. Btw can I add scarab to the
> list of Powered By ?

Yes...

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by Martin van den Bemt <ml...@mvdb.net>.
On Wed, 2002-06-12 at 20:47, Jon Scott Stevens wrote:
> on 6/12/02 12:42 AM, "Martin van den Bemt" <ml...@mvdb.net> wrote:
> 
> > Hi John,
> 
> My name is 'Jon'.

Sorry, just know to many Johns I guess ;)
> 
> >> If I remove the getModules() method from the code below, then the
> >> addModule() method is never called and no error is reported.
> > 
> > AFAIK this behaviour is intended in the code.
> > Do you want just an error or warning or do you want it to just call
> > addModule and in this way transform the xml files to another form when
> > writing it again?
> 
> At least a warning should be shown.

I'll dig into that and await your testcase.. Btw can I add scarab to the
list of Powered By ? 

Mvgr,
Martin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 6/12/02 12:42 AM, "Martin van den Bemt" <ml...@mvdb.net> wrote:

> Hi John,

My name is 'Jon'.

> On Wed, 2002-06-12 at 02:58, Jon Scott Stevens wrote:
>> Bug #1:
>> 
>> If I remove the getModules() method from the code below, then the
>> addModule() method is never called and no error is reported.
> 
> AFAIK this behaviour is intended in the code.
> Do you want just an error or warning or do you want it to just call
> addModule and in this way transform the xml files to another form when
> writing it again?

At least a warning should be shown.

>> Bug #2:
>> 
>> If the Module class referenced above does not implement Serializable, then
>> it is also not called and no error is reported.
> 
> Using the tescase of scarab in the betwixt tree, this is working for me
> (just removed the implement serializable in ScarabSettings). Can you
> give me the non working example (or can I get it from scarab cvs
> anywhere?).

I will try to come up with a test case...my code isn't checked into Scarab's
CVS tree yet...

-jon


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [betwixt] two bugs

Posted by Martin van den Bemt <ml...@mvdb.net>.
Hi John,

On Wed, 2002-06-12 at 02:58, Jon Scott Stevens wrote:
> Bug #1:
> 
> If I remove the getModules() method from the code below, then the
> addModule() method is never called and no error is reported.

AFAIK this behaviour is intended in the code.
Do you want just an error or warning or do you want it to just call
addModule and in this way transform the xml files to another form when
writing it again? 

> 
> Bug #2:
> 
> If the Module class referenced above does not implement Serializable, then
> it is also not called and no error is reported.

Using the tescase of scarab in the betwixt tree, this is working for me
(just removed the implement serializable in ScarabSettings). Can you
give me the non working example (or can I get it from scarab cvs
anywhere?).

Mvgr,
Martin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>