OPENJPA-1424: Fix. Do not lookup extraFieldData with another mapping's field

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@889799 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Pinaki Poddar 2009-12-11 20:28:57 +00:00
parent e5ba74a9fc
commit 43c55d0539
1 changed files with 4 additions and 1 deletions

View File

@ -923,7 +923,10 @@ public class ClassMetaData
* @see #getExtraFieldDataLength
*/
public int getExtraFieldDataIndex(int field) {
return getExtraFieldDataTable()[field];
int[] array = getExtraFieldDataTable();
if (field < 0 || field >= array.length)
return -1;
return array[field];
}
/**