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 -> {
|
||||
try {
|
||||
return URLDecoder.decode(s, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
} catch (Throwable t) {
|
||||
return s;
|
||||
}
|
||||
})
|
||||
|
|
|
@ -168,7 +168,7 @@ public class OdfToOafMapper extends AbstractMdRecordToOafMapper {
|
|||
protected String trimAndDecodeUrl(String url) {
|
||||
try {
|
||||
return URLDecoder.decode(url.trim(), "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
} catch (Throwable t) {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue