From user-return-219032-archive-asf-public=cust-asf.ponee.io@struts.apache.org Wed May 23 21:49:00 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 15302180645 for ; Wed, 23 May 2018 21:48:59 +0200 (CEST) Received: (qmail 12584 invoked by uid 500); 23 May 2018 19:48:58 -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 12573 invoked by uid 99); 23 May 2018 19:48:58 -0000 Received: from ui-eu-01.ponee.io (HELO localhost) (176.9.59.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2018 19:48:58 +0000 In-Reply-To: MIME-Version: 1.0 Date: Wed, 23 May 2018 19:48:56 -0000 x-ponymail-agent: PonyMail Composer/0.3 X-Mailer: LuaSocket 3.0-rc1 Subject: Re: s:fielderror not working in Java 8, WebSphere To: Message-ID: From: Doug Breaux Content-Type: text/plain; charset=utf-8 x-ponymail-sender: 432aabf26b0c5064fa094ed1da812fb26e30ad44 References: On 2018/05/23 19:30:40, Yasser Zamani wrote: > > Thanks. Sorry, for last one, could you check: > > java.util.Map lhm = new java.util.LinkedHashMap<>(); > Class c = lhm.getClass(); > java.lang.reflect.Method m = c.getMethod("keySet"); > Object ks = m.invoke(lhm); > Class c2 = ks.getClass(); > java.lang.reflect.Method m2 = c2.getMethod("size"); > System.out.println("COPY ME 1: " + m2); > Object s = m2.invoke(ks); > System.out.println("COPY ME 2: " + s); java TestForStruts COPY ME 1: public final int java.util.LinkedHashMap$LinkedKeySet.size() Exception in thread "main" java.lang.IllegalAccessException: Class TestForStruts can not access a member of class java.util.LinkedHashMap$LinkedKeySet with modifiers "public final" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:114) at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:399) at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:391) at java.lang.reflect.Method.invoke(Method.java:501) at TestForStruts.main(TestForStruts.java:15) Where line 15 is: Object s = m2.invoke(ks); --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org