From dbc5dfd0b73ba54b027a7665731b72ea27859f0d Mon Sep 17 00:00:00 2001 From: Sourav Roy Date: Wed, 10 Jan 2024 20:56:56 +0000 Subject: [PATCH] Remove redundant setDetail --- .../com/homihq/db2rest/exception/InvalidColumnException.java | 1 - .../com/homihq/db2rest/exception/InvalidSchemaException.java | 1 - .../java/com/homihq/db2rest/exception/InvalidTableException.java | 1 - src/main/java/com/homihq/db2rest/exception/RpcException.java | 1 - 4 files changed, 4 deletions(-) diff --git a/src/main/java/com/homihq/db2rest/exception/InvalidColumnException.java b/src/main/java/com/homihq/db2rest/exception/InvalidColumnException.java index 7ac87927..9f417207 100644 --- a/src/main/java/com/homihq/db2rest/exception/InvalidColumnException.java +++ b/src/main/java/com/homihq/db2rest/exception/InvalidColumnException.java @@ -17,7 +17,6 @@ public InvalidColumnException(String tableName, String columnName) { private static ProblemDetail asProblemDetail(String message) { ProblemDetail problemDetail = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, message); problemDetail.setTitle("Invalid Column Error"); - problemDetail.setDetail(message); problemDetail.setType(URI.create("https://github.com/kdhrubo/db2rest/invalid-column")); problemDetail.setProperty("errorCategory", "Invalid-Column"); problemDetail.setProperty("timestamp", Instant.now()); diff --git a/src/main/java/com/homihq/db2rest/exception/InvalidSchemaException.java b/src/main/java/com/homihq/db2rest/exception/InvalidSchemaException.java index 3fa1bc40..d14edfe3 100644 --- a/src/main/java/com/homihq/db2rest/exception/InvalidSchemaException.java +++ b/src/main/java/com/homihq/db2rest/exception/InvalidSchemaException.java @@ -17,7 +17,6 @@ public InvalidSchemaException(String schemaName) { private static ProblemDetail asProblemDetail(String message) { ProblemDetail problemDetail = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, message); problemDetail.setTitle("Invalid Schema Error"); - problemDetail.setDetail(message); problemDetail.setType(URI.create("https://github.com/kdhrubo/db2rest/invalid-schema")); problemDetail.setProperty("errorCategory", "Invalid-Schema"); problemDetail.setProperty("timestamp", Instant.now()); diff --git a/src/main/java/com/homihq/db2rest/exception/InvalidTableException.java b/src/main/java/com/homihq/db2rest/exception/InvalidTableException.java index fef5af52..6e16d672 100644 --- a/src/main/java/com/homihq/db2rest/exception/InvalidTableException.java +++ b/src/main/java/com/homihq/db2rest/exception/InvalidTableException.java @@ -17,7 +17,6 @@ public InvalidTableException(String tableName) { private static ProblemDetail asProblemDetail(String message) { ProblemDetail problemDetail = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, message); problemDetail.setTitle("Invalid Table Error"); - problemDetail.setDetail(message); problemDetail.setType(URI.create("https://github.com/kdhrubo/db2rest/invalid-table")); problemDetail.setProperty("errorCategory", "Invalid-Table"); problemDetail.setProperty("timestamp", Instant.now()); diff --git a/src/main/java/com/homihq/db2rest/exception/RpcException.java b/src/main/java/com/homihq/db2rest/exception/RpcException.java index 6cf0c636..397fdc00 100644 --- a/src/main/java/com/homihq/db2rest/exception/RpcException.java +++ b/src/main/java/com/homihq/db2rest/exception/RpcException.java @@ -20,7 +20,6 @@ public RpcException(String subRoutineName, Map inParams) { private static ProblemDetail asProblemDetail(String message) { ProblemDetail problemDetail = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, message); problemDetail.setTitle("Invalid Procedure/Function name or IN parameter mismatch"); - problemDetail.setDetail(message); problemDetail.setType(URI.create("https://github.com/kdhrubo/db2rest/invalid-subroutine-request")); problemDetail.setProperty("errorCategory", "Invalid-SubRoutine-Request"); problemDetail.setProperty("timestamp", Instant.now());