Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorbvosburgh2010-04-15 23:54:28 +0000
committerbvosburgh2010-04-15 23:54:28 +0000
commit4d9856c34e09f272a0621da4bf370703ea3c314a (patch)
tree3431b52bab9420578809e3e64f6dc214571e72b9 /jpa
parent24be019f907edc0a3c5c4b12a147df2d81da7122 (diff)
downloadwebtools.dali-4d9856c34e09f272a0621da4bf370703ea3c314a.tar.gz
webtools.dali-4d9856c34e09f272a0621da4bf370703ea3c314a.tar.xz
webtools.dali-4d9856c34e09f272a0621da4bf370703ea3c314a.zip
fix hack to work during tests
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java b/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java
index 6eab36d0ed..31dfd0cc2f 100644
--- a/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java
+++ b/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java
@@ -12,6 +12,7 @@ package org.eclipse.jpt.db.internal;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;
import org.eclipse.datatools.modelbase.sql.tables.SQLTablesPackage;
import org.eclipse.jpt.db.DatabaseObject;
@@ -110,7 +111,9 @@ final class DTPSchemaWrapper
}
private boolean hack() {
- String hack = Platform.getProduct().getProperty(PERSISTENT_AND_VIEW_TABLES_ONLY);
+ // the product is null during junit testing
+ IProduct product = Platform.getProduct();
+ String hack = (product == null) ? null : product.getProperty(PERSISTENT_AND_VIEW_TABLES_ONLY);
return (hack != null) && hack.equals("true"); //$NON-NLS-1$
}

Back to the top