struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Breaux <bre...@us.ibm.com>
Subject Re: s:fielderror not working in Java 8, WebSphere
Date Thu, 24 May 2018 14:13:59 GMT
On 2018/05/24 06:42:48, Yasser Zamani <yasserzamani@apache.org> wrote: 
> 
> It seems IBM JDK 8 has different behavior than Oracle or OpenJDK 8. Your
> exception claims that JDK is not able to call abstract method size on
> LinkedKeySet but here, Oracle and OpenJDK 8 are able to run:
> 
>         LinkedHashMap lhm = new LinkedHashMap();
>         Object ks = LinkedHashMap.class.getMethod("keySet").invoke(lhm);
>         System.out.println("COPY ME 1: " + ks.getClass());
>         Method m = AbstractCollection.class.getMethod("size");
>         System.out.println("COPY ME 2: " + m);
>         Object s = m.invoke(ks);
>         System.out.println("COPY ME 3: " + s);
> 
> They prints:
> 
> COPY ME 1: class java.util.LinkedHashMap$LinkedKeySet
> COPY ME 2: public abstract int java.util.AbstractCollection.size()
> COPY ME 3: 0
> 
> which means they're able! I don't know if IBM violates Java
> Specification here or Oracle and OpenJDK do. Are you able to ask IBM why
> above piece of code fails on their JDK 8 and pass on 7?

I'm not sure if I misunderstood the threading here, or just missed this test case, but this
one does seem to run the same on IBM Java 8:

java TestForStruts2
COPY ME 1: class java.util.LinkedHashMap$LinkedKeySet
COPY ME 2: public abstract int java.util.AbstractCollection.size()
COPY ME 3: 0

I do have some IBM Java folks able to look at the issue, BTW. At least one of them pointed
at this a potentially related, but beyond me to know if it could be:

https://github.com/eclipse/openj9/pull/1892

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message