Skip to content

Commit

Permalink
Merge b57052b into 184e9c0
Browse files Browse the repository at this point in the history
  • Loading branch information
coolbeevip committed Dec 19, 2019
2 parents 184e9c0 + b57052b commit 86021f6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Date;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -48,7 +49,7 @@
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import sun.misc.BASE64Decoder;
import java.util.Base64.Decoder;

@Controller
@EnableScheduling
Expand Down Expand Up @@ -172,10 +173,10 @@ public String getGlobalTransaction(ModelMap map, @PathVariable("globalTxId") Str
.equals("SagaAbortedEvent")) {
// TxAbortedEvent properties
if (event.containsKey("payloads")) {
BASE64Decoder decoder = new BASE64Decoder();
Decoder decoder = Base64.getDecoder();
String exception;
try {
exception = new String(decoder.decodeBuffer(event.get("payloads").toString()), "UTF-8");
exception = new String(decoder.decode(event.get("payloads").toString()), "UTF-8");
} catch (IOException e) {
exception = "BASE64Decoder error";
LOG.error(e.getMessage(), e);
Expand Down

0 comments on commit 86021f6

Please sign in to comment.