Skip to content

Commit 872c96f

Browse files
committed
Remove deprecated methods/constructors
1 parent b15f931 commit 872c96f

File tree

3 files changed

+5
-71
lines changed

3 files changed

+5
-71
lines changed

src/main/java/org/kitteh/irc/client/library/Client.java

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public interface Client extends ClientLinked {
9696
* Builds {@link Client}s. Create a builder with {@link Client#builder()}.
9797
* <p>
9898
* The default built client connects securely via port 6697. See {@link
99-
* Server#secure(boolean)} to disable, or the other secure-prefixed methods in
99+
* Server##port(int, Server.SecurityType)} to disable, or the other secure-prefixed methods in
100100
* this builder to fully utilize the feature. Note that the default
101101
* TrustManagerFactory relies on your local trust store. The default Oracle
102102
* trust store does not accept self-signed certificates.
@@ -174,18 +174,6 @@ enum SecurityType {
174174
*/
175175
@NonNull Server host(@NonNull String host);
176176

177-
/**
178-
* Sets the server port to which the client will connect.
179-
* <p>
180-
* By default, the port is 6697.
181-
*
182-
* @param port IRC server port
183-
* @return this builder
184-
* @deprecated use {@link #port(int, SecurityType)} instead
185-
*/
186-
@Deprecated
187-
@NonNull Server port(int port);
188-
189177
/**
190178
* Sets the server port to which the client will connect and
191179
* determines TLS setting. By default, the port is 6697 and the
@@ -207,27 +195,12 @@ enum SecurityType {
207195
*/
208196
@NonNull Server password(@Nullable String password);
209197

210-
/**
211-
* Sets whether the client connects via TLS.
212-
* <p>
213-
* Note that by default the TrustManager used does not accept the
214-
* certificates of many popular networks. You must use {@link
215-
* #secureTrustManagerFactory(TrustManagerFactory)} to set your own
216-
* TrustManagerFactory.
217-
*
218-
* @param secure true for TLS
219-
* @return this builder
220-
* @deprecated use {@link #port(int, SecurityType)} instead
221-
*/
222-
@Deprecated
223-
@NonNull Server secure(boolean secure);
224-
225198
/**
226199
* Sets the key for TLS connection.
227200
*
228201
* @param keyCertChainFile X.509 certificate chain file in PEM format
229202
* @return this builder
230-
* @see #secure(boolean)
203+
* @see #port(int, SecurityType)
231204
*/
232205
@NonNull Server secureKeyCertChain(@Nullable Path keyCertChainFile);
233206

@@ -236,7 +209,7 @@ enum SecurityType {
236209
*
237210
* @param keyFile PKCS#8 private key file in PEM format
238211
* @return this builder
239-
* @see #secure(boolean)
212+
* @see #port(int, SecurityType)
240213
*/
241214
@NonNull Server secureKey(@Nullable Path keyFile);
242215

@@ -245,7 +218,7 @@ enum SecurityType {
245218
*
246219
* @param password password for private key
247220
* @return this builder
248-
* @see #secure(boolean)
221+
* @see #port(int, SecurityType)
249222
*/
250223
@NonNull Server secureKeyPassword(@Nullable String password);
251224

@@ -255,7 +228,7 @@ enum SecurityType {
255228
* @param factory trust manager supplier
256229
* @return this builder
257230
* @throws IllegalArgumentException if providing an insecure factory while the STS storage manager is set
258-
* @see #secure(boolean)
231+
* @see #port(int, SecurityType)
259232
*/
260233
@NonNull Server secureTrustManagerFactory(@Nullable TrustManagerFactory factory);
261234

src/main/java/org/kitteh/irc/client/library/defaults/DefaultBuilder.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,6 @@ private class ServerImpl implements Server {
100100
return this;
101101
}
102102

103-
@Deprecated
104-
@Override
105-
public @NonNull Server port(int port) {
106-
DefaultBuilder.this.serverHostWithPort = DefaultBuilder.this.serverHostWithPort.withPort(DefaultBuilder.this.isValidPort(port));
107-
return this;
108-
}
109-
110103
@Override
111104
public @NonNull Server port(int port, @NonNull SecurityType security) {
112105
DefaultBuilder.this.serverHostWithPort = DefaultBuilder.this.serverHostWithPort.withPort(DefaultBuilder.this.isValidPort(port));
@@ -120,13 +113,6 @@ private class ServerImpl implements Server {
120113
return this;
121114
}
122115

123-
@Deprecated
124-
@Override
125-
public @NonNull Server secure(boolean secure) {
126-
DefaultBuilder.this.secure = secure;
127-
return this;
128-
}
129-
130116
@Override
131117
public @NonNull Server secureKeyCertChain(@Nullable Path keyCertChainFile) {
132118
DefaultBuilder.this.secureKeyCertChain = keyCertChainFile;

src/main/java/org/kitteh/irc/client/library/event/channel/ChannelTopicEvent.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,6 @@ public ChannelTopicEvent(@NonNull Client client, @NonNull ServerMessage sourceMe
5757
this.updated = updated;
5858
}
5959

60-
/**
61-
* Creates the event.
62-
*
63-
* @param client client for which this is occurring
64-
* @param sourceMessage source message
65-
* @param channel channel the topic is about
66-
* @param updated if this is a new change
67-
* @deprecated Use new constructor
68-
*/
69-
@Deprecated
70-
public ChannelTopicEvent(@NonNull Client client, @NonNull ServerMessage sourceMessage, @NonNull Channel channel, boolean updated) {
71-
this(client, sourceMessage, channel, null, null, updated);
72-
}
73-
74-
/**
75-
* Gets the channel's topic.
76-
*
77-
* @return the channel topic
78-
* @deprecated Use {@link #getNewTopic()} and {@link #getOldTopic()}
79-
*/
80-
@Deprecated
81-
public Channel.@NonNull Topic getTopic() {
82-
return this.getChannel().getTopic();
83-
}
84-
8560
public Channel.@NonNull Topic getNewTopic() {
8661
return this.newTopic;
8762
}

0 commit comments

Comments
 (0)