提交 29f6f3d7 编写于 作者: J Juergen Hoeller

Test ASM5's bytecode parsing of INVOKESPECIAL/STATIC on interfaces

Issue: SPR-11979
上级 eaad0a0f
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -16,6 +16,7 @@
package example.scannable;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.Future;
import javax.annotation.PostConstruct;
......@@ -27,8 +28,8 @@ import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.ResourcePatternResolver;
......@@ -43,6 +44,10 @@ import org.springframework.util.Assert;
@Service @Lazy @DependsOn("myNamedComponent")
public class FooServiceImpl implements FooService {
// Just to test ASM5's bytecode parsing of INVOKESPECIAL/STATIC on interfaces
private static final Comparator<MessageBean> COMPARATOR_BY_MESSAGE = Comparator.comparing(MessageBean::getMessage);
@Autowired private FooDao fooDao;
@Autowired public BeanFactory beanFactory;
......@@ -65,6 +70,7 @@ public class FooServiceImpl implements FooService {
private boolean initCalled = false;
@PostConstruct
private void init() {
if (this.initCalled) {
......
......@@ -30,8 +30,7 @@ public final class SpringAsmInfo {
/**
* The ASM compatibility version for Spring's ASM visitor implementations:
* as of Spring 4.0.3, it's ASM5.
* @see Opcodes#ASM5
* currently {@link Opcodes#ASM5}.
*/
public static final int ASM_VERSION = Opcodes.ASM5;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册