JavaInterface.getClass() Throws Error

Description

This:

...throws:

No matching Method for getClass() found for java.nio.file.attribute.BasicFileAttributes

...but doesn't on ACF 11.

Because of this, some Java interoperability is impossible.

Attachments

2

Activity

Michael Offner 
21 August 2015 at 08:47

Adam Cameron 
21 August 2015 at 08:47

I guess this is in lieu of not being able to go `SomeInterface.class` (where here `class` is the keyword, not the file extension. Sorry that's a bit vague). They implemented a method on their proxy thing to wrap that up. I s'pose you need to do the same thing.

Michael Offner 
21 August 2015 at 08:40

Michael Offner 
21 August 2015 at 08:34

problem is that "getClass" is an instance method from java.lang.Object, but an interface does not extend java.lang.Object (an interface cannot extend a class) and you cannot create an instance, so what ACF is doing there is not really calling a "getClass" method that does not exists, this is more like the "init" method you can call on the JavaProxy object that then calls the constructor of the class.

Fixed

Details

Assignee

Reporter

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Fix versions

Affects versions

Priority

Created 20 August 2015 at 20:47
Updated 8 May 2020 at 19:54
Resolved 21 August 2015 at 08:54