Skip to content

NPE in AuthorizationEntity.getResourceMatcher() #36343

@korthout

Description

@korthout

Description

#36114 (comment)

public short getResourceMatcher() {
return resourceMatcher;
}
public AuthorizationEntity setResourceMatcher(final short resourceMatcher) {
this.resourceMatcher = resourceMatcher;
return this;
}

this.resourceMatcher is a boxed Short and can be null, but these methods require an unboxed short which is implemented by calling java.lang.Short.shortValue() on it. But, it's null and so it leads to an NPE:

java.lang.NullPointerException: Cannot invoke "java.lang.Short.shortValue()" because "this.resourceMatcher" is null
	at io.camunda.webapps.schema.entities.usermanagement.AuthorizationEntity.getResourceMatcher(AuthorizationEntity.java:55)
	at io.camunda.search.clients.transformers.entity.AuthorizationEntityTransformer.apply(AuthorizationEntityTransformer.java:27)
	at io.camunda.search.clients.transformers.entity.AuthorizationEntityTransformer.apply(AuthorizationEntityTransformer.java:14)

Steps to reproduce

🤷

Current behavior

NPE is thrown

Expected behavior

No NPE is thrown

Environment

SaaS & SM

Version

  • Component Version: [e.g. 2.0.0]

Rootcause

No response

Solution ideas

No response

Dev -> QA handover

  • Resources:
  • Versions to validate:
  • Release version (in which version this feature will be released):

Links

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions