You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <de...@velocity.apache.org> on 2008/09/03 02:47:44 UTC

[jira] Commented: (VELOCITY-70) public members inherted from non-public classes are not valid references

    [ https://issues.apache.org/jira/browse/VELOCITY-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627870#action_12627870 ] 

Nathan Bubna commented on VELOCITY-70:
--------------------------------------

@#%! So, in hopes of creating a beta1 test build, i switch to java 1.4.2 and tried running things. apart from the various 1.5-isms that snuck past me, i also discovered that the test case for this bugger fails in Java 1.4.x.

Testcase: testPublicMethodInheritedFromPrivateClass took 0.031 sec
FAILED
expected:<bar> but was:<$bar.bar()>
junit.framework.ComparisonFailure: expected:<bar> but was:<$bar.bar()>
at org.apache.velocity.test.BaseEvalTestCase.assertEvalEquals(BaseEvalTestCase.java:85)
at org.apache.velocity.test.issues.Velocity579TestCase.testPublicMethodInheritedFromPrivateClass(Velocity579TestCase.java:45)

Since this appears to a JDK bug that is fixed in later versions, i am leaving this resolved.  I'll just adapt the testcase to ignore this when running on a pre 1.5 jdk.  I don't see us ever working around this since it works in newer JDKs.

> public members inherted from non-public classes are not valid references
> ------------------------------------------------------------------------
>
>                 Key: VELOCITY-70
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-70
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Operating System: All
> Platform: PC
>            Reporter: jeff292
>             Fix For: 1.6
>
>         Attachments: velocity_test.zip
>
>
> Hi there,
> I encountered a problem with Velocity when invoking inherited methods of a Java 
> class. I get the 
> error "org.apache.velocity.runtime.exception.ReferenceException: reference : 
> template = screens/Details.vm [line 48,column 1] : $class.getFullName() is not 
> a valid reference" if I want to invoke the "FullName" method of the "class" 
> object. This method is inherited from a superior class. If I call a method 
> defined directly in this class, everything works fine. If I obtain the name of 
> the "class" object, I get the correct name.
> It would be nice, if anyone could help me on this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org