NomadCloud redefines the name attribute as a private, whereas the parent class (via AbastractCloudImpl) defines it as public.
This creates a situation where:
When Jenkins starts, it picks up the configuration from its configuration file
It loads the relevant Clouds objects configured and deserialize somehow the configuration into these objects
This populate the private name field of the concrete NomadCloud object, and shadows the public name field of the parent class
There's now a situation where, considering we have a cloud object of type NomadCloud:
cloud.name is null (it's the public name field of the parent class)
cloud.getName() returns the actual name of the NomadCloud object
This triggers unrelated failures many other Cloud-like plugins which are calling the public Jenkins.CloudList.getByName() method because the name field is now null and c.name.equals(name) raises a NullPointerException.
NomadCloud redefines the
name
attribute as a private, whereas the parent class (viaAbastractCloudImpl
) defines it as public.This creates a situation where:
Cloud
s objects configured and deserialize somehow the configuration into these objectsname
field of the concreteNomadCloud
object, and shadows the publicname
field of the parent classcloud
object of typeNomadCloud
:cloud.name
is null (it's the publicname
field of the parent class)cloud.getName()
returns the actual name of theNomadCloud
objectThis triggers unrelated failures many other Cloud-like plugins which are calling the public
Jenkins.CloudList.getByName()
method because thename
field is nownull
andc.name.equals(name)
raises aNullPointerException
.