From user-return-219035-apmail-struts-user-archive=struts.apache.org@struts.apache.org Thu May 24 14:14:02 2018 Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C2665180FA for ; Thu, 24 May 2018 14:14:02 +0000 (UTC) Received: (qmail 91932 invoked by uid 500); 24 May 2018 14:14:01 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 91888 invoked by uid 500); 24 May 2018 14:14:01 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 91876 invoked by uid 99); 24 May 2018 14:14:01 -0000 Received: from ui-eu-01.ponee.io (HELO localhost) (176.9.59.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2018 14:14:01 +0000 Subject: Re: s:fielderror not working in Java 8, WebSphere x-ponymail-agent: PonyMail Composer/0.3 X-Mailer: LuaSocket 3.0-rc1 MIME-Version: 1.0 References: In-Reply-To: From: Doug Breaux To: x-ponymail-sender: 432aabf26b0c5064fa094ed1da812fb26e30ad44 Message-ID: Date: Thu, 24 May 2018 14:13:59 -0000 Content-Type: text/plain; charset=utf-8 On 2018/05/24 06:42:48, Yasser Zamani 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