Author: nbubna
Date: Thu Feb 19 05:42:50 2009
New Revision: 745741
URL: http://svn.apache.org/viewvc?rev=745741&view=rev
Log:
VELOCITY-701 remove unnecessary exclusion of public abstract methods in public
classes
Added:
velocity/engine/branches/1.6.x/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/1.6.x/src/java/org/apache/velocity/util/introspection/ClassMap.java
velocity/engine/branches/1.6.x/src/test/org/apache/velocity/test/issues/Velocity689TestCase.java
Modified:
velocity/engine/branches/1.6.x/src/java/org/apache/velocity/util/introspection/ClassMap.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/1.6.x/src/java/org/apache/velocity/util/introspection/ClassMap.java?rev=745741&r1=745740&r2=745741&view=diff
==============================================================================
---
velocity/engine/branches/1.6.x/src/java/org/apache/velocity/util/introspection/ClassMap.java
(original)
+++
velocity/engine/branches/1.6.x/src/java/org/apache/velocity/util/introspection/ClassMap.java
Thu Feb 19 05:42:50 2009
@@ -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]);
}
}
}
Modified:
velocity/engine/branches/1.6.x/src/test/org/apache/velocity/test/issues/Velocity689TestCase.java
URL:
http://svn.apache.org/viewvc/velocity/engine/branches/1.6.x/src/test/org/apache/velocity/test/issues/Velocity689TestCase.java?rev=745741&r1=745740&r2=745741&view=diff
==============================================================================
---
velocity/engine/branches/1.6.x/src/test/org/apache/velocity/test/issues/Velocity689TestCase.java
(original)
+++
velocity/engine/branches/1.6.x/src/test/org/apache/velocity/test/issues/Velocity689TestCase.java
Thu Feb 19 05:42:50 2009
@@ -31,7 +31,7 @@
public Velocity689TestCase(String name)
{
super(name);
- DEBUG = true;
+ // DEBUG = true;
}
public void testIt()
Copied:
velocity/engine/branches/1.6.x/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/1.6.x/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java?p2=velocity/engine/branches/1.6.x/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=745741&rev=745741&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java
(original)
+++
velocity/engine/branches/1.6.x/src/test/org/apache/velocity/test/issues/Velocity701TestCase.java
Thu Feb 19 05:42:50 2009
@@ -19,15 +19,12 @@
* under the License.
*/
-import java.lang.reflect.Modifier;
-import org.apache.velocity.test.BaseTestCase;
-import org.apache.velocity.runtime.RuntimeConstants;
-import org.apache.velocity.test.misc.TestLogChute;
+import org.apache.velocity.test.BaseEvalTestCase;
/**
* This class tests VELOCITY-701.
*/
-public class Velocity701TestCase extends BaseTestCase
+public class Velocity701TestCase extends BaseEvalTestCase
{
public Velocity701TestCase(String name)
{
@@ -51,24 +48,4 @@
}
- /* TODO: uncomment for jdk 1.5+
- public void testEnum()
- {
- context.put("bar", Bar.ONE);
- assertEvalEquals("foo", "$bar.foo");
- }
-
- public static enum Bar {
-
- ONE(){
- public String getFoo() {
- return "foo";
- }
- };
-
- //This was an abstract method, but Velocity 1.6 quit working with it.
- public abstract String getFoo();
-
- }*/
-
}