senyor / generate-tostring

Automatically exported from code.google.com/p/generate-tostring
0 stars 0 forks source link

member.typeName in Java5 Collections #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. if you have an attribute  private Collection<Quote> quotes;
2. use $member.typeName
3.

What is the expected output? What do you see instead?
I would expect to see 'Quote', but instead, I see 'Quote >'.  It appears to
handle it correctly except for the trailing '>'.

What version of the product are you using? On what operating system?
4.0.5 in IDEA 7.03 on Windows XP

Please provide any additional information below.
I'm writing a new method (i.e. not toString) which needs to iterate through
objects in the collection and call a method on each of those objects.
for (Quote obj : quotes)
    sb.append(obj.toXML());

Original issue reported on code.google.com by tkamarai...@gmail.com on 17 Jun 2008 at 12:26

GoogleCodeExporter commented 8 years ago
Thanks for the report. The JDK1.5 stuff hasn't been tested so throughly as in my
professional career we have quite a few 'legacy' systems on 1.4. However 1.5 is 
now
on the radar and so I start to work with it every day.

Original comment by claus.ib...@gmail.com on 19 Jun 2008 at 4:24

GoogleCodeExporter commented 8 years ago
I can reproduce it like this: 

    private Collection<Pet> pets;

    public String toString() {
        return "DummyJava5Bean{" +
            "pets=" + Pet > +
            '}';
    }

You want Pet > to be Pet

Original comment by claus.ib...@gmail.com on 5 Jul 2008 at 7:19

GoogleCodeExporter commented 8 years ago
Fixed in v4.0.6

Original comment by claus.ib...@gmail.com on 5 Jul 2008 at 8:23