Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1058687

Summary: knowledge-api: StatefulKnowledgeSession.getSessionClock() compilation fails on JDK 6
Product: [Retired] JBoss BRMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BREAssignee: Mario Fusco <mfusco>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli
Target Milestone: ER1   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:57:46 UTC 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:
Attachments:
Description Flags
Maven project with reproducer none

Description Marek Winkler 2014-01-28 11:12:12 UTC
Created attachment 856514 [details]
Maven project with reproducer

Description of problem:

The compilation of the following code using Drools 5 legacy API fails on JDK 6:

StatefulKnowledgeSession ksession = ...
SessionPseudoClock clock = ksession.getSessionClock();

Compiler reports error:

[ERROR] /home/psiroky/tmp/knowledge-api-tests/src/test/java/org/drools/knowledgeapi/SessionClockTest.java:[24,59] type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds org.drools.core.time.SessionPseudoClock,org.drools.time.SessionClock

I found a discussion about this compiler issue here: http://stackoverflow.com/questions/2431334/java-generics-what-is-the-compilers-issue-here-no-unique-maximal-instance

Version-Release number of selected component (if applicable):

BRMS 6.0.0.CR2

java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

How reproducible:

Try to run mvn clean test-compile with the attached Maven project using Java 6.
The reproducer project compiles fine with Java 7.

Comment 1 Mario Fusco 2014-01-28 15:36:13 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/9a65e58e8

Comment 2 Marek Winkler 2014-02-25 18:20:05 UTC
Verified that the compilation issue is gone in BRMS 6.0.1 ER1.