Skip to content

Commit 9d2348d

Browse files
committed
Remove deprecation warning for httpLoggingInterceptor config property.
1 parent 4ee2192 commit 9d2348d

File tree

6 files changed

+8
-33
lines changed

6 files changed

+8
-33
lines changed

pubnub-gson/pubnub-gson-api/src/main/java/com/pubnub/api/java/v2/PNConfiguration.kt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,10 @@ interface PNConfiguration : com.pubnub.api.v2.PNConfiguration {
252252
val certificatePinner: CertificatePinner?
253253

254254
/**
255-
* Sets a custom [HttpLoggingInterceptor] for logging network traffic.
255+
* Sets a custom [HttpLoggingInterceptor].
256256
*
257257
* @see [HttpLoggingInterceptor]
258258
*/
259-
@Deprecated(
260-
message = "This setting is deprecated. Use customLoggers instead",
261-
level = DeprecationLevel.WARNING
262-
)
263259
val httpLoggingInterceptor: HttpLoggingInterceptor?
264260

265261
/**
@@ -500,14 +496,10 @@ interface PNConfiguration : com.pubnub.api.v2.PNConfiguration {
500496
fun certificatePinner(certificatePinner: CertificatePinner?): Builder
501497

502498
/**
503-
* Sets a custom [HttpLoggingInterceptor] for logging network traffic.
499+
* Sets a custom [HttpLoggingInterceptor].
504500
*
505501
* @see [HttpLoggingInterceptor]
506502
*/
507-
@Deprecated(
508-
message = "This setting is deprecated. Use customLoggers instead",
509-
level = DeprecationLevel.WARNING
510-
)
511503
fun httpLoggingInterceptor(httpLoggingInterceptor: HttpLoggingInterceptor?): Builder
512504

513505
/**

pubnub-gson/pubnub-gson-impl/src/main/java/com/pubnub/internal/java/v2/PNConfigurationImpl.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,6 @@ class PNConfigurationImpl(
317317

318318
override var certificatePinner: CertificatePinner? = defaultConfiguration.certificatePinner
319319

320-
@Deprecated(
321-
message = "This setting is deprecated. Use customLoggers instead.",
322-
level = DeprecationLevel.WARNING
323-
)
324320
override fun httpLoggingInterceptor(httpLoggingInterceptor: HttpLoggingInterceptor?): Builder {
325321
this.httpLoggingInterceptor = httpLoggingInterceptor
326322
return this

pubnub-kotlin/pubnub-kotlin-core-api/src/jvmMain/kotlin/com/pubnub/api/v2/PNConfiguration.kt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,10 @@ actual interface PNConfiguration {
238238
val certificatePinner: CertificatePinner?
239239

240240
/**
241-
* Sets a custom [HttpLoggingInterceptor] for logging network traffic.
241+
* Sets a custom [HttpLoggingInterceptor].
242242
*
243243
* @see [HttpLoggingInterceptor]
244244
*/
245-
@Deprecated(
246-
message = "This setting is deprecated. Use customLoggers instead.",
247-
level = DeprecationLevel.WARNING
248-
)
249245
val httpLoggingInterceptor: HttpLoggingInterceptor?
250246

251247
/**
@@ -564,14 +560,10 @@ actual interface PNConfiguration {
564560
var certificatePinner: CertificatePinner?
565561

566562
/**
567-
* Sets a custom [HttpLoggingInterceptor] for logging network traffic.
563+
* Sets a custom [HttpLoggingInterceptor].
568564
*
569565
* @see [HttpLoggingInterceptor]
570566
*/
571-
@Deprecated(
572-
message = "This setting is deprecated. Use customLoggers instead",
573-
level = DeprecationLevel.WARNING
574-
)
575567
var httpLoggingInterceptor: HttpLoggingInterceptor?
576568

577569
/**

pubnub-kotlin/pubnub-kotlin-impl/src/integrationTest/kotlin/com/pubnub/api/integration/SubscribeIntegrationTests.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ class SubscribeIntegrationTests : BaseIntegrationTest() {
12541254
}
12551255

12561256
@Test
1257-
fun `shouldDeduplicateChannelSubscriptionsWhenSubscribingToSameChannelMultipleTimes`() {
1257+
fun shouldDeduplicateChannelSubscriptionsWhenSubscribingToSameChannelMultipleTimes() {
12581258
// given
12591259
val numberOfSubscribe = 4
12601260
// punbub.subscribe does subscribe to already subscribed channel so only two subscribe calls should occur. Handshake and actual subscribe.
@@ -1306,7 +1306,7 @@ class SubscribeIntegrationTests : BaseIntegrationTest() {
13061306
}
13071307

13081308
@Test
1309-
fun `heartbeatShouldDeduplicateChannelNameInUrlWhenSubscribingToSameChannelMultipleTimes`() {
1309+
fun heartbeatShouldDeduplicateChannelNameInUrlWhenSubscribingToSameChannelMultipleTimes() {
13101310
// given
13111311
val numberOfSubscribe = 4
13121312
val countDownLatch = CountDownLatch(2) // we want to verify second heartbeat URL
@@ -1347,14 +1347,13 @@ class SubscribeIntegrationTests : BaseIntegrationTest() {
13471347
val channelList = channelsParam.split(",").filter { it.isNotEmpty() }
13481348

13491349
assertEquals(1, channelList.count { it == testChannel })
1350-
13511350
} finally {
13521351
pubnub.forceDestroy()
13531352
}
13541353
}
13551354

13561355
@Test
1357-
fun `shouldDeduplicateChannelSubscriptionsWhenSubscribingToListOfTheSameChannels`() {
1356+
fun shouldDeduplicateChannelSubscriptionsWhenSubscribingToListOfTheSameChannels() {
13581357
// given
13591358
val countDownLatch = CountDownLatch(2) // Only two subscribe calls should occur. Handshake and actual subscribe.
13601359
var interceptedUrl: HttpUrl? = null

pubnub-kotlin/pubnub-kotlin-impl/src/main/kotlin/com/pubnub/internal/logging/ConfigurationLogger.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ object ConfigurationLogger {
7575
"proxySelector" to (configuration.proxySelector?.toString() ?: NOT_SET),
7676
"proxyAuthenticator" to (configuration.proxyAuthenticator?.toString() ?: NOT_SET),
7777
"maximumConnections" to (configuration.maximumConnections?.toString() ?: NOT_SET),
78-
"httpLoggingInterceptor" to (configuration.httpLoggingInterceptor?.let { "(@Deprecated) enabled (${it.level})" } ?: NOT_SET),
78+
"httpLoggingInterceptor" to (configuration.httpLoggingInterceptor?.toString() ?: NOT_SET),
7979
// SSL/TLS settings
8080
"sslSocketFactory" to (configuration.sslSocketFactory?.toString() ?: NOT_SET),
8181
"x509ExtendedTrustManager" to (configuration.x509ExtendedTrustManager?.toString() ?: NOT_SET),

pubnub-kotlin/pubnub-kotlin-impl/src/main/kotlin/com/pubnub/internal/v2/PNConfigurationImpl.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,6 @@ class PNConfigurationImpl(
189189

190190
override var certificatePinner: CertificatePinner? = defaultConfiguration.certificatePinner
191191

192-
@Deprecated(
193-
message = "This setting is deprecated. Use customLoggers instead.",
194-
level = DeprecationLevel.WARNING
195-
)
196192
override var httpLoggingInterceptor: HttpLoggingInterceptor? = defaultConfiguration.httpLoggingInterceptor
197193

198194
override var sslSocketFactory: SSLSocketFactory? = defaultConfiguration.sslSocketFactory

0 commit comments

Comments
 (0)