Skip to content

ReflectionConfigGenerator should not generate config for picocli.CommandLine$Model$ObjectScope #691

@remkop

Description

@remkop

The code changes for supporting @ArgGroup repeating argument groups have broken some assumptions that were not covered in tests for ReflectionConfigGenerator.

As a result, the generated config JSON contained a block for picocli.CommandLine$Model$ObjectScope with @Option and @Parameters-annotated methods of the annotated user object. This causes a runtime error when executing the native image since those methods do not exist on the ObjectScope class.

The ReflectionConfigGenerator should not generate a block at all for picocli.CommandLine$Model$ObjectScope: this class is not accessed reflectively.

Example:

  {
    "name" : "picocli.CommandLine$Model$ObjectScope",
    "allDeclaredConstructors" : true,
    "allPublicConstructors" : true,
    "allDeclaredMethods" : true,
    "allPublicMethods" : true,
    "methods" : [
      { "name" : "setMinimum", "parameterTypes" : ["int"] },
      { "name" : "setOtherFiles", "parameterTypes" : ["java.util.List"] }
    ]
  },

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions