Author: funkman Date: Sun Sep 23 16:33:56 2007 New Revision: 578610 URL: http://svn.apache.org/viewvc?rev=578610&view=rev Log: 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) Modified: tomcat/tc6.0.x/trunk/java/org/apache/el/lang/FunctionMapperImpl.java Modified: tomcat/tc6.0.x/trunk/java/org/apache/el/lang/FunctionMapperImpl.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/el/lang/FunctionMapperImpl.java?rev=578610&r1=578609&r2=578610&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/el/lang/FunctionMapperImpl.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/el/lang/FunctionMapperImpl.java Sun Sep 23 16:33:56 2007 @@ -120,9 +120,16 @@ 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())); + } /* --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]