From 7dc01f9a556f8575a974b6e6be82cfff2ef38f20 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 14 Oct 2017 22:37:03 +0200 Subject: [PATCH] IDEA-127533 int field is displayed as char - show \n etc as chars --- .../java/decompiler/modules/decompiler/exps/ConstExprent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ConstExprent.java b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ConstExprent.java index 2a91a65..31fe3cd 100644 --- a/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ConstExprent.java +++ b/src/org/jetbrains/java/decompiler/modules/decompiler/exps/ConstExprent.java @@ -394,7 +394,8 @@ public class ConstExprent extends Exprent { // BYTECHAR and SHORTCHAR => CHAR in the CHAR context if (expectedType.equals(VarType.VARTYPE_CHAR) && (constType.equals(VarType.VARTYPE_BYTECHAR) || constType.equals(VarType.VARTYPE_SHORTCHAR))) { - if (isPrintableAscii(getIntValue())) { + int intValue = getIntValue(); + if (isPrintableAscii(intValue) || CHAR_ESCAPES.containsKey(intValue)) { setConstType(VarType.VARTYPE_CHAR); } }