I¹ve created a unit test to verify this.  It looks as follows:

    public abstract class ObjectId<IdType> {

        private final IdType value;

        protected ObjectId() {
            value = null;
        }

        protected final IdType getIdValue() {
            return value;
        }

        public abstract IdType getValue();
    }
    
    public class ApplicationId extends ObjectId<Long> {
        
        @Override
        public Long getValue() {
            return getIdValue();
        }
    }

    @Test
    public void duplicateMethodPojo() throws Exception {
        
        ApplicationId pojo = new ApplicationId();
        Map<String, Method> methods = JsonUtil.getGetters(pojo);
    } 

I¹m looking into submitting a patch to JsonUtil to fix this (along with
submitting this test case).

If I¹m only going to put the method into the map once, does anyone know what
method should be selected?  I think the method modifiers will give me enough
details to determine this.  I imagine the interface or abstract ones can be
thrown out.  Ideas?

doug


On 3/14/12 10:39 AM, "daviesd" <davi...@oclc.org> wrote:

> Paul,
> 
> I¹m trying to track down this LocalCache problem that was introduced on commit
> r1290973.  What I¹ve noticed is that it fails when it thinks two methods have
> the same signature.  For example I see this list of methods:

Reply via email to