donnerpeter commented on a change in pull request #2301:
URL: https://github.com/apache/lucene-solr/pull/2301#discussion_r570807970



##########
File path: 
lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/WordCase.java
##########
@@ -53,14 +54,19 @@ static WordCase caseOf(CharSequence word, int length) {
       if (seenUpper && seenLower) break;
     }
 
-    return get(startsWithLower, seenUpper, seenLower);
+    return get(startCase, seenUpper, seenLower);
   }
 
-  private static WordCase get(boolean startsWithLower, boolean seenUpper, 
boolean seenLower) {
-    if (!startsWithLower) {
-      return !seenLower ? UPPER : !seenUpper ? TITLE : MIXED;
+  private static WordCase get(CharCase startCase, boolean seenUpper, boolean 
seenLower) {

Review comment:
       I'll add examples, a good idea.
   As for UPPER, and given that I hate negations, I still find this easier to 
read. If "not seen lower" then UPPER, makes sense. If "seen lower" then TITLE — 
makes less sense to me. How about you?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to