Error when building DeltaSpike

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error when building DeltaSpike

Mehdi Heidarzadeh
Hi @All

when I want to build Apache DeltaSpike Core-API, I get this error

org/apache/deltaspike/core/util/Reflections.java:[710,35] type parameters
of <T>T cannot be determined; no unique maximal instance exists for type
variable T with upper bounds T,java.lang.Object

This is the source if error :
      return Reflections.cast(field.get(instance));

And when I change the above code to this :
      return Reflections.<T>cast(field.get(instance));

It builds successfully!

By the way, I use NetBeans 7.1 to build the project.

What's the problem?

--
Mehdi Heidarzadeh Ardalani
Independent JEE Counselor, Developer and Trainer.
http://www.TheBigJavaBlog.com
Reply | Threaded
Open this post in threaded view
|

Re: Error when building DeltaSpike

Gerhard Petracek
Administrator
hi mehdi,

yesterday we saw that also with our sonar build. jason said that they saw
it also at seam3 (it is a jdk bug and you just have to upgrade to a newer
jdk version).

imo we should also apply your fix.

thx & regards,
gerhard



2012/2/1 Mehdi Heidarzadeh <[hidden email]>

> Hi @All
>
> when I want to build Apache DeltaSpike Core-API, I get this error
>
> org/apache/deltaspike/core/util/Reflections.java:[710,35] type parameters
> of <T>T cannot be determined; no unique maximal instance exists for type
> variable T with upper bounds T,java.lang.Object
>
> This is the source if error :
>      return Reflections.cast(field.get(instance));
>
> And when I change the above code to this :
>      return Reflections.<T>cast(field.get(instance));
>
> It builds successfully!
>
> By the way, I use NetBeans 7.1 to build the project.
>
> What's the problem?
>
> --
> Mehdi Heidarzadeh Ardalani
> Independent JEE Counselor, Developer and Trainer.
> http://www.TheBigJavaBlog.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Error when building DeltaSpike

Mehdi Heidarzadeh
Thanks Gerhard, I will update it right now!

On Wed, Feb 1, 2012 at 5:32 PM, Gerhard Petracek <[hidden email]
> wrote:

> hi mehdi,
>
> yesterday we saw that also with our sonar build. jason said that they saw
> it also at seam3 (it is a jdk bug and you just have to upgrade to a newer
> jdk version).
>
> imo we should also apply your fix.
>
> thx & regards,
> gerhard
>
>
>
> 2012/2/1 Mehdi Heidarzadeh <[hidden email]>
>
> > Hi @All
> >
> > when I want to build Apache DeltaSpike Core-API, I get this error
> >
> > org/apache/deltaspike/core/util/Reflections.java:[710,35] type parameters
> > of <T>T cannot be determined; no unique maximal instance exists for type
> > variable T with upper bounds T,java.lang.Object
> >
> > This is the source if error :
> >      return Reflections.cast(field.get(instance));
> >
> > And when I change the above code to this :
> >      return Reflections.<T>cast(field.get(instance));
> >
> > It builds successfully!
> >
> > By the way, I use NetBeans 7.1 to build the project.
> >
> > What's the problem?
> >
> > --
> > Mehdi Heidarzadeh Ardalani
> > Independent JEE Counselor, Developer and Trainer.
> > http://www.TheBigJavaBlog.com
> >
>



--
Mehdi Heidarzadeh Ardalani
Independent JEE Counselor, Developer and Trainer.
http://www.TheBigJavaBlog.com