DO NOT REPLY [Bug 45433] New: Unstandard <size>-Tag doesn't accept arrays

[email protected]
Newsgroups gmane.comp.jakarta.taglibs.devel
Message-ID <[email protected]/bugzilla/>
https://issues.apache.org/bugzilla/show_bug.cgi?id=45433

           Summary: Unstandard <size>-Tag doesn't accept arrays
           Product: Taglibs
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Sandbox Taglibs
        AssignedTo: [email protected]
        ReportedBy: [email protected]


We are still using J2EE 1.3 and use "unstandard-taglibs".
The Tag <size> doesn't work with arrays - it returns -1.

Error is in the class "org.apache.taglibs.unstandard.SizeTag":

// Error
if(target instanceof Collection) { 
     result = ( (Object[])target ).length;
}

// Bugfix  
if(target.isArray) { 
     result = ( (Object[])target ).length;
}

And the casting (Object[]) doesn't works with primitive arrays (int[],
boolean[], etc).


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.