From 21248a42ca3d2be77931f87f211afec9c1dd671a Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Sat, 31 Aug 2013 16:37:16 -0700 Subject: [PATCH] rm unneeded null ptr check (Coverity) --- tool/src/org/antlr/v4/automata/ATNPrinter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tool/src/org/antlr/v4/automata/ATNPrinter.java b/tool/src/org/antlr/v4/automata/ATNPrinter.java index 2f5a15382..9ee0b0b73 100644 --- a/tool/src/org/antlr/v4/automata/ATNPrinter.java +++ b/tool/src/org/antlr/v4/automata/ATNPrinter.java @@ -111,8 +111,7 @@ public class ATNPrinter { } else if ( t instanceof AtomTransition ) { AtomTransition a = (AtomTransition)t; - String label = a.toString(); - if ( g!=null ) label = g.getTokenDisplayName(a.label); + String label = g.getTokenDisplayName(a.label); buf.append("-").append(label).append("->").append(getStateString(t.target)).append('\n'); } else {