11package io .avaje .http .generator .helidon .nima ;
22
33import static io .avaje .http .generator .core .ProcessingContext .diAnnotation ;
4+ import static io .avaje .http .generator .core .ProcessingContext .isAssignable2Interface ;
45
56import java .io .IOException ;
67import java .util .List ;
@@ -106,8 +107,10 @@ private void writeClassStart() {
106107 }
107108
108109 for (final UType type : jsonTypes .values ()) {
109- final var typeString = PrimitiveUtil .wrap (type .shortType ()).replace ("," , ", " );
110- writer .append (" private final JsonType<%s> %sJsonType;" , typeString , type .shortName ()).eol ();
110+ if (!isInputStream (type .full ())) {
111+ final var typeString = PrimitiveUtil .wrap (type .shortType ()).replace ("," , ", " );
112+ writer .append (" private final JsonType<%s> %sJsonType;" , typeString , type .shortName ()).eol ();
113+ }
111114 }
112115 writer .eol ();
113116
@@ -133,9 +136,15 @@ private void writeClassStart() {
133136
134137 if (useJsonB ) {
135138 for (final UType type : jsonTypes .values ()) {
136- JsonBUtil .writeJsonbType (type , writer );
139+ if (!isInputStream (type .full ())) {
140+ JsonBUtil .writeJsonbType (type , writer );
141+ }
137142 }
138143 }
139144 writer .append (" }" ).eol ().eol ();
140145 }
146+
147+ private boolean isInputStream (String type ) {
148+ return isAssignable2Interface (type .toString (), "java.io.InputStream" );
149+ }
141150}
0 commit comments