forked from D-Net/dnet-hadoop
keep the original url if the decoder fails for any reason
This commit is contained in:
parent
45898c71ac
commit
ccf4103a25
|
@ -169,7 +169,7 @@ public class OafToOafMapper extends AbstractMdRecordToOafMapper {
|
||||||
.map(s -> {
|
.map(s -> {
|
||||||
try {
|
try {
|
||||||
return URLDecoder.decode(s, "UTF-8");
|
return URLDecoder.decode(s, "UTF-8");
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (Throwable t) {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper {
|
||||||
protected String trimAndDecodeUrl(String url) {
|
protected String trimAndDecodeUrl(String url) {
|
||||||
try {
|
try {
|
||||||
return URLDecoder.decode(url.trim(), "UTF-8");
|
return URLDecoder.decode(url.trim(), "UTF-8");
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (Throwable t) {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue