Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
discovery
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢捷峰
discovery
Commits
2e01c90b
Commit
2e01c90b
authored
Jun 27, 2018
by
Nepxion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改异常抛出机制,当读取配置失败,不能影响服务注册发现功能
parent
f224a3a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
discovery-plugin-config-center/src/main/java/com/nepxion/discovery/plugin/configcenter/ConfigParser.java
+4
-6
No files found.
discovery-plugin-config-center/src/main/java/com/nepxion/discovery/plugin/configcenter/ConfigParser.java
View file @
2e01c90b
...
@@ -9,7 +9,6 @@ package com.nepxion.discovery.plugin.configcenter;
...
@@ -9,7 +9,6 @@ package com.nepxion.discovery.plugin.configcenter;
* @version 1.0
* @version 1.0
*/
*/
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -21,7 +20,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
...
@@ -21,7 +20,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.dom4j.Attribute
;
import
org.dom4j.Attribute
;
import
org.dom4j.DocumentException
;
import
org.dom4j.Element
;
import
org.dom4j.Element
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -55,10 +53,10 @@ public class ConfigParser extends Dom4JParser {
...
@@ -55,10 +53,10 @@ public class ConfigParser extends Dom4JParser {
String
text
=
IOUtils
.
toString
(
inputStream
,
PluginConstant
.
ENCODING_UTF_8
);
String
text
=
IOUtils
.
toString
(
inputStream
,
PluginConstant
.
ENCODING_UTF_8
);
super
.
parse
(
text
);
super
.
parse
(
text
);
}
catch
(
IO
Exception
e
)
{
}
catch
(
NullPointer
Exception
e
)
{
throw
new
PluginException
(
e
);
LOG
.
warn
(
"No input stream is retrieved"
);
}
catch
(
Document
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
PluginException
(
e
);
LOG
.
error
(
"Parse rule xml failed"
,
e
);
}
finally
{
}
finally
{
if
(
inputStream
!=
null
)
{
if
(
inputStream
!=
null
)
{
IOUtils
.
closeQuietly
(
inputStream
);
IOUtils
.
closeQuietly
(
inputStream
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment