Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 1606bdc

Browse files
Willem Dekkercbeams
authored andcommitted
Add repro project for SPR-8955
1 parent 5c1262b commit 1606bdc

File tree

6 files changed

+145
-0
lines changed

6 files changed

+145
-0
lines changed

SPR-8955/pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.springframework.issues</groupId>
5+
<artifactId>SPR-8955</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<packaging>jar</packaging>
8+
<dependencies>
9+
<dependency>
10+
<groupId>org.springframework</groupId>
11+
<artifactId>spring-context</artifactId>
12+
<version>3.1.0.RELEASE</version>
13+
</dependency>
14+
<dependency>
15+
<groupId>log4j</groupId>
16+
<artifactId>log4j</artifactId>
17+
<version>1.2.16</version>
18+
</dependency>
19+
<dependency>
20+
<groupId>junit</groupId>
21+
<artifactId>junit</artifactId>
22+
<version>4.8</version>
23+
<scope>test</scope>
24+
</dependency>
25+
</dependencies>
26+
<repositories>
27+
<repository>
28+
<id>spring-maven-snapshot</id>
29+
<name>Springframework Maven Snapshot Repository</name>
30+
<url>http://repo.springsource.org/snapshot</url>
31+
<snapshots><enabled>true</enabled></snapshots>
32+
</repository>
33+
</repositories>
34+
<properties>
35+
<project.build.sourceEncoding>UTF8</project.build.sourceEncoding>
36+
</properties>
37+
<build>
38+
<plugins>
39+
<plugin>
40+
<artifactId>maven-compiler-plugin</artifactId>
41+
<version>2.3.2</version>
42+
<configuration>
43+
<source>1.6</source>
44+
<target>1.6</target>
45+
</configuration>
46+
</plugin>
47+
<plugin>
48+
<artifactId>maven-surefire-plugin</artifactId>
49+
<version>2.7.2</version>
50+
<configuration>
51+
<includes>
52+
<include>**/*Tests.java</include>
53+
</includes>
54+
<excludes>
55+
<exclude>**/*Abstract*.java</exclude>
56+
</excludes>
57+
</configuration>
58+
</plugin>
59+
</plugins>
60+
</build>
61+
</project>
62+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* (C) 2012 Nidera (www.nidera.com). All rights reserved.
3+
*/
4+
package nl.willem.stackoverflow;
5+
6+
import org.springframework.stereotype.Component;
7+
8+
/**
9+
* @author Willem Dekker
10+
*
11+
*/
12+
abstract class Abstract {
13+
14+
public abstract void inheritedMethod();
15+
16+
@Component
17+
static class Concrete extends Abstract {
18+
19+
@Override
20+
public void inheritedMethod() {
21+
System.out.println("cool stuff going on!");
22+
}
23+
24+
}
25+
26+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* (C) 2012 Nidera (www.nidera.com). All rights reserved.
3+
*/
4+
package nl.willem.stackoverflow;
5+
6+
import nl.willem.stackoverflow.Abstract.Concrete;
7+
8+
import org.springframework.context.support.ClassPathXmlApplicationContext;
9+
10+
/**
11+
* @author Willem Dekker
12+
*
13+
*/
14+
public class Main {
15+
16+
public static void main(String[] args) {
17+
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("context.xml");
18+
Concrete concrete = applicationContext.getBean(Concrete.class);
19+
concrete.inheritedMethod();
20+
}
21+
22+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package nl.willem.stackoverflow;
2+
3+
import nl.willem.stackoverflow.Abstract.Concrete;
4+
5+
import org.junit.Test;
6+
import org.springframework.context.support.ClassPathXmlApplicationContext;
7+
8+
public class Spr8955Tests {
9+
10+
@Test
11+
public void repro() {
12+
ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("context.xml");
13+
14+
Concrete concrete = applicationContext.getBean(Concrete.class);
15+
concrete.inheritedMethod();
16+
}
17+
18+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:context="http://www.springframework.org/schema/context"
5+
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
6+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
7+
8+
<context:component-scan base-package="nl.willem.stackoverflow" />
9+
10+
</beans>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
log4j.rootCategory=ERROR, stdout
2+
3+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
4+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5+
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
6+
7+
log4j.category.org.springframework=WARN

0 commit comments

Comments
 (0)