File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
compiler/src/main/java/com/squareup/omar/compiler Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 19
19
import java .util .HashMap ;
20
20
import java .util .HashSet ;
21
21
import java .util .LinkedHashMap ;
22
+ import java .util .LinkedHashSet ;
22
23
import java .util .List ;
23
24
import java .util .Map ;
24
25
import java .util .Scanner ;
@@ -123,7 +124,7 @@ public void compile(JavaWriter writer) throws IOException {
123
124
protoFile .getFileName ());
124
125
writer .emitPackage (protoFile .getJavaPackage ());
125
126
126
- List <String > imports = new ArrayList <String >();
127
+ Set <String > imports = new LinkedHashSet <String >();
127
128
List <Type > types = protoFile .getTypes ();
128
129
boolean hasMessage = hasMessage (types );
129
130
boolean hasExtensions = hasExtensions (protoFile .getTypes ());
@@ -148,6 +149,9 @@ public void compile(JavaWriter writer) throws IOException {
148
149
imports .add ("java.util.Map" );
149
150
imports .add ("java.util.TreeMap" );
150
151
}
152
+ if (hasExtends ) {
153
+ imports .add ("com.squareup.omar.Omar" );
154
+ }
151
155
writer .emitImports (imports );
152
156
153
157
if (hasExtends ) {
You can’t perform that action at this time.
0 commit comments