Skip to content

Commit

Permalink
try to fix NPE
Browse files Browse the repository at this point in the history
This is an attempt to fix the NPE in case project is null, which seemed to be the case in an m2e Eclipse environment

Signed-off-by: Christoph Rueger <[email protected]>
  • Loading branch information
chrisrueger committed Dec 1, 2024
1 parent abad56e commit bd6c0dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions biz.aQute.resolve/src/biz/aQute/resolve/RunResolution.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ public static RunResolution resolve(Project project, Processor actualProperties,
*/
public static RunResolution resolve(Project project, Processor actualProperties,
Collection<ResolutionCallback> callbacks, ResolverLogger resolverLogger) {
if (ResolveMode.never.toString()
.equals(project.get(Constants.RESOLVE))) {
if (ResolveMode.never.name()
.equals(actualProperties.get(Constants.RESOLVE))) {
return new RunResolution(project, actualProperties, new UnsupportedOperationException(String
.format("Resolve is forbidden here, as %s is set to %s", Constants.RESOLVE,
ResolveMode.never.toString())),
ResolveMode.never.name())),
null);
}
if (callbacks == null)
Expand Down

0 comments on commit bd6c0dd

Please sign in to comment.