Skip to content

Double extensions in names are treated as packages in "vars" in Shared Libraries #712

@leo-laposte

Description

@leo-laposte

Jenkins and plugins versions report

N/A

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows 11 on the dev. machine

Reproduction steps

  1. Setup a project
  2. Create a groovy file with another added extension (Test.jnk.groovy for example)
  3. Try loading the script

Expected Results

The script should be loaded as a Groovy metaclass, but replacing dots in the name by another token (underscores, for example, are used on Kotlin's side if I'm correct), such as Test_jnk.

Actual Results

Not making any replacements names the class "jnk" under the "Test" package (Test.jnk).

Anything else?

This has only been tested in the context of shared library loading.

Are you interested in contributing a fix?

I could take some time to PR something that fixes this, if contributors think that the fix is as straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions