1
1
package io .avaje .http .generator .helidon .nima ;
2
2
3
3
import static io .avaje .http .generator .core .ProcessingContext .diAnnotation ;
4
+ import static io .avaje .http .generator .core .ProcessingContext .isAssignable2Interface ;
4
5
5
6
import java .io .IOException ;
6
7
import java .util .List ;
@@ -106,8 +107,10 @@ private void writeClassStart() {
106
107
}
107
108
108
109
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
+ }
111
114
}
112
115
writer .eol ();
113
116
@@ -133,9 +136,15 @@ private void writeClassStart() {
133
136
134
137
if (useJsonB ) {
135
138
for (final UType type : jsonTypes .values ()) {
136
- JsonBUtil .writeJsonbType (type , writer );
139
+ if (!isInputStream (type .full ())) {
140
+ JsonBUtil .writeJsonbType (type , writer );
141
+ }
137
142
}
138
143
}
139
144
writer .append (" }" ).eol ().eol ();
140
145
}
146
+
147
+ private boolean isInputStream (String type ) {
148
+ return isAssignable2Interface (type .toString (), "java.io.InputStream" );
149
+ }
141
150
}
0 commit comments