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 62bd6458f6720d9fd9baabea383cf0f72ed01c9e
Author: Marcin Mielzynski <[email protected]>
Date:   Sun Feb 19 03:00:29 2012 +0100

    Simplify.
---
 src/org/joni/Analyser.java | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/org/joni/Analyser.java b/src/org/joni/Analyser.java
index 29147ff..9086abf 100644
--- a/src/org/joni/Analyser.java
+++ b/src/org/joni/Analyser.java
@@ -1852,24 +1852,16 @@ final class Analyser extends Parser {
                 break;
 
             case AnchorType.LOOK_BEHIND:
-                boolean lbInvalid = checkTypeTree(an.target, 
NodeType.ALLOWED_IN_LB,
-                                                                               
                     EncloseType.ALLOWED_IN_LB,
-                                                                               
                     AnchorType.ALLOWED_IN_LB);
-
-                if (lbInvalid) 
newSyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
+                if (checkTypeTree(an.target, NodeType.ALLOWED_IN_LB, 
EncloseType.ALLOWED_IN_LB, AnchorType.ALLOWED_IN_LB)) 
newSyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
                 node = setupLookBehind(node);
-                if (!(node instanceof AnchorNode)) continue restart;
+                if (node.getType() != NodeType.ANCHOR) continue restart;
                 setupTree(((AnchorNode)node).target, state);
                 break;
 
             case AnchorType.LOOK_BEHIND_NOT:
-                boolean lbnInvalid = checkTypeTree(an.target, 
NodeType.ALLOWED_IN_LB,
-                                                              
EncloseType.ALLOWED_IN_LB,
-                                                              
AnchorType.ALLOWED_IN_LB);
-
-                if (lbnInvalid) 
newSyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
+                if (checkTypeTree(an.target, NodeType.ALLOWED_IN_LB, 
EncloseType.ALLOWED_IN_LB, AnchorType.ALLOWED_IN_LB)) 
newSyntaxException(ERR_INVALID_LOOK_BEHIND_PATTERN);
                 node = setupLookBehind(node);
-                if (!(node instanceof AnchorNode)) continue restart;
+                if (node.getType() != NodeType.ANCHOR) continue restart;
                 setupTree(((AnchorNode)node).target, (state | IN_NOT));
                 break;
 

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

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to