jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kronenberg <pkronenb...@predictivetechnologies.com>
Subject Re: how to submit fixes?
Date Wed, 13 Sep 2000 11:37:17 GMT
Jeff,
   Thanks so much for finding and fixing this.  This is the exact thing I 
was trying to do.  I hadn't tried Daniel's suggestion yet, so I'm glad you 
saved me the frustration.

How exactly does one go about applying your fix?  Do you know how long it 
takes for the fixed code to be available for downloading?

At 9/12/2000  Tuesday  07:24 PM, you wrote:
>I got the latest ORO out of anon CVS and fixed a bug in Perl5Matcher.java.
>How do I submit this for testing and/or incorporation?
>
>The bug was that Perl5Matcher.contains was ignoring the BeginOffset property
>of PatternMatcherInput with regards to matching the '^' anchor expression.
>
>Here's a context diff:
>
>Index: Perl5Matcher.java
>===================================================================
>RCS file: 
>/home/cvspublic/jakarta-oro/src/java/org/apache/oro/text/regex/Perl5Matcher.java,v
>retrieving revision 1.3
>diff -c -r1.3 Perl5Matcher.java
>*** Perl5Matcher.java   2000/09/02 06:28:34     1.3
>--- Perl5Matcher.java   2000/09/13 02:16:00
>***************
>*** 191,197 ****
>
>     // Initialize globals needed before calling __tryExpression for first 
> time
>     private void __initInterpreterGlobals(Perl5Pattern expression, char[] 
> input,
>!                                       int beginOffset, int endOffset) {
>       __input                      = input;
>       __endOffset                  = endOffset;
>       __currentRep                 = new Perl5Repetition();
>--- 191,197 ----
>
>     // Initialize globals needed before calling __tryExpression for first 
> time
>     private void __initInterpreterGlobals(Perl5Pattern expression, char[] 
> input,
>!                                       int beginLineOffset, int 
>beginOffset, int endOffset) {
>       __input                      = input;
>       __endOffset                  = endOffset;
>       __currentRep                 = new Perl5Repetition();
>***************
>*** 200,206 ****
>       __program                    = expression._program;
>       __stack.setSize(0);
>
>!     if(beginOffset == 0)
>         __previousChar = '\n';
>       else {
>         __previousChar = input[beginOffset - 1];
>--- 200,206 ----
>       __program                    = expression._program;
>       __stack.setSize(0);
>
>!     if(beginOffset == beginLineOffset)
>         __previousChar = '\n';
>       else {
>         __previousChar = input[beginOffset - 1];
>***************
>*** 276,288 ****
>     // __originalInput must be set before calling this method for
>     // __lastMatchResult to be set correctly.
>     private boolean __interpret(Perl5Pattern expression, char[] input,
>!                             int beginOffset, int endOffset)
>     {
>       boolean success;
>       int minLength = 0, dontTry = 0, offset;
>       char ch, mustString[];
>
>!     __initInterpreterGlobals(expression, input, beginOffset, endOffset);
>
>       success = false;
>       mustString = expression._mustString;
>--- 276,288 ----
>     // __originalInput must be set before calling this method for
>     // __lastMatchResult to be set correctly.
>     private boolean __interpret(Perl5Pattern expression, char[] input,
>!                             int beginLineOffset, int beginOffset, int 
>endOffset)
>     {
>       boolean success;
>       int minLength = 0, dontTry = 0, offset;
>       char ch, mustString[];
>
>!     __initInterpreterGlobals(expression, input, beginLineOffset, 
>beginOffset, endOffset);
>
>       success = false;
>       mustString = expression._mustString;
>***************
>*** 1244,1250 ****
>       if(expression._isCaseInsensitive)
>         input = _toLower(input);
>
>!     __initInterpreterGlobals(expression, input, offset, input.length);
>
>       __lastSuccess = __tryExpression(expression, offset);
>       __lastMatchResult = null;
>--- 1244,1250 ----
>       if(expression._isCaseInsensitive)
>         input = _toLower(input);
>
>!     __initInterpreterGlobals(expression, input, 0, offset, input.length);
>
>       __lastSuccess = __tryExpression(expression, offset);
>       __lastMatchResult = null;
>***************
>*** 1322,1328 ****
>       } else
>         inp = __originalInput;
>
>!     __initInterpreterGlobals(expression, inp, input._currentOffset,
>                             input._endOffset);
>       __lastSuccess = __tryExpression(expression, input._currentOffset);
>       __lastMatchResult = null;
>--- 1322,1328 ----
>       } else
>         inp = __originalInput;
>
>!     __initInterpreterGlobals(expression, inp, 0, input._currentOffset,
>                             input._endOffset);
>       __lastSuccess = __tryExpression(expression, input._currentOffset);
>       __lastMatchResult = null;
>***************
>*** 1384,1390 ****
>         return true;
>       }
>       */
>!     __initInterpreterGlobals(expression, input, 0, input.length);
>       __lastSuccess = (__tryExpression(expression, 0) &&
>                      __endMatchOffsets[0] == input.length);
>       __lastMatchResult = null;
>--- 1384,1390 ----
>         return true;
>       }
>       */
>!     __initInterpreterGlobals(expression, input, 0, 0, input.length);
>       __lastSuccess = (__tryExpression(expression, 0) &&
>                      __endMatchOffsets[0] == input.length);
>       __lastMatchResult = null;
>***************
>*** 1513,1519 ****
>       }
>       */
>
>!     __initInterpreterGlobals(expression, inp, input._beginOffset,
>                             input._endOffset);
>
>       __lastMatchResult = null;
>--- 1513,1519 ----
>       }
>       */
>
>!     __initInterpreterGlobals(expression, inp, 0, input._beginOffset,
>                             input._endOffset);
>
>       __lastMatchResult = null;
>***************
>*** 1609,1615 ****
>       if(expression._isCaseInsensitive)
>         input = _toLower(input);
>
>!     return __interpret(expression, input, 0, input.length);
>     }
>
>
>--- 1609,1615 ----
>       if(expression._isCaseInsensitive)
>         input = _toLower(input);
>
>!     return __interpret(expression, input, 0, 0, input.length);
>     }
>
>
>***************
>*** 1713,1719 ****
>       __lastMatchInputEndOffset = input.getMatchEndOffset();
>
>       matchFound =
>!       __interpret(expression, inp, input._currentOffset, input._endOffset);
>
>       if(matchFound) {
>         input.setCurrentOffset(__endMatchOffsets[0]);
>--- 1713,1719 ----
>       __lastMatchInputEndOffset = input.getMatchEndOffset();
>
>       matchFound =
>!       __interpret(expression, inp, input._beginOffset, 
>input._currentOffset, input._endOffset);
>
>       if(matchFound) {
>         input.setCurrentOffset(__endMatchOffsets[0]);



Mime
View raw message