|
22 | 22 | import com.google.common.base.Joiner; |
23 | 23 | import com.google.common.collect.ImmutableList; |
24 | 24 | import com.google.common.collect.ImmutableMap; |
25 | | -import com.google.common.collect.Iterables; |
26 | 25 | import com.google.turbine.binder.bound.EnumConstantValue; |
27 | 26 | import com.google.turbine.binder.bound.TurbineAnnotationValue; |
28 | 27 | import com.google.turbine.binder.bound.TurbineClassValue; |
@@ -215,7 +214,7 @@ private ClassSymbol resolveNext(int position, ClassSymbol sym, Ident bit) { |
215 | 214 | } |
216 | 215 |
|
217 | 216 | @Nullable FieldInfo resolveField(ConstVarName t) { |
218 | | - Ident simpleName = t.name().get(0); |
| 217 | + Ident simpleName = t.name().getFirst(); |
219 | 218 | FieldInfo field = lexicalField(env, owner, simpleName); |
220 | 219 | if (field != null) { |
221 | 220 | return field; |
@@ -267,7 +266,7 @@ private ClassSymbol resolveNext(int position, ClassSymbol sym, Ident bit) { |
267 | 266 | return null; |
268 | 267 | } |
269 | 268 | } |
270 | | - return Resolve.resolveField(env, origin, sym, Iterables.getLast(result.remaining())); |
| 269 | + return Resolve.resolveField(env, origin, sym, result.remaining().getLast()); |
271 | 270 | } |
272 | 271 |
|
273 | 272 | /** Search for constant variables in lexically enclosing scopes. */ |
@@ -1022,7 +1021,7 @@ AnnoInfo evaluateAnnotation(AnnoInfo info) { |
1022 | 1021 | LookupResult result = scope.lookup(new LookupKey(t.name())); |
1023 | 1022 | if (result == null) { |
1024 | 1023 | log.error( |
1025 | | - t.name().get(0).position(), ErrorKind.CANNOT_RESOLVE, Joiner.on(".").join(t.name())); |
| 1024 | + t.name().getFirst().position(), ErrorKind.CANNOT_RESOLVE, Joiner.on(".").join(t.name())); |
1026 | 1025 | return null; |
1027 | 1026 | } |
1028 | 1027 | ClassSymbol sym = (ClassSymbol) result.sym(); |
|
0 commit comments