Shinsuke Sugaya hai 1 ano
pai
achega
a917f66f1b

+ 1 - 1
src/main/java/org/codelibs/fess/app/service/CharMappingService.java

@@ -53,7 +53,7 @@ public class CharMappingService {
     }
 
     public OptionalEntity<CharMappingFile> getCharMappingFile(final String dictId) {
-        return dictionaryManager.getDictionaryFile(dictId).filter(file -> file instanceof CharMappingFile)
+        return dictionaryManager.getDictionaryFile(dictId).filter(CharMappingFile.class::isInstance)
                 .map(file -> OptionalEntity.of((CharMappingFile) file)).orElse(OptionalEntity.empty());
     }
 

+ 1 - 1
src/main/java/org/codelibs/fess/app/service/KuromojiService.java

@@ -52,7 +52,7 @@ public class KuromojiService {
     }
 
     public OptionalEntity<KuromojiFile> getKuromojiFile(final String dictId) {
-        return dictionaryManager.getDictionaryFile(dictId).filter(file -> file instanceof KuromojiFile)
+        return dictionaryManager.getDictionaryFile(dictId).filter(KuromojiFile.class::isInstance)
                 .map(file -> OptionalEntity.of((KuromojiFile) file)).orElse(OptionalEntity.empty());
     }
 

+ 1 - 1
src/main/java/org/codelibs/fess/app/service/ProtwordsService.java

@@ -53,7 +53,7 @@ public class ProtwordsService {
     }
 
     public OptionalEntity<ProtwordsFile> getProtwordsFile(final String dictId) {
-        return dictionaryManager.getDictionaryFile(dictId).filter(file -> file instanceof ProtwordsFile)
+        return dictionaryManager.getDictionaryFile(dictId).filter(ProtwordsFile.class::isInstance)
                 .map(file -> OptionalEntity.of((ProtwordsFile) file)).orElse(OptionalEntity.empty());
     }
 

+ 1 - 1
src/main/java/org/codelibs/fess/app/service/StemmerOverrideService.java

@@ -53,7 +53,7 @@ public class StemmerOverrideService {
     }
 
     public OptionalEntity<StemmerOverrideFile> getStemmerOverrideFile(final String dictId) {
-        return dictionaryManager.getDictionaryFile(dictId).filter(file -> file instanceof StemmerOverrideFile)
+        return dictionaryManager.getDictionaryFile(dictId).filter(StemmerOverrideFile.class::isInstance)
                 .map(file -> OptionalEntity.of((StemmerOverrideFile) file)).orElse(OptionalEntity.empty());
     }
 

+ 1 - 1
src/main/java/org/codelibs/fess/app/service/StopwordsService.java

@@ -53,7 +53,7 @@ public class StopwordsService {
     }
 
     public OptionalEntity<StopwordsFile> getStopwordsFile(final String dictId) {
-        return dictionaryManager.getDictionaryFile(dictId).filter(file -> file instanceof StopwordsFile)
+        return dictionaryManager.getDictionaryFile(dictId).filter(StopwordsFile.class::isInstance)
                 .map(file -> OptionalEntity.of((StopwordsFile) file)).orElse(OptionalEntity.empty());
     }
 

+ 1 - 1
src/main/java/org/codelibs/fess/app/service/SynonymService.java

@@ -52,7 +52,7 @@ public class SynonymService {
     }
 
     public OptionalEntity<SynonymFile> getSynonymFile(final String dictId) {
-        return dictionaryManager.getDictionaryFile(dictId).filter(file -> file instanceof SynonymFile)
+        return dictionaryManager.getDictionaryFile(dictId).filter(SynonymFile.class::isInstance)
                 .map(file -> OptionalEntity.of((SynonymFile) file)).orElse(OptionalEntity.empty());
     }