File tree 2 files changed +12
-8
lines changed
src/main/java/redis/clients/jedis
2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -3442,16 +3442,19 @@ public Long lastsave() {
3442
3442
* is switched off without the lost of any data. This is not guaranteed if the client uses simply
3443
3443
* {@link #save() SAVE} and then {@link #quit() QUIT} because other clients may alter the DB data
3444
3444
* between the two commands.
3445
- * @return Status code reply on error. On success nothing is returned since the server quits and
3446
- * the connection is closed.
3445
+ * @return {@code null}
3446
+ * @throws JedisException with the status code reply on error. On success nothing is thrown since
3447
+ * the server quits and the connection is closed.
3447
3448
*/
3448
3449
@ Override
3449
- public String shutdown () {
3450
+ public String shutdown () throws JedisException {
3450
3451
client .shutdown ();
3451
3452
String status ;
3452
3453
try {
3453
3454
status = client .getStatusCodeReply ();
3454
- } catch (JedisException ex ) {
3455
+ throw new JedisException (status );
3456
+ } catch (JedisConnectionException jce ) {
3457
+ // expected
3455
3458
status = null ;
3456
3459
}
3457
3460
return status ;
@@ -3461,8 +3464,8 @@ public String shutdown() {
3461
3464
public void shutdown (final SaveMode saveMode ) throws JedisException {
3462
3465
client .shutdown (saveMode );
3463
3466
try {
3464
- throw new JedisDataException (client .getStatusCodeReply ());
3465
- } catch (JedisConnectionException ex ) {
3467
+ throw new JedisException (client .getStatusCodeReply ());
3468
+ } catch (JedisConnectionException jce ) {
3466
3469
// expected
3467
3470
}
3468
3471
}
Original file line number Diff line number Diff line change @@ -134,9 +134,10 @@ public interface BasicCommands {
134
134
/**
135
135
* Stop all the client. Perform a SAVE (if one save point is configured). Flush the append only
136
136
* file if AOF is enabled quit the server
137
- * @return only in case of error.
137
+ * @return {@code null}
138
+ * @throws JedisException only in case of error.
138
139
*/
139
- String shutdown ();
140
+ String shutdown () throws JedisException ;
140
141
141
142
/**
142
143
* @see SaveMode
You can’t perform that action at this time.
0 commit comments