From c4bb803965991578ba94efb4aeb38a9a552968cd Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Mon, 6 Jul 2015 22:07:18 +0300 Subject: [PATCH] Remove unnecessary serialization code from java.util.regex.Pattern --- .../classlib/java/util/regex/TPattern.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/util/regex/TPattern.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/util/regex/TPattern.java index 0c534a71e..9de311030 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/util/regex/TPattern.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/util/regex/TPattern.java @@ -131,8 +131,6 @@ public final class TPattern implements Serializable { */ private int flags = 0; - private String pattern = null; - /* * All backreferences that may be used in pattern. */ @@ -320,7 +318,6 @@ public final class TPattern implements Serializable { private TPattern compileImpl(String pattern, int flags) throws TPatternSyntaxException { this.lexemes = new TLexer(pattern, flags); this.flags = flags; - this.pattern = pattern; start = processExpression(-1, this.flags, null); if (!lexemes.isEmpty()) { @@ -1342,19 +1339,4 @@ public final class TPattern implements Serializable { */ private TPattern() { } - - /** - * Serialization support - */ - private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { - s.defaultReadObject(); - TAbstractSet.counter = 1; - globalGroupIndex = -1; - compCount = -1; - consCount = -1; - backRefs = new TFSet[BACK_REF_NUMBER]; - - compileImpl(pattern, flags); - - } }