autaut03 / kottle

Kotlin language provider for Forge 1.13.2+
GNU Lesser General Public License v3.0
30 stars 13 forks source link

Correct JVM signature used for annotation return type #5

Closed ejektaflex closed 5 years ago

ejektaflex commented 5 years ago

when comparing ForgeSPI 0.6.0 and 0.10.0, some time between those two versions ModFileScanData::getAnnotations changed it's return type from List<AnnotationData> to Set<AnnotationData>. While the code in Kottle is still valid, it was calling a NoSuchMethodError because the return type of getAnnotations was expected to be a List, so the JVM signature was mismatched (see #4). A simple rebuild of the project would have fixed this problem, though I added in a ::toList method for safety in the future, in case the stated change is reverted.

autaut03 commented 5 years ago

Hey! Yes, you're right, in 0.10.0 it was changed to be Set<>. Thanks for the fix, I'll build and publish shortly after :)