On 2018/05/24 06:42:48, Yasser Zamani <yasserzam...@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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to