Commit 41c625b4 authored by devesh bajpai's avatar devesh bajpai
Browse files

fix review comments

parent 1f00f392
Pipeline #28638 failed with stages
in 6 minutes and 45 seconds
......@@ -42,8 +42,7 @@ public class MappingStoreImpl implements MappingStore {
private RequestIdentity requestIdentity;
@Override
public List<MappingInfo> getMappingInfo(
final String authority, final String entity, final String source, final String majorVersion) {
public List<MappingInfo> getMappingInfo(final String authority, final String entity, final String source, final String majorVersion) {
String schemaKind = String.join(Constants.COLON_SEPARATOR, authority, source, entity, majorVersion);
SqlQuerySpec query = new SqlQuerySpec(
......
......@@ -141,7 +141,6 @@ private String getAuthKey(TenantInfo tenantInfo) {
String.format(ERROR_LOG, StorageConstants.STORAGE_SERVICE_UNAVAILABLE, response.getException()));
}
} else if (status == HttpStatus.SC_CREATED) {
LOGGER.warn(response.getException());
throw new ApplicationException(
String.format(ERROR_LOG, StorageConstants.RAW_RECORD_NOT_CREATED, response.getException()));
}
......
......@@ -155,19 +155,11 @@ public class RelationshipBlockHandler {
return Optional.ofNullable(null);
}
private Optional<String> getTargetKind(String kind) throws NotFoundException, ApplicationException {
private Optional<String> getTargetKind(String kind) {
Optional<MappingInfo> mappingInfoOption = getLatestMappingInfoWithRelatedAuthority(kind);
if (mappingInfoOption.isPresent()) {
MappingInfo mappingInfo = mappingInfoOption.get();
SchemaIdentity targetSchemaIdentity = SchemaIdentity
.builder()
.authority(mappingInfo.getTargetSchemaAuthority())
.source(mappingInfo.getTargetSchemaSource())
.entityType(mappingInfo.getTargetEntityType())
.schemaVersionMajor(mappingInfo.getTargetSchemaMajorVersion())
.build();
return targetSchemaUtil.getTargetSchemaKind(targetSchemaIdentity);
return Optional.ofNullable(mappingInfoOption.get().getTargetSchemaKind());
} else {
return Optional.empty();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment