[MENFORCER-503] requireOS cause NPE with Maven 3.9.7 (original) (raw)
- Type:
Bug
- Status: Closed
- Priority:
Critical
- Resolution: Fixed
- Affects Version/s: None
In rule requireOS we use: org.apache.maven.model.profile.activation.ProfileActivator#isActive
as
activator.isActive(createProfile(), null, null);
so provided context is null ... but not Maven use context without protecting it
From docs:
/**
- Determines whether the specified profile is active in the given activator context.
- @param profile The profile whose activation status should be determined, must not be {@code null}.
- @param context The environmental context used to determine the activation status of the profile, must not be
{@code null}.- @param problems The container used to collect problems (e.g. bad syntax) that were encountered, must not be
{@code null}.- @return {@code true} if the profile is active, {@code false} otherwise. */ boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems );
So enforcer use it in wrong way.
is related to
MNG-5726 Update OS Activation To Allow Wildcards In OS Version
- Closed
links to