From 95248b1af3f84834cf79874957eeba94e1e8b71e Mon Sep 17 00:00:00 2001 From: funkman Date: Sun, 23 Sep 2007 23:33:56 +0000 Subject: [PATCH] bug 41797: CNFE/NPE thrown from function mapper when externalizing Patch by Tuomas Kiviaho- tuomas.kiviahos at ikis fi (submit part2 of the patch as seem in comment #3) (Format police - help!!! I did my best) git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@578610 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/el/lang/FunctionMapperImpl.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/java/org/apache/el/lang/FunctionMapperImpl.java b/java/org/apache/el/lang/FunctionMapperImpl.java index a101994f9..a225e3b73 100644 --- a/java/org/apache/el/lang/FunctionMapperImpl.java +++ b/java/org/apache/el/lang/FunctionMapperImpl.java @@ -120,9 +120,16 @@ public class FunctionMapperImpl extends FunctionMapper implements public void writeExternal(ObjectOutput out) throws IOException { out.writeUTF((this.prefix != null) ? this.prefix : ""); out.writeUTF(this.localName); - out.writeUTF(this.m.getDeclaringClass().getName()); - out.writeUTF(this.m.getName()); - out.writeObject(ReflectionUtil.toTypeNameArray(this.m.getParameterTypes())); + out.writeUTF((this.owner != null) ? + this.owner : + this.m.getDeclaringClass().getName()); + out.writeUTF((this.name != null) ? + this.name : + this.m.getName()); + out.writeObject((this.types != null) ? + this.types : + ReflectionUtil.toTypeNameArray(this.m.getParameterTypes())); + } /* -- 2.11.0