Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2010-09-28 16:24:05 -0400
committerpfullbright2010-09-28 16:24:05 -0400
commitbcf2a8d1db1b9c3600406c411d3192ee6ea70de5 (patch)
tree448050a22412886049a4f1ec3d9d30f0df9c9718
parentf465f92ddd656e2fc9964881ddbca354b1d38c97 (diff)
downloadwebtools.dali-bcf2a8d1db1b9c3600406c411d3192ee6ea70de5.tar.gz
webtools.dali-bcf2a8d1db1b9c3600406c411d3192ee6ea70de5.tar.xz
webtools.dali-bcf2a8d1db1b9c3600406c411d3192ee6ea70de5.zip
added some input validation
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java
index 2984b24577..ea927610de 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/platform/JpaPlatformDescriptionImpl.java
@@ -9,6 +9,7 @@
*******************************************************************************/
package org.eclipse.jpt.core.internal.platform;
+import org.eclipse.jpt.core.JpaFacet;
import org.eclipse.jpt.core.JpaPlatform;
import org.eclipse.jpt.core.JpaPlatformFactory;
import org.eclipse.jpt.core.internal.XPointUtil;
@@ -65,10 +66,16 @@ public class JpaPlatformDescriptionImpl
}
void setJpaFacetVersion(IProjectFacetVersion jpaFacetVersion) {
+ if (! jpaFacetVersion.getProjectFacet().equals(JpaFacet.FACET)) {
+ throw new IllegalArgumentException(jpaFacetVersion.toString());
+ }
this.jpaFacetVersion = jpaFacetVersion;
}
public boolean supportsJpaFacetVersion(IProjectFacetVersion jpaFacetVersion) {
+ if (! jpaFacetVersion.getProjectFacet().equals(JpaFacet.FACET)) {
+ throw new IllegalArgumentException(jpaFacetVersion.toString());
+ }
return (this.jpaFacetVersion != null) ? this.jpaFacetVersion.equals(jpaFacetVersion) : true;
}

Back to the top