Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Taal2013-11-29 11:45:06 -0500
committerMartin Taal2013-11-29 11:45:06 -0500
commitf64c809ba5969bc97323ec882882ac38f52b3e8c (patch)
treeec26cc891b561d28e2b715c61ba708cc436274ea /generator/org.eclipse.emf.texo.orm
parentacbe29cde264c369dec8f427e38d889482dc8613 (diff)
downloadorg.eclipse.emf.texo-f64c809ba5969bc97323ec882882ac38f52b3e8c.tar.gz
org.eclipse.emf.texo-f64c809ba5969bc97323ec882882ac38f52b3e8c.tar.xz
org.eclipse.emf.texo-f64c809ba5969bc97323ec882882ac38f52b3e8c.zip
Prevent java annotation with empty string
Diffstat (limited to 'generator/org.eclipse.emf.texo.orm')
-rw-r--r--generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java b/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java
index 9852f1e5..60ae121e 100644
--- a/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java
+++ b/generator/org.eclipse.emf.texo.orm/src/org/eclipse/emf/texo/orm/annotator/ORMJavaAnnotationGenerator.java
@@ -169,6 +169,10 @@ public class ORMJavaAnnotationGenerator {
if (value == null || value instanceof Collection<?> && ((Collection<?>) value).isEmpty()) {
continue;
}
+ // ignore empty strings
+ if (value instanceof String && ((String) value).trim().length() == 0) {
+ continue;
+ }
// always ignore this one, except for the converter
if (eFeature.getEContainingClass() != OrmPackage.eINSTANCE.getConverter() && eFeature.getName().equals("class")) { //$NON-NLS-1$

Back to the top