Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenn Hussey2012-08-29 15:18:21 +0000
committerKenn Hussey2012-08-29 15:18:21 +0000
commit7b14260a96b4e6e15762dd72eb1bb9dbb4ae06fb (patch)
tree98e022818c1cd7f348f8faad14551cfd84bc5419
parent199f75bc0f270d22fcd2bbe4bcb238e5e4a17500 (diff)
downloadorg.eclipse.emf-7b14260a96b4e6e15762dd72eb1bb9dbb4ae06fb.tar.gz
org.eclipse.emf-7b14260a96b4e6e15762dd72eb1bb9dbb4ae06fb.tar.xz
org.eclipse.emf-7b14260a96b4e6e15762dd72eb1bb9dbb4ae06fb.zip
[387280] Using RegExp instead of Pattern for splitting whitespace.
-rw-r--r--plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java b/plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java
index 6cf098022..e25d539e2 100644
--- a/plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java
+++ b/plugins/org.eclipse.emf.gwt.ecore/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java
@@ -11,13 +11,14 @@
package org.eclipse.emf.ecore.impl;
+import com.google.gwt.regexp.shared.RegExp;
+import com.google.gwt.regexp.shared.SplitResult;
import com.google.gwt.user.client.rpc.GwtTransient;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
-import java.util.regex.Pattern;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
@@ -738,11 +739,18 @@ public class EFactoryImpl extends EModelElementImpl implements EFactory
return XMLTypeUtil.normalize(value, true);
}
- private static final Pattern WHITE_SPACE = Pattern.compile("[ \t\n\r\f]+");
+ private static final RegExp WHITE_SPACE = RegExp.compile("[ \t\n\r\f]+");
protected String [] split(String value)
{
- return WHITE_SPACE.split(value);
+ SplitResult split = WHITE_SPACE.split(value);
+ int length = split.length();
+ String [] result = new String [length];
+ for (int i = 0; i < length; ++i)
+ {
+ result[i] = split.get(i);
+ }
+ return result;
}
public interface InternalEDateTimeFormat

Back to the top