Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340898 - Problem when super class has generics
Summary: Problem when super class has generics
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 347958 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-24 14:51 EDT by Blaise Doughan CLA
Modified: 2022-06-09 10:32 EDT (History)
2 users (show)

See Also:


Attachments
MOXy - Test Cases (3.31 KB, patch)
2011-03-24 14:54 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (810 bytes, patch)
2011-03-24 14:58 EDT, Blaise Doughan CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Blaise Doughan CLA 2011-03-24 14:51:19 EDT
Given the following model:

import java.util.List;

public class AbstractClassWithGenerics<T> {

    private List<T> a;

    public List<T> getA() {
        return a;
    }

    public void setA(List<T> a) {
        this.a = a;
    }

}

and

public class ConcreteClassWithGenerics extends AbstractClassWithGenerics<String> {

}

An exception is thrown when trying to create a JAXBContext on the subclass.
Comment 1 Blaise Doughan CLA 2011-03-24 14:54:35 EDT
Created attachment 191855 [details]
MOXy - Test Cases
Comment 2 Blaise Doughan CLA 2011-03-24 14:58:30 EDT
Created attachment 191856 [details]
MOXy - Fix
Comment 3 Blaise Doughan CLA 2011-03-25 09:28:15 EDT
Fix checked into trunk at rev:  9171

Code reviewed by:  Matt MacIvor

Fix Description:
In Property guard against there being an ActualTypeArguments list of size 0.
Comment 4 Blaise Doughan CLA 2011-06-01 12:53:06 EDT
*** Bug 347958 has been marked as a duplicate of this bug. ***
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:32:43 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink