United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6462447 select/update query sharing parameter throws ArrayIndexOutOfBoundException
JDK-6462447 : select/update query sharing parameter throws ArrayIndexOutOfBoundException

Details
Type:
Bug
Submit Date:
2006-08-22
Status:
Resolved
Updated Date:
2011-02-16
Project Name:
JDK
Resolved Date:
2006-08-23
Component:
core-libs
OS:
generic
Sub-Component:
java.sql
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports

Sub Tasks

Description
Code :

interface I_Query005 extends BaseQuery {
    @Select(sql="SELECT * from query005 where firstName=?1 and lastName=?1")
    DataSet<Player> getPlayer(String fName);
}


This select statement will not work and throw ArrayIndexOutOfBoundException as both parameters need to be initialized by same argument.

This is applicable for update statement as well.

                                    

Comments
EVALUATION

The method field's type need to be properly assigned when setting parameter value
                                     
2006-08-22
SUGGESTED FIX

The parameter type was not being set properly when two parameters share same argument. This issue will be fixed in this check-in.

Check-in logs

Checking in QueryObject.java;
/m/jws/jdbc4.0/src/com/sun/sql/QueryObject.java,v  <--  QueryObject.java
new revision: 1.2; previous revision: 1.1
done
                                     
2006-08-23



Hardware and Software, Engineered to Work Together