[ 
https://issues.apache.org/jira/browse/WICKET-5647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Ertl updated WICKET-5647:
-------------------------------

    Description: 
when trying to compile wicket-7 from HEAD it fails under OS X / JDK 1.8.0_11. 
Casting a NULL to generic type (T) solves the issues. This seems like some odd 
case of failing type inference.

The problematic source line is:

    {code}return getEnumImpl(key, eClass, null);{code}

The compiler error is:

  {code}Error:(792, 35) java: incompatible types: inference variable T has 
incompatible upper bounds java.lang.Enum<T>,T{code}

This will fix the issue:

    {code}return getEnumImpl(key, eClass, (T)null);{code}

I found that there is a fix WICKET-5427 which does not work in most current JDK 
1.8.0_11 anymore. --Could not change the wicket-6 branch since the change will 
break the clirr plugin (see WICKET-5427).--

  was:
when trying to compile wicket-7 from HEAD it fails under OS X / JDK 1.8.0_11. 
Casting a NULL to generic type (T) solves the issues. This seems like some odd 
case of failing type inference.

The problematic source line is:

    {{return getEnumImpl(key, eClass, null);}}

The compiler error is:

  {{Error:(792, 35) java: incompatible types: inference variable T has 
incompatible upper bounds java.lang.Enum<T>,T}}

This will fix the issue:

    {{return getEnumImpl(key, eClass, (T)null);}}

I found that there is a fix WICKET-5427 which does not work in most current JDK 
1.8.0_11 anymore. --Could not change the wicket-6 branch since the change will 
break the clirr plugin (see WICKET-5427).--


> missing generic cast causes compile error on OS X / jdk 8
> ---------------------------------------------------------
>
>                 Key: WICKET-5647
>                 URL: https://issues.apache.org/jira/browse/WICKET-5647
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.16.0, 7.0.0-M2
>         Environment: OS X 10.9.4
> JDK 1.8.0_11
>            Reporter: Peter Ertl
>            Assignee: Peter Ertl
>             Fix For: 7.0.0-M3, 6.17.0
>
>
> when trying to compile wicket-7 from HEAD it fails under OS X / JDK 1.8.0_11. 
> Casting a NULL to generic type (T) solves the issues. This seems like some 
> odd case of failing type inference.
> The problematic source line is:
>     {code}return getEnumImpl(key, eClass, null);{code}
> The compiler error is:
>   {code}Error:(792, 35) java: incompatible types: inference variable T has 
> incompatible upper bounds java.lang.Enum<T>,T{code}
> This will fix the issue:
>     {code}return getEnumImpl(key, eClass, (T)null);{code}
> I found that there is a fix WICKET-5427 which does not work in most current 
> JDK 1.8.0_11 anymore. --Could not change the wicket-6 branch since the change 
> will break the clirr plugin (see WICKET-5427).--



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to