History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-22579
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Sergey Vasiliev
Reporter: Taras Tielkes
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

bad code green: type of <util:constant> not resolved or validated

Created: 09 Oct 07 00:30   Updated: 06 Dec 07 18:52
Component/s: J2EE.Spring
Fix Version/s: Selena 7.0.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. Text File util-constant-type-resolver-v3.patch (8 kb)


Build: 7,330
Fixed in build: 7,507


 Description  « Hide
public class NumberAndTimeUnitBean {
    public void setNumber(int number) {}
    public void setTimeUnit(TimeUnit timeUnit) {}
}
<bean class="foo.bar.NumberAndTimeUnitBean">                                       
  <property name="number">                                                    
    <util:constant static-field="java.util.concurrent.TimeUnit.MILLISECONDS"/>
  </property>                                                                 
  <property name="timeUnit">                                                  
    <util:constant static-field="javax.jms.Session.DUPS_OK_ACKNOWLEDGE"/>     
  </property>                                                                 
</bean>

Note that retrieved static fields are not compatible with used properties.

Attached patch adds a resolver for <util:constant>.
Since Spring is reflection-based, primitives are treated as wrapped values.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.