Author: nbubna
Date: Tue Sep 2 17:58:15 2008
New Revision: 691448
URL: http://svn.apache.org/viewvc?rev=691448&view=rev
Log:
VELOCITY-70 skip test unless on jdk 1.5+, since this is due to a fixed jdk bug
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity579TestCase.java
Modified:
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity579TestCase.java
URL:
http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity579TestCase.java?rev=691448&r1=691447&r2=691448&view=diff
==============================================================================
---
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity579TestCase.java
(original)
+++
velocity/engine/trunk/src/test/org/apache/velocity/test/issues/Velocity579TestCase.java
Tue Sep 2 17:58:15 2008
@@ -39,10 +39,19 @@
assertEvalEquals("$foo.bar()", "$foo.bar()");
}
- public void testPublicMethodInheritedFromPrivateClass()
+ public void testPublicMethodInheritedFromPrivateClass() throws Exception
{
context.put("bar", new MyBar());
- assertEvalEquals("bar", "$bar.bar()");
+ // ugly hack to avoid failed test when running JDK 1.4 or earlier
+ try
+ {
+ Class.forName("java.lang.annotation.Annotation");
+ assertEvalEquals("bar", "$bar.bar()");
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ //ignore this test in jdk 1.4-
+ }
}
public static interface Foo