Author: lfryc(a)redhat.com
Date: 2010-11-17 05:20:27 -0500 (Wed, 17 Nov 2010)
New Revision: 20069
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java
Log:
patch for using decimal numbers in MatrixConfiguration and @Use
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-11-17
10:18:14 UTC (rev 20068)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-11-17
10:20:27 UTC (rev 20069)
@@ -310,6 +310,12 @@
return Arrays.asList(ArrayUtils.toObject(useAnnotation.ints()));
}
}
+
+ if (useAnnotation.decimals().length > 0) {
+ if (parameterType == double.class || parameterType == Double.class) {
+ return Arrays.asList(ArrayUtils.toObject(useAnnotation.decimals()));
+ }
+ }
// tries satisfy parameter from fields
List<Object> result = new LinkedList<Object>();
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java 2010-11-17
10:18:14 UTC (rev 20068)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/annotations/Use.java 2010-11-17
10:20:27 UTC (rev 20069)
@@ -39,5 +39,7 @@
int[] ints() default {};
+ double[] decimals() default {};
+
boolean empty() default false;
}
Show replies by date