On Mon, Apr 11, 2011 at 10:14 AM, Matt Benson <gudnabr...@gmail.com> wrote:

> On Mon, Apr 11, 2011 at 9:06 AM, Gary Gregory <garydgreg...@gmail.com>
> wrote:
> > Also:
> >
> > Why go through this complicated code path:
> >
> > StringBuilder builder = new
> StringBuilder(ClassUtils.getShortClassName(this,
> > null));
> >
> > instead of the simpler:
> >
> > StringBuilder builder = new
> StringBuilder(this.getClass().getSimpleName());
> >
> > ?
>
> Because I've been working with reflection so long #getSimpleName()
> didn't exist when I first became familiar with the reflection APIs.
> :P
>

Ok, I've updated the call site to the use Java 5 API ;)

Gary


> Matt
>
> >
> > Thank you,
> > Gary
> >
> > On Mon, Apr 11, 2011 at 10:00 AM, Gary Gregory <garydgreg...@gmail.com
> >wrote:
> >
> >> Hi All:
> >>
> >> I added a test to verify the default Pair toString behavior.
> >>
> >> For me to replace our custom Pair class at work, I need to customize the
> to
> >> String behavior.
> >>
> >> Subclassing ImmutablePair and MutablePair to override toString smells
> >> nasty.
> >>
> >> What about adding a formatString ivar which will be used with the
> >> String.format API?
> >>
> >> --
> >> Thank you,
> >> Gary
> >>
> >> http://garygregory.wordpress.com/
> >> http://garygregory.com/
> >> http://people.apache.org/~ggregory/
> >> http://twitter.com/GaryGregory
> >>
> >
> >
> >
> > --
> > Thank you,
> > Gary
> >
> > http://garygregory.wordpress.com/
> > http://garygregory.com/
> > http://people.apache.org/~ggregory/
> > http://twitter.com/GaryGregory
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Reply via email to