Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 372092 | Differences between
and this patch

Collapse All | Expand All

(-)a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inherited/Beer.java (-1 / +3 lines)
Lines 15-20 Link Here
15
 *       -311395 : Multiple lifecycle callback methods for the same lifecycle event
15
 *       -311395 : Multiple lifecycle callback methods for the same lifecycle event
16
 *     08/11/2010-2.2 Guy Pelletier 
16
 *     08/11/2010-2.2 Guy Pelletier 
17
 *       - 312123: JPA: Validation error during Id processing on parameterized generic OneToOne Entity relationship from MappedSuperclass
17
 *       - 312123: JPA: Validation error during Id processing on parameterized generic OneToOne Entity relationship from MappedSuperclass
18
 *     10/05/2012-2.4.1 Guy Pelletier 
19
 *       - 373092: Exceptions using generics, embedded key and entity inheritance
18
 ******************************************************************************/  
20
 ******************************************************************************/  
19
package org.eclipse.persistence.testing.models.jpa.inherited;
21
package org.eclipse.persistence.testing.models.jpa.inherited;
20
22
Lines 37-43 import java.sql.Timestamp; Link Here
37
39
38
@MappedSuperclass
40
@MappedSuperclass
39
@ExistenceChecking(CHECK_CACHE)
41
@ExistenceChecking(CHECK_CACHE)
40
public class Beer<G, H, I> extends Beverage<G> {
42
public class Beer<PK, H, I> extends Beverage<PK> {
41
    private Timestamp version;
43
    private Timestamp version;
42
    private H alcoholContent;
44
    private H alcoholContent;
43
    private BeerConsumer beerConsumer;
45
    private BeerConsumer beerConsumer;
(-)a/jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/models/jpa/inherited/Beverage.java (-4 / +6 lines)
Lines 13-18 Link Here
13
 *       - 232975: Failure when attribute type is generic
13
 *       - 232975: Failure when attribute type is generic
14
 *     07/15/2010-2.2 Guy Pelletier 
14
 *     07/15/2010-2.2 Guy Pelletier 
15
 *       -311395 : Multiple lifecycle callback methods for the same lifecycle event
15
 *       -311395 : Multiple lifecycle callback methods for the same lifecycle event
16
 *     10/05/2012-2.4.1 Guy Pelletier 
17
 *       - 373092: Exceptions using generics, embedded key and entity inheritance
16
 ******************************************************************************/  
18
 ******************************************************************************/  
17
package org.eclipse.persistence.testing.models.jpa.inherited;
19
package org.eclipse.persistence.testing.models.jpa.inherited;
18
20
Lines 24-33 import javax.persistence.MappedSuperclass; Link Here
24
import static javax.persistence.GenerationType.*;
26
import static javax.persistence.GenerationType.*;
25
27
26
@MappedSuperclass
28
@MappedSuperclass
27
public class Beverage<T> {
29
public class Beverage<PK> {
28
    public static int BEVERAGE_POST_PERSIST_COUNT = 0;
30
    public static int BEVERAGE_POST_PERSIST_COUNT = 0;
29
    
31
    
30
    private T id;
32
    private PK id;
31
    
33
    
32
    public Beverage() {}
34
    public Beverage() {}
33
    
35
    
Lines 39-49 public class Beverage<T> { Link Here
39
        pkColumnName="SEQ_NAME", 
41
        pkColumnName="SEQ_NAME", 
40
        valueColumnName="SEQ_COUNT",
42
        valueColumnName="SEQ_COUNT",
41
        pkColumnValue="BEVERAGE_SEQ")
43
        pkColumnValue="BEVERAGE_SEQ")
42
    public T getId() {
44
    public PK getId() {
43
        return id;
45
        return id;
44
    }
46
    }
45
    
47
    
46
    public void setId(T id) {
48
    public void setId(PK id) {
47
        this.id = id;
49
        this.id = id;
48
    }
50
    }
49
    
51
    
(-)a/jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/objects/MetadataAsmFactory.java (-13 / +28 lines)
Lines 1-5 Link Here
1
package org.eclipse.persistence.internal.jpa.metadata.accessors.objects;
2
3
/*******************************************************************************
1
/*******************************************************************************
4
 * Copyright (c) 1998, 2010 Oracle, Hans Harz, Andrew Rustleund. All rights reserved.
2
 * Copyright (c) 1998, 2010 Oracle, Hans Harz, Andrew Rustleund. All rights reserved.
5
 * This program and the accompanying materials are made available under the 
3
 * This program and the accompanying materials are made available under the 
Lines 17-23 package org.eclipse.persistence.internal.jpa.metadata.accessors.objects; Link Here
17
 *           DatabaseSessionImpl.initializeDescriptors because @MapKey Annotation is not found.
15
 *           DatabaseSessionImpl.initializeDescriptors because @MapKey Annotation is not found.
18
 *     04/21/2011-2.3 dclarke: Upgraded to support ASM 3.3.1
16
 *     04/21/2011-2.3 dclarke: Upgraded to support ASM 3.3.1
19
 *     08/10/2011-2.3 Lloyd Fernandes : Bug 336133 - Validation error during processing on parameterized generic OneToMany Entity relationship from MappedSuperclass
17
 *     08/10/2011-2.3 Lloyd Fernandes : Bug 336133 - Validation error during processing on parameterized generic OneToMany Entity relationship from MappedSuperclass
18
 *     10/05/2012-2.4.1 Guy Pelletier 
19
 *       - 373092: Exceptions using generics, embedded key and entity inheritance
20
 ******************************************************************************/
20
 ******************************************************************************/
21
package org.eclipse.persistence.internal.jpa.metadata.accessors.objects;
22
21
import java.io.IOException;
23
import java.io.IOException;
22
import java.io.InputStream;
24
import java.io.InputStream;
23
import java.util.ArrayList;
25
import java.util.ArrayList;
Lines 516-531 public class MetadataAsmFactory extends MetadataFactory { Link Here
516
                    }
518
                    }
517
                } else {
519
                } else {
518
                    // Is a generic type variable.
520
                    // Is a generic type variable.
519
                    arguments.add(new String(new char[] { next }));
521
                    int start = index;
520
                    if((index+1) < length) {
522
                    int end = start;
521
                       if(desc.charAt(index+1)==':') {
523
                    
522
                           isGenericTyped=true;
524
                    char myNext = next;
523
                           index ++;
525
                    
524
                           arguments.add(":");
526
                    while (':' != myNext && end < length - 1 && '(' != myNext && ')' != myNext && '<' != myNext && '>' != myNext && ';' != myNext) {
525
                           if(desc.charAt(index+1)==':') {
527
                        end++;
526
                               index ++;
528
                        myNext = chars[end];
527
                           }
529
                    }
528
                       }
530
                    
531
                    if (myNext == ':') {
532
                        arguments.add(desc.substring(start, end));
533
                        isGenericTyped=true;
534
                        index = end;
535
                        arguments.add(":");
536
                        if(desc.charAt(index+1)==':') {
537
                            index ++;
538
                        }
539
                    } else if (myNext == ';' && next == 'T') {
540
                        arguments.add(new String(new char[] { next }));
541
                        arguments.add(desc.substring(start+1, end));
542
                        index = end - 1;
543
                    } else {
544
                        arguments.add(new String(new char[] { next }));
529
                    }
545
                    }
530
                }
546
                }
531
            }
547
            }
532
- 

Return to bug 372092