Bug 1326333

Summary: [GSS](6.4.z) Default group sequence does not honour group hierarchy
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Tom Ross <tom.ross>
Component: HibernateAssignee: Gail Badner <gbadner>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Simka <msimka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.5CC: bmaxwell, gbadner, jbilek, jtruhlar, msimka, rnetuka, smarlow
Target Milestone: CR1   
Target Release: EAP 6.4.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1326334 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1307264, 1324262, 1326334    

Description Tom Ross 2016-04-12 12:56:40 UTC
Backport of HV-1055 (https://hibernate.atlassian.net/browse/HV-1055)

Assuming the following
public interface Min {}

public interface Max extends Min {}

@GroupSequence({Max.class, A.class})
public class A {
    @NotNull(groups=Max.class)
    public String foo;

    @NotNull(groups=Min.class)
    public String bar;
}

public class B {
    @NotNull(groups=Max.class)
    public String foo;

    @NotNull(groups=Min.class)
    public String bar;
}
The following code returns as expected
assert validator.validate(new B(), Max.class, B.class).size() == 2
But the following fails
// bar is ignored as Min is not considered when Max is evaluated for default sequence
// so size == 1
assert validator.validate(new A(), Max.class, A.class).size() == 2
Note that the actual test used group sequence provider but that's not relevant I think.

Comment 4 Jiří Bílek 2016-06-27 14:08:27 UTC
Verified with EAP 6.4.9.CP.CR2

Comment 5 Petr Penicka 2017-01-17 12:59:35 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.

Comment 6 Petr Penicka 2017-01-17 12:59:37 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.