|
44 | 44 | *
|
45 | 45 | * @author Andy Clement
|
46 | 46 | * @author Phillip Webb
|
| 47 | + * @author Stephane Nicoll |
47 | 48 | * @since 3.0
|
48 | 49 | */
|
49 | 50 | // TODO support multidimensional arrays
|
@@ -213,54 +214,54 @@ public void generateCode(MethodVisitor mv, CodeFlow codeflow) {
|
213 | 214 | }
|
214 | 215 |
|
215 | 216 | if (this.indexedType == IndexedType.array) {
|
216 |
| - if (exitTypeDescriptor == "I") { |
| 217 | + if ("I".equals(exitTypeDescriptor)) { |
217 | 218 | mv.visitTypeInsn(CHECKCAST,"[I");
|
218 | 219 | SpelNodeImpl index = this.children[0];
|
219 | 220 | codeflow.enterCompilationScope();
|
220 | 221 | index.generateCode(mv, codeflow);
|
221 | 222 | codeflow.exitCompilationScope();
|
222 | 223 | mv.visitInsn(IALOAD);
|
223 | 224 | }
|
224 |
| - else if (exitTypeDescriptor == "D") { |
| 225 | + else if ("D".equals(exitTypeDescriptor)) { |
225 | 226 | mv.visitTypeInsn(CHECKCAST,"[D");
|
226 | 227 | SpelNodeImpl index = this.children[0];
|
227 | 228 | codeflow.enterCompilationScope();
|
228 | 229 | index.generateCode(mv, codeflow);
|
229 | 230 | mv.visitInsn(DALOAD);
|
230 | 231 | }
|
231 |
| - else if (exitTypeDescriptor == "J") { |
| 232 | + else if ("J".equals(exitTypeDescriptor)) { |
232 | 233 | mv.visitTypeInsn(CHECKCAST,"[J");
|
233 | 234 | SpelNodeImpl index = this.children[0];
|
234 | 235 | codeflow.enterCompilationScope();
|
235 | 236 | index.generateCode(mv, codeflow);
|
236 | 237 | codeflow.exitCompilationScope();
|
237 | 238 | mv.visitInsn(LALOAD);
|
238 | 239 | }
|
239 |
| - else if (exitTypeDescriptor == "F") { |
| 240 | + else if ("F".equals(exitTypeDescriptor)) { |
240 | 241 | mv.visitTypeInsn(CHECKCAST,"[F");
|
241 | 242 | SpelNodeImpl index = this.children[0];
|
242 | 243 | codeflow.enterCompilationScope();
|
243 | 244 | index.generateCode(mv, codeflow);
|
244 | 245 | codeflow.exitCompilationScope();
|
245 | 246 | mv.visitInsn(FALOAD);
|
246 | 247 | }
|
247 |
| - else if (exitTypeDescriptor == "S") { |
| 248 | + else if ("S".equals(exitTypeDescriptor)) { |
248 | 249 | mv.visitTypeInsn(CHECKCAST,"[S");
|
249 | 250 | SpelNodeImpl index = this.children[0];
|
250 | 251 | codeflow.enterCompilationScope();
|
251 | 252 | index.generateCode(mv, codeflow);
|
252 | 253 | codeflow.exitCompilationScope();
|
253 | 254 | mv.visitInsn(SALOAD);
|
254 | 255 | }
|
255 |
| - else if (exitTypeDescriptor == "B") { |
| 256 | + else if ("B".equals(exitTypeDescriptor)) { |
256 | 257 | mv.visitTypeInsn(CHECKCAST,"[B");
|
257 | 258 | SpelNodeImpl index = this.children[0];
|
258 | 259 | codeflow.enterCompilationScope();
|
259 | 260 | index.generateCode(mv, codeflow);
|
260 | 261 | codeflow.exitCompilationScope();
|
261 | 262 | mv.visitInsn(BALOAD);
|
262 | 263 | }
|
263 |
| - else if (exitTypeDescriptor == "C") { |
| 264 | + else if ("C".equals(exitTypeDescriptor)) { |
264 | 265 | mv.visitTypeInsn(CHECKCAST,"[C");
|
265 | 266 | SpelNodeImpl index = this.children[0];
|
266 | 267 | codeflow.enterCompilationScope();
|
|
0 commit comments