I'm working on CAMEL-4987 [1] and I have a situation where a class from Spring cannot be extended. The class in question, AbstractTestNGSpringContextTests [2], is a part of the Spring Test library. It uses an annotation that precludes extension in this use case. The Spring documentation indicates that extension of the class may not always be desirable and provides guidance on implementing the class on your own.
The class is extremely simple and does not represent a significant maintenance issue going forward; however, in order to maintain the functionality of the class, two methods need to be lifted as-is from the original class. The methods are "run" and "springTestContextAfterTestMethod". The methods contain about 10 lines of code that are core to the functionality of the class. The original class also contains a number of trivial one-line methods. The Camel implementation would contain methods that produce similar outcomes but are not strictly identical. In my own code I would retain the copyright header, document departures from the original in accordance with the ASL, and move on; however, I realize that Apache needs to be careful about ownership of the code. What is the correct solution when doing this on code intended for Apache? I want to make sure that I can protect Apache and also honor the license of the original code. [1] - https://issues.apache.org/jira/browse/CAMEL-4987 [2] - http://grepcode.com/file_/repo1.maven.org/maven2/org.springframework/spring-test/3.0.7.RELEASE/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java/?v=source -- David Valeri ------------------- Twitter: DavidValeri Blog: http://davidvaleri.wordpress.com/