File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/main/java/com/github/theholywaffle/teamspeak3 Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 27
27
*/
28
28
29
29
import com .github .theholywaffle .teamspeak3 .TS3Query .FloodRate ;
30
- import com .github .theholywaffle .teamspeak3 .api .ConnectionHandler ;
30
+ import com .github .theholywaffle .teamspeak3 .api .reconnect . ConnectionHandler ;
31
31
32
32
import java .util .logging .Level ;
33
33
@@ -42,6 +42,7 @@ public class TS3Config {
42
42
private ConnectionHandler connectionHandler = ConnectionHandler .DISCONNECT ;
43
43
44
44
public TS3Config setHost (String host ) {
45
+ if (host == null ) throw new NullPointerException ("host cannot be null!" );
45
46
this .host = host ;
46
47
return this ;
47
48
}
@@ -60,6 +61,7 @@ int getQueryPort() {
60
61
}
61
62
62
63
public TS3Config setFloodRate (FloodRate rate ) {
64
+ if (rate == null ) throw new NullPointerException ("rate cannot be null!" );
63
65
this .floodRate = rate ;
64
66
return this ;
65
67
}
@@ -69,6 +71,7 @@ FloodRate getFloodRate() {
69
71
}
70
72
71
73
public TS3Config setDebugLevel (Level level ) {
74
+ if (level == null ) throw new NullPointerException ("level cannot be null!" );
72
75
this .level = level ;
73
76
return this ;
74
77
}
@@ -112,6 +115,7 @@ int getCommandTimeout() {
112
115
}
113
116
114
117
public TS3Config setConnectionHandler (ConnectionHandler connectionHandler ) {
118
+ if (connectionHandler == null ) throw new NullPointerException ("connectionHandler cannot be null!" );
115
119
this .connectionHandler = connectionHandler ;
116
120
return this ;
117
121
}
You can’t perform that action at this time.
0 commit comments