tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BugRat Mail System <>
Subject BugRat Report #162 has been filed.
Date Mon, 25 Sep 2000 17:32:04 GMT
Bug report #162 has just been filed.

You can view the report at the following URL:


REPORT #162 Details.

Project: Jasper
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: high
Severity: critical
Confidence: public
   Release: 3.2b5
   JVM Release: 1.3.0
   Operating System: Linux/NT/any
   OS Release: any
   Platform: any

Tag handlers with properties of type "Object"

agBeginGenerator does compile time conversion from String to the type of
the property as specified in the spec. table 2-4 (section 2.13.2) and more
(looking at the code). But, it doesn't work for property of type
java.lang.Object. So, if I have a tag (say foo) with a property of type
object (say attr1), the following doesn't work:

<a:foo attr1="bar"/>

(fails compilation with "Unable to convert a String to java.lang.Object for
attribute attr1").

If we change it to the following uglyness, it works:

<% String bar = "bar"; %>
<a:foo attr1="<%=bar%>"/>


1. Is String to java.lang.Object implicit conversion a spec. oversight or is
there a good reason for not supporting it. Since java.lang.String is
java.lang.Object, it seems strange to say, "Unable to convert String to
java.lang.Object" when String *is* an Object.

2. Regardless of how the spec. feels about it, can Jasper support this as a
non-normative feature? As far as I can see, it is just one (half) a line in
TagBeginGenerator, change "if (c == String.class)" to "if (c == String.class
|| c == Object.class)" in convertString method.

View raw message