File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -208,9 +208,10 @@ public Set<String> outputNames() {
208208
209209 @ Override
210210 public String toString () {
211- StringBuilder strBuilder = new StringBuilder ("Signature for \" " + key + "\" :\n " );
212- if (!methodName ().isEmpty ()) {
213- strBuilder .append ("\t Method: \" " ).append (methodName ()).append ("\" \n " );
211+ StringBuilder strBuilder = new StringBuilder ("Signature for \" " + key +"\" :\n " );
212+ String methodName = methodName ();
213+ if (methodName != null && !methodName .isEmpty ()) {
214+ strBuilder .append ("\t Method: \" " ).append (methodName ).append ("\" \n " );
214215 }
215216 if (signatureDef .getInputsCount () > 0 ) {
216217 strBuilder .append ("\t Inputs:\n " );
You can’t perform that action at this time.
0 commit comments