Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update SPR-8955 (now fixed)

  • Loading branch information...
commit 12804f2f624cd4b022c0b1ee5aa05267547a9e98 1 parent dd79a1b
@cbeams cbeams authored
View
2  SPR-8955/pom.xml
@@ -9,7 +9,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
- <version>3.1.0.RELEASE</version>
+ <version>3.1.1.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
View
26 SPR-8955/src/main/java/nl/willem/stackoverflow/Abstract.java
@@ -1,26 +0,0 @@
-/*
- * (C) 2012 Nidera (www.nidera.com). All rights reserved.
- */
-package nl.willem.stackoverflow;
-
-import org.springframework.stereotype.Component;
-
-/**
- * @author Willem Dekker
- *
- */
-abstract class Abstract {
-
- public abstract void inheritedMethod();
-
- @Component
- static class Concrete extends Abstract {
-
- @Override
- public void inheritedMethod() {
- System.out.println("cool stuff going on!");
- }
-
- }
-
-}
View
22 SPR-8955/src/main/java/nl/willem/stackoverflow/Main.java
@@ -1,22 +0,0 @@
-/*
- * (C) 2012 Nidera (www.nidera.com). All rights reserved.
- */
-package nl.willem.stackoverflow;
-
-import nl.willem.stackoverflow.Abstract.Concrete;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * @author Willem Dekker
- *
- */
-public class Main {
-
- public static void main(String[] args) {
- ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("context.xml");
- Concrete concrete = applicationContext.getBean(Concrete.class);
- concrete.inheritedMethod();
- }
-
-}
View
18 SPR-8955/src/test/java/nl/willem/stackoverflow/Spr8955Tests.java
@@ -1,18 +0,0 @@
-package nl.willem.stackoverflow;
-
-import nl.willem.stackoverflow.Abstract.Concrete;
-
-import org.junit.Test;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class Spr8955Tests {
-
- @Test
- public void repro() {
- ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("context.xml");
-
- Concrete concrete = applicationContext.getBean(Concrete.class);
- concrete.inheritedMethod();
- }
-
-}
View
32 SPR-8955/src/test/java/org/springframework/context/annotation/configuration/spr8955/Spr8955Parent.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2002-2012 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.context.annotation.configuration.spr8955;
+
+import org.springframework.stereotype.Component;
+
+/**
+ * @author Chris Beams
+ * @author Willem Dekker
+ */
+abstract class Spr8955Parent {
+
+ @Component//("child")
+ static class Spr8955Child extends Spr8955Parent {
+
+ }
+
+}
View
36 SPR-8955/src/test/java/org/springframework/context/annotation/configuration/spr8955/Spr8955Tests.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2002-2012 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.context.annotation.configuration.spr8955;
+
+import org.junit.Test;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+
+/**
+ * @author Chris Beams
+ * @author Willem Dekker
+ */
+public class Spr8955Tests {
+
+ @Test
+ public void repro() {
+ AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
+ ctx.scan("org.springframework.context.annotation.configuration.spr8955");
+ ctx.refresh();
+ //ctx.containsBean("child");
+ }
+
+}
View
10 SPR-8955/src/test/resources/context.xml
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
-
- <context:component-scan base-package="nl.willem.stackoverflow" />
-
-</beans>
Please sign in to comment.
Something went wrong with that request. Please try again.