[
https://issues.apache.org/jira/browse/DERBY-5496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rick Hillegas updated DERBY-5496:
---------------------------------
Attachment: derby-5496-01-ab-identify14classes.diff
Attaching derby-5496-01-ab-identify14classes.diff. This patch attempts to
reduce the uncertainty about which test classes really will run on small
devices.
The following classes still need to be built using the JDK 1.4 libraries. These
classes may raise method invocation errors at run time if they are used on
small devices:
JAXPFinder.java
ConnectionPoolDataSourceConnector.java
J2EEDataSource.java
DriverManagerConnector.java
XADataSourceConnector.java
XATestUtil.java
BigDecimalHandler.java
It may make sense to move these classes into a separate package so that it is
clear that they require JDK 1.4.
I am not sure what to do with BigDecimalHandler. From header comments in that
class, it seems that people expect to use that class on small devices. But it
calls ResultSet.getBigDecimal(), which is not a JSR 169 method. Maybe
BigDecimalHandler should be re-coded to use reflection.
The org.apache.derbyTesting.junit package is built in two phases now:
1) First we build all of the classes which WILL compile against JSR 169 and
CDC/FP 1.1.
2) Then we build the classes listed above, which require JDK 1.4 or later.
Touches the following files:
----------------
M build.xml
Added a diagnostic message to describe the setting of compile.classpath.
----------------
M java/testing/org/apache/derbyTesting/junit/build.xml
Re-arranged the build of org.apache.derbyTesting.junit as described above.
----------------
M java/testing/org/apache/derbyTesting/junit/JDBC.java
Removed call to String.matches() which is not in CDC/FP 1.1. Recoded
assertParameterTypes() to use reflection and to raise an error if you invoke it
on a small device.
----------------
M java/testing/org/apache/derbyTesting/junit/XML.java
Used reflection to access JAXPFinder.
----------------
M java/testing/org/apache/derbyTesting/junit/JAXPFinder.java
M java/testing/org/apache/derbyTesting/junit/J2EEDataSource.java
M java/testing/org/apache/derbyTesting/junit/XATestUtil.java
Corrected the names of these classes in their Apache license headers.
----------------
M java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java
Removed the calls to String.split(), which doesn't appear in CDC/FP 1.1.
----------------
M
java/testing/org/apache/derbyTesting/functionTests/tests/lang/UnaryArithmeticParameterTest.java
Accounted for the additional Exceptions which JDBC.assertParameterTypes() can
raise now.
> The JUnit infrastructure package should be compiled against the small device
> classpath, not the JDK 1.4 classpath
> -----------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-5496
> URL: https://issues.apache.org/jira/browse/DERBY-5496
> Project: Derby
> Issue Type: Bug
> Components: Build tools
> Affects Versions: 10.9.0.0
> Reporter: Rick Hillegas
> Attachments: derby-5496-01-ab-identify14classes.diff
>
>
> The org.apache.derbyTesting.junit package currently compiles against the JDK
> 1.4 classpath. Since these classes need to run on CDC/FP 1.1 platforms, they
> should be compiled against the small device classpath. That will make the
> compiler raise an error when the JUnit infrastructure references methods
> which are not present on small devices.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira