Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
myguguang
elasticsearch-analysis-ik
提交
3d8fa5be
E
elasticsearch-analysis-ik
项目概览
myguguang
/
elasticsearch-analysis-ik
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
elasticsearch-analysis-ik
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3d8fa5be
编写于
1月 26, 2016
作者:
A
Ayman Abdel Ghany
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixing redundant nullcheck of value known to be non-null.
上级
71b52117
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
14 deletion
+14
-14
src/main/java/org/wltea/analyzer/dic/Dictionary.java
src/main/java/org/wltea/analyzer/dic/Dictionary.java
+14
-14
未找到文件。
src/main/java/org/wltea/analyzer/dic/Dictionary.java
浏览文件 @
3d8fa5be
...
...
@@ -297,10 +297,8 @@ public class Dictionary {
logger
.
error
(
"ik-analyzer"
,
e
);
}
finally
{
try
{
if
(
is
!=
null
){
is
.
close
();
is
=
null
;
}
is
.
close
();
is
=
null
;
}
catch
(
IOException
e
)
{
logger
.
error
(
"ik-analyzer"
,
e
);
}
...
...
@@ -318,11 +316,14 @@ public class Dictionary {
for
(
String
location:
remoteExtDictFiles
){
logger
.
info
(
"[Dict Loading] "
+
location
);
List
<
String
>
lists
=
getRemoteWords
(
location
);
/** Redundant Nullcheck as the list is initialized in the getRemoteWords method
//如果找不到扩展的字典,则忽略
if(lists == null){
logger.error("[Dict Loading] "+location+"加载失败");
continue;
}
}*/
for
(
String
theWord:
lists
){
if
(
theWord
!=
null
&&
!
""
.
equals
(
theWord
.
trim
()))
{
//加载扩展词典数据到主内存词典中
...
...
@@ -455,10 +456,8 @@ public class Dictionary {
}
finally
{
try
{
if
(
is
!=
null
){
is
.
close
();
is
=
null
;
}
is
.
close
();
is
=
null
;
}
catch
(
IOException
e
)
{
logger
.
error
(
"ik-analyzer"
,
e
);
}
...
...
@@ -471,11 +470,14 @@ public class Dictionary {
for
(
String
location:
remoteExtStopWordDictFiles
){
logger
.
info
(
"[Dict Loading] "
+
location
);
List
<
String
>
lists
=
getRemoteWords
(
location
);
/** Redundant Nullcheck as the list is initialized in the getRemoteWords method
//如果找不到扩展的字典,则忽略
if(lists == null){
logger.error("[Dict Loading] "+location+"加载失败");
continue;
}
}*/
for
(
String
theWord:
lists
){
if
(
theWord
!=
null
&&
!
""
.
equals
(
theWord
.
trim
()))
{
//加载远程词典数据到主内存中
...
...
@@ -554,10 +556,8 @@ public class Dictionary {
logger
.
error
(
"ik-analyzer"
,
e
);
}
finally
{
try
{
if
(
is
!=
null
){
is
.
close
();
is
=
null
;
}
is
.
close
();
is
=
null
;
}
catch
(
IOException
e
)
{
logger
.
error
(
"ik-analyzer"
,
e
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录