[jruby-joni] 131/194: get rid of QuantifierNode.convertToString

Hideki Yamane henrich at moszumanska.debian.org
Thu Feb 1 12:04:34 UTC 2018


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit 9799cf33979f05b80a65d8b927a5cb5717749535
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Tue Jan 9 22:16:20 2018 +0100

    get rid of QuantifierNode.convertToString
---
 src/org/joni/Analyser.java           | 4 +++-
 src/org/joni/ast/QuantifierNode.java | 7 -------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/org/joni/Analyser.java b/src/org/joni/Analyser.java
index 0529dec..6b18e61 100644
--- a/src/org/joni/Analyser.java
+++ b/src/org/joni/Analyser.java
@@ -1895,7 +1895,9 @@ final class Analyser extends Parser {
                     int len = sn.length();
 
                     if (len * qn.lower <= EXPAND_STRING_MAX_LENGTH) {
-                        StringNode str = qn.convertToString(sn.flag);
+                        StringNode str = new StringNode();
+                        str.flag = sn.flag;
+                        str.swap(qn);
                         int n = qn.lower;
                         for (int i = 0; i < n; i++) {
                             str.cat(sn.bytes, sn.p, sn.end);
diff --git a/src/org/joni/ast/QuantifierNode.java b/src/org/joni/ast/QuantifierNode.java
index dcc94cd..d623a30 100644
--- a/src/org/joni/ast/QuantifierNode.java
+++ b/src/org/joni/ast/QuantifierNode.java
@@ -65,13 +65,6 @@ public final class QuantifierNode extends StateNode {
         tgt.parent = this;
     }
 
-    public StringNode convertToString(int flag) {
-        StringNode sn = new StringNode();
-        sn.flag = flag;
-        sn.swap(this);
-        return sn;
-    }
-
     @Override
     public String getName() {
         return "Quantifier";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list