You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Henri Yandell <fl...@gmail.com> on 2004/09/30 09:06:00 UTC

[lang] bug#30929 - use isAssignableFrom

I think this bug makes sense:

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

Assuming no one disagrees, do we want to make the change in
indexOfThrowable or create a new method? The javadoc for
indexOfThrowable says 'type', which to me would imply inheritence is
adhered to.

I ask as the unit tests fail if the change is made and before I'd
rather not waste the time on them if people are against the change.

Hen

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


Re: [lang] bug#30929 - use isAssignableFrom

Posted by Stephen Colebourne <sc...@btopenworld.com>.
A slightly reluctant +1, its marginal as to whether it is a bug fix ir a
change, but I think bug fix just about wins.

Stephen


----- Original Message -----
From: "Henri Yandell" <fl...@gmail.com>
> I think this bug makes sense:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=30929
>
> Assuming no one disagrees, do we want to make the change in
> indexOfThrowable or create a new method? The javadoc for
> indexOfThrowable says 'type', which to me would imply inheritence is
> adhered to.
>
> I ask as the unit tests fail if the change is made and before I'd
> rather not waste the time on them if people are against the change.
>
> Hen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


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


Re: [lang] bug#30929 - use isAssignableFrom

Posted by Stephen Colebourne <sc...@btopenworld.com>.
OK, heres what I've checked in:

ExceptionUtils
- add indexOfType methods that match subclasses, thus the original
indexOfThrowable is unchanged (good for backwards compatability)

Nestable
- define interface to match subclasses in indexOfThrowable
- comment, indicating usage of ExceptionUtils for backwards compatability

NestableDelegate
- add public static boolean flag to allow reset to old functionlity if
required
- update method to match subclasses by default
- comment, indicating ExceptionUtils


I hope this manages to change the default behaviour while still providing a
full route for backwards compatability (ExceptionUtils or boolean flag). If
no-one objects I will close this soon.
Stephen


----- Original Message -----
From: "Stephen Colebourne" <sc...@btopenworld.com>
> There is an alternative - NestableDelegate already has public boolean
flags
> to enable it to be set back to the previous behaviour. We could do the
same
> for this. Add a flag that allows a user to set the behaviour back from
> allowing subclasses to not allowing subclasses.
>
> However, I believe that there probably is a use case for both types of
> search, so I'd rather go down the route of adding more methods.
>
> Stephen
>
>
> ----- Original Message -----
> From: "Stephen Colebourne" <sc...@btopenworld.com>
> > I was going to make the change, but fixing the tests emphasises that
this
> is
> > not an acceptable 'bug fix'. Thus I am -1 on the change.
> >
> > I intend to commit parallel methods - indexOfType - and Javadoc to cover
> the
> > bug report instead. The only downside is that the interface (Nestable)
> > cannot be changed.
> >
> > Stephen
> >
> > ----- Original Message -----
> > From: "Steven Caswell" <st...@mungoknotwise.com>
> > The bug author makes a good point. I'm +1 to making the change.
> >
> >
> > Steven Caswell
> > Sun Certified Java Programmer
> > steve@mungoknotwise.com
> > "War is an ugly thing, but not the ugliest of things. The decayed and
> > degraded state of moral and patriotic feeling that thinks that nothing
is
> > worth war is much worse. The person who has nothing for which he is
> willing
> > to fight, nothing which is more important than his own personal safety,
is
> a
> > miserable creature and has no chance of being free unless made and kept
so
> > by the exertions of better men than himself." .... John Stuart Mill.
> >
> >
> > > -----Original Message-----
> > > From: Henri Yandell [mailto:flamefew@gmail.com]
> > > Sent: Thursday, September 30, 2004 2:06 AM
> > > To: Jakarta Commons Developers List
> > > Subject: [lang] bug#30929 - use isAssignableFrom
> > >
> > >
> > > I think this bug makes sense:
> > >
> > > http://issues.apache.org/bugzilla/show_bug.cgi?id=30929
> > >
> > > Assuming no one disagrees, do we want to make the change in
> > > indexOfThrowable or create a new method? The javadoc for
> > > indexOfThrowable says 'type', which to me would imply
> > > inheritence is adhered to.
> > >
> > > I ask as the unit tests fail if the change is made and before
> > > I'd rather not waste the time on them if people are against
> > > the change.
> > >
> > > Hen
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


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


Re: [lang] bug#30929 - use isAssignableFrom

Posted by Stephen Colebourne <sc...@btopenworld.com>.
There is an alternative - NestableDelegate already has public boolean flags
to enable it to be set back to the previous behaviour. We could do the same
for this. Add a flag that allows a user to set the behaviour back from
allowing subclasses to not allowing subclasses.

However, I believe that there probably is a use case for both types of
search, so I'd rather go down the route of adding more methods.

