8000 Refactor · MladenMitev/arangodb-java-driver@1791d20 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1791d20

Browse files
author
mpv1989
committed
Refactor
1 parent 02a64ff commit 1791d20

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

src/main/java/com/arangodb/ArangoRoute.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,47 +74,53 @@ public interface ArangoRoute {
7474
* Performs a DELETE request to the given URL and returns the server response.
7575
*
7676
* @return server response
77+
* @throws ArangoDBException
7778
*/
78-
Response delete();
79+
Response delete() throws ArangoDBException;
7980

8081
/**
8182
* Performs a GET request to the given URL and returns the server response.
8283
*
8384
* @return server response
85+
* @throws ArangoDBException
8486
*/
8587

86-
Response get();
88+
Response get() throws ArangoDBException;
8789

8890
/**
8991
* Performs a HEAD request to the given URL and returns the server response.
9092
*
9193
* @return server response
94+
* @throws ArangoDBException
9295
*/
9396

94-
Response head();
97+
Response head() throws ArangoDBException;
9598

9699
/**
97100
* Performs a PATCH request to the given URL and returns the server response.
98101
*
99102
* @return server response
103+
* @throws ArangoDBException
100104
*/
101105

102-
Response patch();
106+
Response patch() throws ArangoDBException;
103107

104108
/**
105109
* Performs a POST request to the given URL and returns the server response.
106110
*
107111
* @return server response
112+
* @throws ArangoDBException
108113
*/
109114

110-
Response post();
115+
Response post() throws ArangoDBException;
111116

112117
/**
113118
* Performs a PUT request to the given URL and returns the server response.
114119
*
115120
* @return server response
121+
* @throws ArangoDBException
116122
*/
117123

118-
Response put();
124+
Response put() throws ArangoDBException;
119125

120126
}

src/main/java/com/arangodb/internal/ArangoRouteImpl.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import java.util.Map;
2424

25+
import com.arangodb.ArangoDBException;
2526
import com.arangodb.ArangoRoute;
2627
import com.arangodb.internal.ArangoExecutor.ResponseDeserializer;
2728
import com.arangodb.velocypack.exception.VPackException;
@@ -72,32 +73,32 @@ public Response deserialize(final Response response) throws VPackException {
7273
}
7374

7475
@Override
75-
public Response delete() {
76+
public Response delete() throws ArangoDBException {
7677
return request(RequestType.DELETE);
7778
}
7879

7980
@Override
80-
public Response get() {
81+
public Response get() throws ArangoDBException {
8182
return request(RequestType.GET);
8283
}
8384

8485
@Override
85-
public Response head() {
86+
public Response head() throws ArangoDBException {
8687
return request(RequestType.HEAD);
8788
}
8889

8990
@Override
90-
public Response patch() {
91+
public Response patch() throws ArangoDBException {
9192
return request(RequestType.PATCH);
9293
}
9394

9495
@Override
95-
public Response post() {
96+
public Response post() throws ArangoDBException {
9697
return request(RequestType.POST);
9798
}
9899

99100
@Override
100-
public Response put() {
101+
public Response put() throws ArangoDBException {
101102
return request(RequestType.PUT);
102103
}
103104

0 commit comments

Comments
 (0)
0