Skip to content

Commit

Permalink
Do cosmetic code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Dec 15, 2022
1 parent e2a0c98 commit 78e1db7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
package com.evolveum.midpoint.provisioning.impl.resources;

import static com.evolveum.midpoint.prism.Referencable.getOid;
import static com.evolveum.midpoint.util.MiscUtil.configCheck;
import static com.evolveum.midpoint.util.MiscUtil.stateCheck;

Expand Down Expand Up @@ -136,15 +137,15 @@ private ConnectorSpec(@NotNull ResourceType resource) {
/**
* To be used when we are sure to deal with fully expanded, non-abstract resources.
*/
public @NotNull String getConnectorOidRequired() {
@NotNull String getConnectorOidRequired() {
return MiscUtil.requireNonNull(
getConnectorOid(),
() -> new IllegalStateException("Expected to have connector OID but there was none; in " + this));
}

public abstract @Nullable PrismContainer<ConnectorConfigurationType> getConnectorConfiguration();

public @NotNull ConfiguredConnectorCacheKey getCacheKey() {
@NotNull ConfiguredConnectorCacheKey getCacheKey() {
return new ConfiguredConnectorCacheKey(resource.getOid(), getConnectorName());
}

Expand Down Expand Up @@ -255,8 +256,7 @@ public ItemPath getBasePath() {

@Override
public @Nullable String getConnectorOid() {
ObjectReferenceType ref = definitionBean.getConnectorRef();
return ref != null ? ref.getOid() : null;
return getOid(definitionBean.getConnectorRef());
}

@Override
Expand Down

0 comments on commit 78e1db7

Please sign in to comment.