Skip to content

Commit

Permalink
polish alibaba#614
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyunabc committed May 14, 2019
1 parent a55034a commit 487742d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,12 +607,10 @@ private void close() {
if (statisticsHandler != null && flushHandlerChain != null) {
String data = statisticsHandler.result();

if (flushHandlerChain != null) {
for (Function<String, String> function : flushHandlerChain) {
data = function.apply(data);
if (function instanceof StatisticsFunction) {
data = ((StatisticsFunction) function).result();
}
for (Function<String, String> function : flushHandlerChain) {
data = function.apply(data);
if (function instanceof StatisticsFunction) {
data = ((StatisticsFunction) function).result();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,11 @@ private List<Map<String, Object>> getErrorList() {
private String getErrors() {
StringBuilder errors = new StringBuilder();

for (Map<String, Object> entry : getErrorList()) {

for (String key : entry.keySet()) {

Object value = entry.get(key);
for (Map<String, Object> message : getErrorList()) {
for (Map.Entry<String, Object> entry : message.entrySet()) {
Object value = entry.getValue();
if (value != null && !value.toString().isEmpty()) {
errors.append(key);
errors.append(entry.getKey());
errors.append(": ");
errors.append(value);
}
Expand Down

0 comments on commit 487742d

Please sign in to comment.