Skip to content

ModelMapper.processJarPackage breaks on paths containing '+' #4710

@laureanobrs

Description

@laureanobrs

Describe the bug

The ModelMapper.processJarPackage method uses URLDecoder.decode, which turns + into spaces, producing an invalid filesystem path.

That causes ModelMapper.initModelMap() to fail, so the prebuilt model map is left empty for built-in resources like v1/ConfigMap.

This use case stems from Bazel 8, where the format of canonical repo names has changed to use plus (+) instead of tilde (~):

.../external/rules_jvm_external++maven+maven/io/kubernetes/client-java-api/26.0.0/processed_client-java-api-26.0.0.jar

This seems related to #3981, but the trigger here is not a nested jar. It is a repository path containing +.

Client Version
26.0.0

Kubernetes Version
1.35.1

Java Version
Java 17

To Reproduce
NA

Expected behavior
Prebuilt model map is not empty and contains pre-built kubernetes models from classpath.

KubeConfig
NA

Server (please complete the following information):

  • OS: -
  • Environment: -
  • Cloud: -

Additional context
NA

Metadata

Metadata

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