GT-3333 minor code review tweaks

This commit is contained in:
dev747368 2019-11-22 13:44:44 -05:00
parent 3be5949814
commit 09ba78b7a0

View file

@ -155,10 +155,10 @@ public class StringDataInstance {
private final String translatedValue; private final String translatedValue;
private final Endian endianSetting; private final Endian endianSetting;
private boolean showTranslation; private final boolean showTranslation;
private RENDER_ENUM renderSetting; private final RENDER_ENUM renderSetting;
private int length; private final int length;
private final MemBuffer buf; private final MemBuffer buf;
protected StringDataInstance() { protected StringDataInstance() {
@ -171,6 +171,8 @@ public class StringDataInstance {
stringLayout = StringLayoutEnum.FIXED_LEN; stringLayout = StringLayoutEnum.FIXED_LEN;
endianSetting = null; endianSetting = null;
renderSetting = RENDER_ENUM.ALL; renderSetting = RENDER_ENUM.ALL;
length = 0;
showTranslation = false;
} }
/** /**
@ -789,7 +791,7 @@ public class StringDataInstance {
* @return String containing the representation of the single char. * @return String containing the representation of the single char.
*/ */
public String getCharRepresentation() { public String getCharRepresentation() {
if (length < charSize) { if (length < charSize /* also covers case of isProbe() */ ) {
return UNKNOWN_DOT_DOT_DOT; return UNKNOWN_DOT_DOT_DOT;
} }