Stephen


----- Original Message -----
From: "Stephen Colebourne" <sc...@btopenworld.com>
> I was going to make the change, but fixing the tests emphasises that this
is
> not an acceptable 'bug fix'. Thus I am -1 on the change.
>
> I intend to commit parallel methods - indexOfType - and Javadoc to cover
the
> bug report instead. The only downside is that the interface (Nestable)
> cannot be changed.
>
> Stephen
>
> ----- Original Message -----
> From: "Steven Caswell" <st...@mungoknotwise.com>
> The bug author makes a good point. I'm +1 to making the change.
>
>
> Steven Caswell
> Sun Certified Java Programmer
> steve@mungoknotwise.com
> "War is an ugly thing, but not the ugliest of things. The decayed and
> degraded state of moral and patriotic feeling that thinks that nothing is
> worth war is much worse. The person who has nothing for which he is
willing
> to fight, nothing which is more important than his own personal safety, is
a
> miserable creature and has no chance of being free unless made and kept so
> by the exertions of better men than himself." .... John Stuart Mill.
>
>
> > -----Original Message-----
> > From: Henri Yandell [mailto:flamefew@gmail.com]
> > Sent: Thursday, September 30, 2004 2:06 AM
> > To: Jakarta Commons Developers List
> > Subject: [lang] bug#30929 - use isAssignableFrom
> >
> >
> > I think this bug makes sense:
> >
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=30929
> >
> > Assuming no one disagrees, do we want to make the change in
> > indexOfThrowable or create a new method? The javadoc for
> > indexOfThrowable says 'type', which to me would imply
> > inheritence is adhered to.
> >
> > I ask as the unit tests fail if the change is made and before
> > I'd rather not waste the time on them if people are against
> > the change.
> >
> > Hen
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


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


Re: [lang] bug#30929 - use isAssignableFrom

Posted by Stephen Colebourne <sc...@btopenworld.com>.
I was going to make the change, but fixing the tests emphasises that this is
not an acceptable 'bug fix'. Thus I am -1 on the change.

I intend to commit parallel methods - indexOfType - and Javadoc to cover the
bug report instead. The only downside is that the interface (Nestable)
cannot be changed.

Stephen

----- Original Message -----
From: "Steven Caswell" <st...@mungoknotwise.com>
The bug author makes a good point. I'm +1 to making the change.


Steven Caswell
Sun Certified Java Programmer
steve@mungoknotwise.com
"War is an ugly thing, but not the ugliest of things. The decayed and
degraded state of moral and patriotic feeling that thinks that nothing is
worth war is much worse. The person who has nothing for which he is willing
to fight, nothing which is more important than his own personal safety, is a
miserable creature and has no chance of being free unless made and kept so
by the exertions of better men than himself." .... John Stuart Mill.


> -----Original Message-----
> From: Henri Yandell [mailto:flamefew@gmail.com]
> Sent: Thursday, September 30, 2004 2:06 AM
> To: Jakarta Commons Developers List
> Subject: [lang] bug#30929 - use isAssignableFrom
>
>
> I think this bug makes sense:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=30929
>
> Assuming no one disagrees, do we want to make the change in
> indexOfThrowable or create a new method? The javadoc for
> indexOfThrowable says 'type', which to me would imply
> inheritence is adhered to.
>
> I ask as the unit tests fail if the change is made and before
> I'd rather not waste the time on them if people are against
> the change.
>
> Hen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>



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



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


RE: [lang] bug#30929 - use isAssignableFrom

Posted by Steven Caswell <st...@mungoknotwise.com>.
The bug author makes a good point. I'm +1 to making the change.


Steven Caswell
Sun Certified Java Programmer
steve@mungoknotwise.com
"War is an ugly thing, but not the ugliest of things. The decayed and
degraded state of moral and patriotic feeling that thinks that nothing is
worth war is much worse. The person who has nothing for which he is willing
to fight, nothing which is more important than his own personal safety, is a
miserable creature and has no chance of being free unless made and kept so
by the exertions of better men than himself." .... John Stuart Mill.


> -----Original Message-----
> From: Henri Yandell [mailto:flamefew@gmail.com] 
> Sent: Thursday, September 30, 2004 2:06 AM
> To: Jakarta Commons Developers List
> Subject: [lang] bug#30929 - use isAssignableFrom
> 
> 
> I think this bug makes sense:
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=30929
> 
> Assuming no one disagrees, do we want to make the change in 
> indexOfThrowable or create a new method? The javadoc for 
> indexOfThrowable says 'type', which to me would imply 
> inheritence is adhered to.
> 
> I ask as the unit tests fail if the change is made and before 
> I'd rather not waste the time on them if people are against 
> the change.
> 
> Hen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 
> 



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