Author: nbubna
Date: Thu Feb 19 05:38:20 2009
New Revision: 745739
URL: http://svn.apache.org/viewvc?rev=745739&view=rev
Log:
VELOCITY-701 remove unnecessary exclusion of public abstract methods in public
classes
Added:
velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java
- copied, changed from r745736,
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java
Modified:
velocity/engine/branches/2.0_Exp/build/build.xml
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/util/introspection/ClassMap.java
Modified: velocity/engine/branches/2.0_Exp/build/build.xml
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/build/build.xml?rev=745739&r1=745738&r2=745739&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/build/build.xml (original)
+++ velocity/engine/branches/2.0_Exp/build/build.xml Thu Feb 19 05:38:20 2009
@@ -534,7 +534,7 @@
classpathref="velocity.run.classpath"/>
</target>
- <target name="examples-clean" depends="examples-clean-anakia">
+ <target name="examples-clean">
<delete quiet="true">
<fileset dir="${example.dir}" includes="**/*.class">
<include name="**/*.log"/>
@@ -542,10 +542,6 @@
</delete>
</target>
- <target name="examples-clean-anakia">
- <delete dir="${example.dir}/anakia/docs" quiet="true"/>
- </target>
-
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
@@ -1206,9 +1202,6 @@
<exclude name="**/BaseTestCase.java"></exclude>
- <exclude name="**/TexenTestCase.java"></exclude>
- <exclude name="**/TexenClasspathTestCase.java"></exclude>
- <exclude name="**/AnakiaTestCase.java"></exclude>
<exclude name="**/MultiLoaderTestCase.java"></exclude>
<exclude name="**/ClasspathResourceTestCase.java"></exclude>
</fileset>
@@ -1216,13 +1209,7 @@
</junit>
</target>
- <target name="test" depends="test-main, test-legacy"/>
-
- <target name="test-legacy" unless="testcase">
- <!-- Run the legacy tests for anakia, texen... -->
- <ant antfile="${velocity.build.dir}/testcases.xml"
- target="test-all"/>
- </target>
+ <target name="test" depends="test-main"/>
<target name="test-clean">
<delete dir="${build.test.dest}" quiet="true"/>
Modified:
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/util/introspection/ClassMap.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/util/introspection/ClassMap.java?rev=745739&r1=745738&r2=745739&view=diff
==============================================================================
---
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/util/introspection/ClassMap.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/java/org/apache/velocity/util/introspection/ClassMap.java
Thu Feb 19 05:38:20 2009
@@ -42,7 +42,7 @@
public class ClassMap
{
/** Set true if you want to debug the reflection code */
- private static final boolean debugReflection = false;
+ private static final boolean debugReflection = true;
/** Class logger */
private final Log log;
@@ -164,22 +164,12 @@
try
{
Method[] methods = classToReflect.getDeclaredMethods();
-
for (int i = 0; i < methods.length; i++)
{
- // Strictly spoken that check shouldn't be necessary
- // because getMethods only returns public methods.
int modifiers = methods[i].getModifiers();
- if (Modifier.isPublic(modifiers)) // && !)
+ if (Modifier.isPublic(modifiers))
{
- // Some of the interfaces contain abstract methods. That
is fine, because the actual object must
- // implement them anyway (else it wouldn't be implementing
the interface). If we find an abstract
- // method in a non-interface, we skip it, because we do
want to make sure that no abstract methods end up in
- // the cache.
- if (classToReflect.isInterface() ||
!Modifier.isAbstract(modifiers))
- {
- methodCache.put(methods[i]);
- }
+ methodCache.put(methods[i]);
}
}
}
Copied:
velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java
(from r745736,
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java)
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java?p2=velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java&p1=velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java&r1=745736&r2=745739&rev=745739&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java
(original)
+++
velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java
Thu Feb 19 05:38:20 2009
@@ -51,7 +51,6 @@
}
- /* TODO: uncomment for jdk 1.5+
public void testEnum()
{
context.put("bar", Bar.ONE);
@@ -69,6 +68,6 @@
//This was an abstract method, but Velocity 1.6 quit working with it.
public abstract String getFoo();
- }*/
+ }
}