OrangeExtensions icon indicating copy to clipboard operation
OrangeExtensions copied to clipboard

FilesEvent has incorrect signature

Open liamsharp opened this issue 10 years ago • 8 comments

Thanks for making these stub available, much appreciated!

In com.apple.eawt.AppEvent the signature for FilesEvent.getFiles() is:

public List getFiles()

If I decompile the AppleJavaExtensions its:

public List<File> getFiles()

liamsharp avatar Aug 18 '15 09:08 liamsharp

That's the same signature?

Sciss avatar Aug 18 '15 09:08 Sciss

Just testing :-) Sorry, signature should be:

public List<File> getFiles()

which is in the jar from here:

https://developer.apple.com/legacy/library/samplecode/AppleJavaExtensions/Introduction/Intro.html

liamsharp avatar Aug 18 '15 10:08 liamsharp

Sorry - having a fight with markdown:

public List<File> getFiles()

liamsharp avatar Aug 18 '15 10:08 liamsharp

This was probably non-generic in the original Java 1.4 times, generics only came with Java 1.5. With respect to runtime these are equivalent due to type erasure, but I agree that since the project states it was updated for Java 5 and 6, one should probably add the element type. Until then you can always cast the result.

Sciss avatar Aug 18 '15 10:08 Sciss

I've rev'ed the code to 1.6 to resolve this - first time I've done a pull request so let me know if I've missed anything!

liamsharp avatar Sep 10 '15 16:09 liamsharp

@Sciss I'm hoping my pull request will be merged and the results pushed to maven central - do you think thats likely? Or should I create my own project and upload to maven central under my own groupId? I did consider this but thought the right thing would be to contribute to the OrangeExtensions.

liamsharp avatar Sep 14 '15 15:09 liamsharp

@liamsharp - this is not my repository, so you'll have to wait for @ymasory

Sciss avatar Sep 14 '15 22:09 Sciss

Hi @ymasory sorry to bug you on this - any chance of a new build being pushed with the 1.6 changes?

liamsharp avatar Oct 04 '15 18:10 liamsharp