You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2014/04/10 23:30:53 UTC

svn commit: r1586473 - /lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java

Author: rmuir
Date: Thu Apr 10 21:30:53 2014
New Revision: 1586473

URL: http://svn.apache.org/r1586473
Log:
fix bug in buffering logic of this charfilter

Modified:
    lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java

Modified: lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java?rev=1586473&r1=1586472&r2=1586473&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java (original)
+++ lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java Thu Apr 10 21:30:53 2014
@@ -104,7 +104,9 @@ public final class ICUNormalizer2CharFil
 
     // if checkedInputBoundary was at the end of a buffer, we need to check that char again
     checkedInputBoundary = Math.max(checkedInputBoundary - 1, 0);
-    if (normalizer.isInert(tmpBuffer[len - 1]) && !Character.isHighSurrogate(tmpBuffer[len-1])) {
+    // this loop depends on 'isInert' (changes under normalization) but looks only at characters.
+    // so we treat all surrogates as non-inert for simplicity
+    if (normalizer.isInert(tmpBuffer[len - 1]) && !Character.isSurrogate(tmpBuffer[len-1])) {
       return len;
     } else return len + readInputToBuffer();
   }



Re: svn commit: r1586473 - /lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/ icu/ICUNormalizer2CharFilter.java

Posted by Robert Muir <rc...@gmail.com>.
dude i am just replying to test failures from jenkins.

I am not worried about helping people using unreleased code: they take
on that risk themselves.

I don't imagine myself creating jira issues for everytime jenkins
fails and i want to fix things, when its unnecessary.
Its not like anyone else is doing this either: why should I have to do more?

It seems like it should be enough that i debugged some fails on the
airplane, because I wanted to help out.

On Thu, Apr 10, 2014 at 5:48 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> : the functionality is unreleased. So is it really interesting to anyone?
>
> Ah, ok ... in that case i would advocate labling this type of commit with
> the same initial Jira that added the class -- that way anyone looking at
> the jira and wanting to generate a patch (to backport for their personal
> usage in 4.7 for example) would have seen the additional commit needed to
> get it working properly.
>
> not a big a deal though.
>
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: svn commit: r1586473 - /lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/ icu/ICUNormalizer2CharFilter.java

Posted by Chris Hostetter <ho...@fucit.org>.
: the functionality is unreleased. So is it really interesting to anyone?

Ah, ok ... in that case i would advocate labling this type of commit with 
the same initial Jira that added the class -- that way anyone looking at 
the jira and wanting to generate a patch (to backport for their personal 
usage in 4.7 for example) would have seen the additional commit needed to 
get it working properly.

not a big a deal though.


-Hoss
http://www.lucidworks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: svn commit: r1586473 - /lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/ icu/ICUNormalizer2CharFilter.java

Posted by Robert Muir <rc...@gmail.com>.
the functionality is unreleased. So is it really interesting to anyone?

On Thu, Apr 10, 2014 at 5:01 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> rmuir: shouldn't this have a Jira to track the fix & record it in
> CHANGES.txt ?
>
>
> : Date: Thu, 10 Apr 2014 21:30:53 -0000
> : From: rmuir@apache.org
> : Reply-To: dev@lucene.apache.org
> : To: commits@lucene.apache.org
> : Subject: svn commit: r1586473 -
> :     /lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/
> :     icu/ICUNormalizer2CharFilter.java
> :
> : Author: rmuir
> : Date: Thu Apr 10 21:30:53 2014
> : New Revision: 1586473
> :
> : URL: http://svn.apache.org/r1586473
> : Log:
> : fix bug in buffering logic of this charfilter
> :
> : Modified:
> :     lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java
> :
> : Modified: lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java
> : URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java?rev=1586473&r1=1586472&r2=1586473&view=diff
> : ==============================================================================
> : --- lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java (original)
> : +++ lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java Thu Apr 10 21:30:53 2014
> : @@ -104,7 +104,9 @@ public final class ICUNormalizer2CharFil
> :
> :      // if checkedInputBoundary was at the end of a buffer, we need to check that char again
> :      checkedInputBoundary = Math.max(checkedInputBoundary - 1, 0);
> : -    if (normalizer.isInert(tmpBuffer[len - 1]) && !Character.isHighSurrogate(tmpBuffer[len-1])) {
> : +    // this loop depends on 'isInert' (changes under normalization) but looks only at characters.
> : +    // so we treat all surrogates as non-inert for simplicity
> : +    if (normalizer.isInert(tmpBuffer[len - 1]) && !Character.isSurrogate(tmpBuffer[len-1])) {
> :        return len;
> :      } else return len + readInputToBuffer();
> :    }
> :
> :
> :
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: svn commit: r1586473 - /lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/ icu/ICUNormalizer2CharFilter.java

Posted by Chris Hostetter <ho...@fucit.org>.
rmuir: shouldn't this have a Jira to track the fix & record it in 
CHANGES.txt ?


: Date: Thu, 10 Apr 2014 21:30:53 -0000
: From: rmuir@apache.org
: Reply-To: dev@lucene.apache.org
: To: commits@lucene.apache.org
: Subject: svn commit: r1586473 -
:     /lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/
:     icu/ICUNormalizer2CharFilter.java
: 
: Author: rmuir
: Date: Thu Apr 10 21:30:53 2014
: New Revision: 1586473
: 
: URL: http://svn.apache.org/r1586473
: Log:
: fix bug in buffering logic of this charfilter
: 
: Modified:
:     lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java
: 
: Modified: lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java
: URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java?rev=1586473&r1=1586472&r2=1586473&view=diff
: ==============================================================================
: --- lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java (original)
: +++ lucene/dev/trunk/lucene/analysis/icu/src/java/org/apache/lucene/analysis/icu/ICUNormalizer2CharFilter.java Thu Apr 10 21:30:53 2014
: @@ -104,7 +104,9 @@ public final class ICUNormalizer2CharFil
:  
:      // if checkedInputBoundary was at the end of a buffer, we need to check that char again
:      checkedInputBoundary = Math.max(checkedInputBoundary - 1, 0);
: -    if (normalizer.isInert(tmpBuffer[len - 1]) && !Character.isHighSurrogate(tmpBuffer[len-1])) {
: +    // this loop depends on 'isInert' (changes under normalization) but looks only at characters.
: +    // so we treat all surrogates as non-inert for simplicity
: +    if (normalizer.isInert(tmpBuffer[len - 1]) && !Character.isSurrogate(tmpBuffer[len-1])) {
:        return len;
:      } else return len + readInputToBuffer();
:    }
: 
: 
: 

-Hoss
http://www.lucidworks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org