Skip to content

Commit 92358fa

Browse files
committed
fixup! Refactor specialized exception constructors
1 parent 08950b4 commit 92358fa

13 files changed

+3
-237
lines changed

solid/src/main/java/com/inrupt/client/solid/BadRequestException.java

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,6 @@ public class BadRequestException extends SolidClientException {
3636

3737
public static final int STATUS_CODE = HttpStatus.BAD_REQUEST;
3838

39-
/**
40-
* Create a BadRequestException exception.
41-
*
42-
* @param message the message
43-
* @param uri the uri
44-
* @param headers the response headers
45-
* @param body the body
46-
* @deprecated
47-
*/
48-
public BadRequestException(
49-
final String message,
50-
final URI uri,
51-
final Headers headers,
52-
final String body) {
53-
super(message, uri, STATUS_CODE, headers, body);
54-
}
55-
5639
/**
5740
* Create a BadRequestException exception.
5841
*
@@ -64,10 +47,9 @@ public BadRequestException(
6447
*/
6548
public BadRequestException(
6649
final String message,
67-
final ProblemDetails pd,
6850
final URI uri,
6951
final Headers headers,
7052
final String body) {
71-
super(message, pd, uri, headers, body);
53+
super(message, uri, HttpStatus.BAD_REQUEST, headers, body);
7254
}
7355
}

solid/src/main/java/com/inrupt/client/solid/ConflictException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class ConflictException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public ConflictException(
4948
final String message,
@@ -52,22 +51,4 @@ public ConflictException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create a ConflictException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public ConflictException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

solid/src/main/java/com/inrupt/client/solid/ForbiddenException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class ForbiddenException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public ForbiddenException(
4948
final String message,
@@ -52,22 +51,4 @@ public ForbiddenException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create a ForbiddenException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public ForbiddenException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

solid/src/main/java/com/inrupt/client/solid/GoneException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class GoneException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public GoneException(
4948
final String message,
@@ -52,22 +51,4 @@ public GoneException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create a GoneException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public GoneException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

solid/src/main/java/com/inrupt/client/solid/InternalServerErrorException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class InternalServerErrorException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public InternalServerErrorException(
4948
final String message,
@@ -52,22 +51,4 @@ public InternalServerErrorException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create an InternalServerErrorException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public InternalServerErrorException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

solid/src/main/java/com/inrupt/client/solid/MethodNotAllowedException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class MethodNotAllowedException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public MethodNotAllowedException(
4948
final String message,
@@ -52,22 +51,4 @@ public MethodNotAllowedException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create a MethodNotAllowedException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public MethodNotAllowedException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

solid/src/main/java/com/inrupt/client/solid/NotAcceptableException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class NotAcceptableException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public NotAcceptableException(
4948
final String message,
@@ -52,22 +51,4 @@ public NotAcceptableException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create a NotAcceptableException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public NotAcceptableException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

solid/src/main/java/com/inrupt/client/solid/NotFoundException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class NotFoundException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public NotFoundException(
4948
final String message,
@@ -52,22 +51,4 @@ public NotFoundException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create a NotFoundException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public NotFoundException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

solid/src/main/java/com/inrupt/client/solid/PreconditionFailedException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class PreconditionFailedException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public PreconditionFailedException(
4948
final String message,
@@ -52,22 +51,4 @@ public PreconditionFailedException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create a PreconditionFailedException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public PreconditionFailedException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

solid/src/main/java/com/inrupt/client/solid/TooManyRequestsException.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public class TooManyRequestsException extends SolidClientException {
4343
* @param uri the uri
4444
* @param headers the response headers
4545
* @param body the body
46-
* @deprecated
4746
*/
4847
public TooManyRequestsException(
4948
final String message,
@@ -52,22 +51,4 @@ public TooManyRequestsException(
5251
final String body) {
5352
super(message, uri, STATUS_CODE, headers, body);
5453
}
55-
56-
/**
57-
* Create a TooManyRequestsException exception.
58-
*
59-
* @param message the message
60-
* @param pd the ProblemDetails instance
61-
* @param uri the uri
62-
* @param headers the response headers
63-
* @param body the body
64-
*/
65-
public TooManyRequestsException(
66-
final String message,
67-
final ProblemDetails pd,
68-
final URI uri,
69-
final Headers headers,
70-
final String body) {
71-
super(message, pd, uri, headers, body);
72-
}
7354
}

0 commit comments

Comments
 (0)