Hi Michelle,
I just checked out your latest changes: update DN version and trim
property strings.
I would like to propose a few changes:
- Meanwhile Andy updated to a newer version of datanucleus.
- I ran into an NPE in RunTCK. It occurs when the code trims a property
that does not exist.
Attached you find a patch fixing the above issues. Using the patch I
could successfully run the companyListWithoutJoin and
companyMapWithoutJoin test cases.
I hope it helps.
Regards Michael
--
*Michael Bouschen*
*Prokurist*
akquinet t...@spree GmbH
Bülowstr. 66, D-10783 Berlin
Fon: +49 30 235 520-33
Fax: +49 30 217 520-12
Email: [email protected]
Url: www.akquinet.de <http://www.akquinet.de>
akquinet t...@spree GmbH, Berlin
Geschäftsführung: Martin Weber, Prof. Dr. Christian Roth
Amtsgericht Berlin-Charlottenburg HRB 86780 B
USt.-Id. Nr.: DE 225 964 680
Index: tck/pom.xml
===================================================================
--- tck/pom.xml (revision 1050723)
+++ tck/pom.xml (working copy)
@@ -160,12 +160,12 @@
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
- <version>2.2.0-m3</version>
+ <version>2.2.0-release</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
- <version>2.2.0-m3</version>
+ <version>2.2.0-release</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
@@ -175,7 +175,7 @@
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-jpa</artifactId>
- <version>2.1.3</version>
+ <version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
Index: exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java
===================================================================
--- exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java (revision
1050723)
+++ exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java (working copy)
@@ -199,6 +199,18 @@
*/
private String resultPrinterClass;
+ /**
+ * Helper method returning the trimmed value of the specified property.
+ * @param props the Properties object
+ * @param ke the key of the property to be returned
+ * @return the trimmed property value or the empty string if the property
is not defined.
+ */
+ private String getTrimmedPropertyValue (Properties props, String key) {
+ String value = props.getProperty(key);
+ return value == null ? "" : value.trim();
+ }
+
+
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
@@ -248,7 +260,7 @@
+ "classes" + File.separator + pmfProperties);
String excludeFile = confDirectory + File.separator + exclude;
propsString.add("-Djdo.tck.exclude="
- +
PropertyUtils.getProperties(excludeFile).getProperty("jdo.tck.exclude").trim());
+ +
getTrimmedPropertyValue(PropertyUtils.getProperties(excludeFile),
"jdo.tck.exclude"));
// Create configuration log directory
String timestamp = Utilities.now();
@@ -313,23 +325,23 @@
props = PropertyUtils.getProperties(confDirectory
+ File.separator + cfg);
propsString.add("-Djdo.tck.testdata="
- + props.getProperty("jdo.tck.testdata").trim());
+ + getTrimmedPropertyValue(props,
"jdo.tck.testdata"));
propsString.add("-Djdo.tck.standarddata="
- +
props.getProperty("jdo.tck.standarddata").trim());
+ + getTrimmedPropertyValue(props,
"jdo.tck.standarddata"));
propsString.add("-Djdo.tck.mapping.companyfactory="
- +
props.getProperty("jdo.tck.mapping.companyfactory").trim());
+ + getTrimmedPropertyValue(props,
"jdo.tck.mapping.companyfactory"));
// propsString.append("-Djdo.tck.description=\"" +
// props.getProperty("jdo.tck.description").trim()
+ "\"");
propsString.add("-Djdo.tck.requiredOptions="
- +
props.getProperty("jdo.tck.requiredOptions").trim());
+ + getTrimmedPropertyValue(props,
"jdo.tck.requiredOptions"));
propsString.add("-Djdo.tck.signaturefile="
+ signaturefile);
- String mapping =
props.getProperty("jdo.tck.mapping").trim();
+ String mapping = getTrimmedPropertyValue(props,
"jdo.tck.mapping");
if (mapping == null) {
throw new MojoExecutionException(
"Could not find mapping value in conf file: "
+ cfg);
}
- String classes =
props.getProperty("jdo.tck.classes").trim();
+ String classes = getTrimmedPropertyValue(props,
"jdo.tck.classes");
if (classes == null) {
throw new MojoExecutionException(
"Could not find classes value in conf file: "
+ cfg);
@@ -340,7 +352,7 @@
propsString.add("-Djdo.tck.schemaname=" + idtype +
mapping);
propsString.add("-Djdo.tck.cfg=" + cfg);
- runonce = props.getProperty("runonce").trim();
+ runonce = getTrimmedPropertyValue(props, "runonce");
runonce = (runonce == null) ? "false" : runonce;
// Add Mapping and schemaname to properties file
Index: exectck/pom.xml
===================================================================
--- exectck/pom.xml (revision 1050723)
+++ exectck/pom.xml (working copy)
@@ -54,22 +54,22 @@
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
- <version>2.2.0-m3e</version>
+ <version>2.2.0-release</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
- <version>2.2.0-m3</version>
+ <version>2.2.0-release</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-enhancer</artifactId>
- <version>2.1.2-release</version>
+ <version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-jpa</artifactId>
- <version>2.1.3-release</version>
+ <version>2.1.4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>