[GitHub] [lucene-solr] mocobeta commented on a change in pull request #809: LUCENE-8933: Validate JapaneseTokenizer user dictionary entry

2019-08-13 Thread GitBox
mocobeta commented on a change in pull request #809: LUCENE-8933: Validate 
JapaneseTokenizer user dictionary entry
URL: https://github.com/apache/lucene-solr/pull/809#discussion_r313692050
 
 

 ##
 File path: 
lucene/analysis/kuromoji/src/test/org/apache/lucene/analysis/ja/dict/UserDictionaryTest.java
 ##
 @@ -77,4 +78,19 @@ public void testRead() throws IOException {
 UserDictionary dictionary = TestJapaneseTokenizer.readDict();
 assertNotNull(dictionary);
   }
+
+  @Test(expected = RuntimeException.class)
 
 Review comment:
   Fixed in https://github.com/apache/lucene-solr/pull/830


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


With regards,
Apache Git Services

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



[GitHub] [lucene-solr] mocobeta commented on a change in pull request #809: LUCENE-8933: Validate JapaneseTokenizer user dictionary entry

2019-08-13 Thread GitBox
mocobeta commented on a change in pull request #809: LUCENE-8933: Validate 
JapaneseTokenizer user dictionary entry
URL: https://github.com/apache/lucene-solr/pull/809#discussion_r313689721
 
 

 ##
 File path: 
lucene/analysis/kuromoji/src/test/org/apache/lucene/analysis/ja/dict/UserDictionaryTest.java
 ##
 @@ -77,4 +78,19 @@ public void testRead() throws IOException {
 UserDictionary dictionary = TestJapaneseTokenizer.readDict();
 assertNotNull(dictionary);
   }
+
+  @Test(expected = RuntimeException.class)
 
 Review comment:
   Sorry, I missed LuceneTestCase#expectThrows. Will fix this in another patch.


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


With regards,
Apache Git Services

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



[GitHub] [lucene-solr] mocobeta commented on a change in pull request #809: LUCENE-8933: Validate JapaneseTokenizer user dictionary entry

2019-08-13 Thread GitBox
mocobeta commented on a change in pull request #809: LUCENE-8933: Validate 
JapaneseTokenizer user dictionary entry
URL: https://github.com/apache/lucene-solr/pull/809#discussion_r313686040
 
 

 ##
 File path: 
lucene/analysis/kuromoji/src/test/org/apache/lucene/analysis/ja/dict/UserDictionaryTest.java
 ##
 @@ -77,4 +78,19 @@ public void testRead() throws IOException {
 UserDictionary dictionary = TestJapaneseTokenizer.readDict();
 assertNotNull(dictionary);
   }
+
+  @Test(expected = RuntimeException.class)
 
 Review comment:
   I think you mean `assertThrows` that was introduced from JUnit 4.13
   
https://junit.org/junit4/javadoc/latest/org/junit/Assert.html#assertThrows(java.lang.String,%20java.lang.Class,%20org.junit.function.ThrowingRunnable)
   
   Lucene uses junit 4.12, so we cannot use it (Am I missing something?).


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


With regards,
Apache Git Services

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



[GitHub] [lucene-solr] mocobeta commented on a change in pull request #809: LUCENE-8933: Validate JapaneseTokenizer user dictionary entry

2019-07-27 Thread GitBox
mocobeta commented on a change in pull request #809: LUCENE-8933: Validate 
JapaneseTokenizer user dictionary entry
URL: https://github.com/apache/lucene-solr/pull/809#discussion_r307982969
 
 

 ##
 File path: 
lucene/analysis/kuromoji/src/java/org/apache/lucene/analysis/ja/dict/UserDictionary.java
 ##
 @@ -104,6 +104,8 @@ public int compare(String[] left, String[] right) {
 long ord = 0;
 
 for (String[] values : featureEntries) {
+  String surface = values[0].replaceAll(" ", "");
 
 Review comment:
   > maybe replace all white space here (ie including tabs) by using \s?
   
   Thanks, fixed.


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


With regards,
Apache Git Services

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