File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
inject-generator/src/main/java/io/avaje/inject/generator Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,8 @@ final class AssistBeanReader {
70
70
.findFirst ()
71
71
.orElse (null );
72
72
73
- if (!factoryType .getQualifiedName ().contentEquals ("java.lang.Void" )) {
74
- validateTarget (factoryType );
75
- this .targetType = factoryType ;
76
- } else {
77
- targetType = null ;
78
- }
73
+ validateTarget (factoryType );
74
+ this .targetType = factoryType ;
79
75
}
80
76
81
77
private void validateTarget (TypeElement t ) {
@@ -163,7 +159,8 @@ void buildRegister(Append writer) {
163
159
164
160
private Set <String > importTypes () {
165
161
importTypes .add ("io.avaje.inject.AssistFactory" );
166
- importTypes .add (targetType .getQualifiedName ().toString ());
162
+ Optional .ofNullable (targetType ).ifPresent (t -> importTypes .add (t .getQualifiedName ().toString ()));
163
+
167
164
if (Util .validImportType (type )) {
168
165
importTypes .add (type );
169
166
}
You can’t perform that action at this time.
0 commit comments