[jboss-svn-commits] JBL Code SVN: r14778 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/extractors.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Aug 31 09:07:48 EDT 2007
Author: tirelli
Date: 2007-08-31 09:07:48 -0400 (Fri, 31 Aug 2007)
New Revision: 14778
Modified:
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/extractors/ArrayExtractor.java
Log:
JBRULES-1154: Fixing CCE when retrieving query parameters
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/extractors/ArrayExtractor.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/extractors/ArrayExtractor.java 2007-08-31 12:40:04 UTC (rev 14777)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/extractors/ArrayExtractor.java 2007-08-31 13:07:48 UTC (rev 14778)
@@ -32,7 +32,7 @@
}
public byte getByteValue(InternalWorkingMemory workingMemory, Object object) {
Object[] array = ( Object[] ) this.arrayExtractor.getValue( workingMemory, object );
- return ( (Byte)array[ this.index ]).byteValue();
+ return ( (Number)array[ this.index ]).byteValue();
}
public char getCharValue(InternalWorkingMemory workingMemory, Object object) {
Object[] array = ( Object[] ) this.arrayExtractor.getValue( workingMemory, object );
@@ -40,28 +40,28 @@
}
public double getDoubleValue(InternalWorkingMemory workingMemory, Object object) {
Object[] array = ( Object[] ) this.arrayExtractor.getValue( workingMemory, object );
- return ( (Double)array[ this.index ]).doubleValue();
+ return ( (Number)array[ this.index ]).doubleValue();
}
public float getFloatValue(InternalWorkingMemory workingMemory, Object object) {
Object[] array = ( Object[] ) this.arrayExtractor.getValue( workingMemory, object );
- return ( (Float)array[ this.index ]).floatValue();
+ return ( (Number)array[ this.index ]).floatValue();
}
public int getIntValue(InternalWorkingMemory workingMemory, Object object) {
Object[] array = ( Object[] ) this.arrayExtractor.getValue( workingMemory, object );
- return ( (Integer)array[ this.index ]).intValue();
+ return ( (Number)array[ this.index ]).intValue();
}
public long getLongValue(InternalWorkingMemory workingMemory, Object object) {
Object[] array = ( Object[] ) this.arrayExtractor.getValue( workingMemory, object );
- return ( (Long) array[ this.index ]).longValue();
+ return ( (Number) array[ this.index ]).longValue();
}
public Method getNativeReadMethod() {
throw new UnsupportedOperationException("cannot call a method on an array extractor" );
}
public short getShortValue(InternalWorkingMemory workingMemory, Object object) {
Object[] array = ( Object[] ) this.arrayExtractor.getValue( workingMemory, object );
- return ( (Short)array[ this.index ]).shortValue();
+ return ( (Number)array[ this.index ]).shortValue();
}
public Object getValue(InternalWorkingMemory workingMemory, Object object) {
Object[] array = ( Object[] ) this.arrayExtractor.getValue( workingMemory, object );
More information about the jboss-svn-commits
mailing list