Author: bbrodt
Date: 2011-02-25 12:06:58 -0500 (Fri, 25 Feb 2011)
New Revision: 29342
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ElementPlacer.java
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/XSDComparer.java
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariableInitializationSection.java
Log:
https://issues.jboss.org/browse/JBIDE-8345
remove dependency on Java 1.6 for now
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ElementPlacer.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ElementPlacer.java 2011-02-25
17:05:46 UTC (rev 29341)
+++
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ElementPlacer.java 2011-02-25
17:06:58 UTC (rev 29342)
@@ -227,7 +227,9 @@
boolean textNodeIsWhitespaceOnly = false;
if (nextInnerChild instanceof Text) {
String content = ((Text)nextInnerChild).getData();
- textNodeIsWhitespaceOnly = (content==null || content.trim().isEmpty());
+ //
https://issues.jboss.org/browse/JBIDE-8345
+ // remove dependency on Java 1.6
+ textNodeIsWhitespaceOnly = (content==null || "".equals(content.trim()));
}
if (textNodeIsWhitespaceOnly) {
// remove an old indentation
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/XSDComparer.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/XSDComparer.java 2011-02-25
17:05:46 UTC (rev 29341)
+++
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/XSDComparer.java 2011-02-25
17:06:58 UTC (rev 29342)
@@ -351,7 +351,9 @@
type = type.getBaseType();
}
while (!names.isEmpty()) {
- if (s.isEmpty())
+ //
https://issues.jboss.org/browse/JBIDE-8345
+ // remove dependency on Java 1.6
+ if ("".equals(s))
s = names.pop();
else
s = s + ":" + names.pop();
@@ -369,8 +371,10 @@
return false;
}
if (name1.equals(name2)) {
- if (elem1.getTargetNamespace() == null || elem1.getTargetNamespace().isEmpty()
- && elem2.getTargetNamespace() == null ||
elem2.getTargetNamespace().isEmpty())
+ //
https://issues.jboss.org/browse/JBIDE-8345
+ // remove dependency on Java 1.6
+ if (elem1.getTargetNamespace() == null ||
"".equals(elem1.getTargetNamespace())
+ && elem2.getTargetNamespace() == null ||
"".equals(elem2.getTargetNamespace()))
return true;
if (elem1.getTargetNamespace().equals(elem2.getTargetNamespace()))
@@ -447,7 +451,9 @@
public int getMinOccurs(XSDTerm term) {
String smin = term.getElement().getAttribute("minOccurs");
int min = 1;
- if (smin!=null && !smin.isEmpty()) {
+ //
https://issues.jboss.org/browse/JBIDE-8345
+ // remove dependency on Java 1.6
+ if (smin!=null && !"".equals(smin)) {
try {
min = Integer.parseInt(smin);
} catch (NumberFormatException e) {
@@ -465,7 +471,9 @@
public int getMaxOccurs(XSDTerm term) {
String smax = term.getElement().getAttribute("maxOccurs");
int max = 1;
- if (smax!=null && !smax.isEmpty()) {
+ //
https://issues.jboss.org/browse/JBIDE-8345
+ // remove dependency on Java 1.6
+ if (smax!=null && !"".equals(smax)) {
try {
max = Integer.parseInt(smax);
} catch (NumberFormatException e) {
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariableInitializationSection.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariableInitializationSection.java 2011-02-25
17:05:46 UTC (rev 29341)
+++
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/properties/VariableInitializationSection.java 2011-02-25
17:06:58 UTC (rev 29342)
@@ -293,7 +293,9 @@
From from = fVariable.getFrom();
if (from!=null) {
String literal = from.getLiteral();
- if (literal==null || literal.isEmpty()) {
+ //
https://issues.jboss.org/browse/JBIDE-8345
+ // remove dependency on Java 1.6
+ if (literal==null || "".equals(literal.trim())) {
literal = createDefaultInitializer(getBPELEditor(), fVariable, null);
from.setLiteral(literal);
}
@@ -350,7 +352,9 @@
String literal = EMPTY_STRING;
if ( from!=null && to!=null) {
literal = from.getLiteral();
- if (literal==null || literal.isEmpty()) {
+ //
https://issues.jboss.org/browse/JBIDE-8345
+ // remove dependency on Java 1.6
+ if (literal==null || "".equals(literal.trim())) {
literal = createDefaultInitializer(bpelEditor, to.getVariable(), to.getPart());
from.setLiteral(literal);
}