Skip to content
This repository was archived by the owner on Jun 8, 2024. It is now read-only.
This repository was archived by the owner on Jun 8, 2024. It is now read-only.

MappingsPoet crash when handling class named "package-info" #30

@thecatcore

Description

@thecatcore

Discovered while creating mappings for 18w19a, which contains two deobfuscated package-info files.

Error: Exception in thread "main" java.lang.IllegalArgumentException: not a valid name: package-info
    at com.squareup.javapoet.Util.checkArgument(Util.java:53)
    at com.squareup.javapoet.TypeSpec$Builder.<init>(TypeSpec.java:502)
    at com.squareup.javapoet.TypeSpec$Builder.<init>(TypeSpec.java:475)
    at com.squareup.javapoet.TypeSpec.interfaceBuilder(TypeSpec.java:148)
    at com.squareup.javapoet.TypeSpec.interfaceBuilder(TypeSpec.java:152)
    at net.fabricmc.mappingpoet.ClassBuilder.setupBuilder(ClassBuilder.java:156)
    at net.fabricmc.mappingpoet.ClassBuilder.<init>(ClassBuilder.java:86)
    at net.fabricmc.mappingpoet.Main.writeClass(Main.java:242)
    at net.fabricmc.mappingpoet.Main.lambda$generate$0(Main.java:95)
    at net.fabricmc.mappingpoet.Main.lambda$forEachClass$5(Main.java:171)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at net.fabricmc.mappingpoet.Main.forEachClass(Main.java:171)
    at net.fabricmc.mappingpoet.Main.generate(Main.java:95)
    at net.fabricmc.mappingpoet.Main.main(Main.java:89)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions