Revision 44704
Added by Claudio Atzori over 7 years ago
modules/dnet-datasource-rest-api/trunk/src/main/java/eu/dnetlib/datasource/publisher/clients/DatasourceInfoRetriever.java | ||
---|---|---|
107 | 107 |
waitLatch(outerLatch, errors, 10); |
108 | 108 |
|
109 | 109 |
if (!errors.isEmpty()) { |
110 |
datasourceInfo.getResponseHeader().setError(Joiner.on("\n").join(Iterables.transform(errors, new Function<Throwable, String>() { |
|
110 |
datasourceInfo.getResponseHeader().setError(Joiner.on("\n").skipNulls().join(Iterables.transform(errors, new Function<Throwable, String>() {
|
|
111 | 111 |
@Override |
112 | 112 |
public String apply(final Throwable e) { |
113 | 113 |
return e.getMessage(); |
114 | 114 |
} |
115 | 115 |
}))); |
116 |
log.error(Joiner.on("\n").join(Iterables.transform(errors, new Function<Throwable, String>() { |
|
116 |
log.error(Joiner.on("\n").skipNulls().join(Iterables.transform(errors, new Function<Throwable, String>() {
|
|
117 | 117 |
@Override |
118 | 118 |
public String apply(final Throwable e) { |
119 | 119 |
return ExceptionUtils.getFullStackTrace(e); |
Also available in: Unified diff
avoid more NPEs