Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Leacu2017-11-08 13:06:35 -0500
committerPaul Leacu2017-11-08 13:06:35 -0500
commitd18eebdc5a34817e3bc0da6376d96a641585fa80 (patch)
tree2320ac5fae99dda6717d2838ecf6edeb2c23d9a0
parentb396c38f78b6ee15afa80f77cc1aee03343f5e13 (diff)
downloadorg.eclipse.bpmn2-modeler-oxygen.tar.gz
org.eclipse.bpmn2-modeler-oxygen.tar.xz
org.eclipse.bpmn2-modeler-oxygen.zip
[497744] Catch a space character appearing illegally in a custom type definition.1.4.2.Finaloxygen
Change-Id: Ibca4e6c202a9b030e5defdc5362626b07593a7d0 Signed-off-by: Paul Leacu <pleacu@redhat.com>
-rw-r--r--plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java
index e837c660..4cbd64cd 100644
--- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java
+++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/validation/SyntaxCheckerUtils.java
@@ -220,11 +220,14 @@ public class SyntaxCheckerUtils {
int brackets = 0;
int parts = 0;
char last = 0;
+ Boolean bracketSeen = false;
for (char c : name.toCharArray()) {
if (c==' ') {
if (!part.isEmpty()) {
- if (!isJavaPackageName(part))
+ if ((!isJavaPackageName(part)) || !(bracketSeen)) {
+ invalidChar = c;
return false;
+ }
++parts;
part = ""; //$NON-NLS-1$
}
@@ -232,7 +235,9 @@ public class SyntaxCheckerUtils {
}
if (c=='<') {
++brackets;
+ bracketSeen = true;
if (last!='<' && last!=',' && !isJavaPackageName(part)) {
+ invalidChar = c;
return false;
}
part = ""; //$NON-NLS-1$
@@ -245,6 +250,7 @@ public class SyntaxCheckerUtils {
return false;
}
if (last!='>' && !isJavaPackageName(part)) {
+ invalidChar = c;
return false;
}
part = ""; //$NON-NLS-1$

Back to the top