[hg] main-silver: #235117 - AssertionError: Token length=0 <= 0 ...

  • From: Miloslav Metelka < >
  • To:
  • Subject: [hg] main-silver: #235117 - AssertionError: Token length=0 <= 0 ...
  • Date: Mon, 02 Sep 2013 16:49:25 -0700

changeset 1355701a7cf0 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/1355701a7cf0
description:
        #235117 - AssertionError: Token length=0 <= 0 - not a fix; only 
better error message.

diffstat:

 lexer/src/org/netbeans/lib/lexer/LexerInputOperation.java |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff --git a/lexer/src/org/netbeans/lib/lexer/LexerInputOperation.java 
b/lexer/src/org/netbeans/lib/lexer/LexerInputOperation.java
--- a/lexer/src/org/netbeans/lib/lexer/LexerInputOperation.java
+++ b/lexer/src/org/netbeans/lib/lexer/LexerInputOperation.java
@@ -380,7 +380,11 @@
     public void assignTokenLength(int tokenLength) {
         if (tokenLength > readLength()) {
             throw new IndexOutOfBoundsException("tokenLength=" + tokenLength 
// NOI18N
-                    + " >" + readLength());
+                    + " > " + readLength() + ". Fix the lexer implementation 
to use proper token length value."); // NOI18N
+        }
+        if (tokenLength <= 0) {
+            throw new IndexOutOfBoundsException("tokenLength=" + tokenLength 
+
+                    " <= 0. Fix the lexer implementation to use proper token 
length value."); // NOI18N
         }
         this.tokenLength = tokenLength;
     }

[hg] main-silver: #235117 - AssertionError: Token length=0 <= 0 ...

Miloslav Metelka 09/02/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 148 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close