Sitelet https://github.com/BhuvanaNat/java/commit/c15f069bda318fa714b650622e0419134c369060
Skip to content

Commit c15f069

Browse files
author
Devendra
committed
backporting #16683 to develop branch
1 parent c704359 commit c15f069

2 files changed

Lines changed: 21 additions & 24 deletions

File tree

‎java/srcPubnubApi/com/pubnub/api/PubnubCore.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ protected Object _publish(Hashtable args, boolean sync) {
219219
}
220220
} else {
221221
if (message instanceof String) {
222+
msgStr = msgStr.replaceAll("\"", "\\\\\"");
222223
msgStr = "\"" + msgStr + "\"";
223224
}
224225
}

‎scala/scala-pubnub-tests/src/tests/scala/com/pubnub/api/tests/subscribev2.scala‎

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2989,21 +2989,21 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
29892989
}
29902990

29912991
override def errorCallback(channel1: String, error: PubnubError) {
2992-
assertTrue(false)
2992+
assertTrue(error.toString(), false)
29932993
}
29942994

29952995
})
29962996
}
29972997

29982998
override def errorCallback(channel1: String, error: PubnubError) {
2999-
assertTrue(false)
2999+
assertTrue(error.toString(), false)
30003000
}
30013001

30023002
})
30033003
}
30043004

30053005
override def errorCallback(channel1: String, error: PubnubError) {
3006-
assertTrue(false)
3006+
assertTrue(error.toString(), false)
30073007
}
30083008
})
30093009

@@ -3035,8 +3035,7 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
30353035
}
30363036

30373037
override def errorCallback(channel: String, error: PubnubError) {
3038-
assert(false)
3039-
testObj.test(false)
3038+
assertTrue(error.toString(), false)
30403039
}
30413040
})
30423041

@@ -3107,21 +3106,21 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
31073106
}
31083107

31093108
override def errorCallback(channel1: String, error: PubnubError) {
3110-
assertTrue(false)
3109+
assertTrue(error.toString(), false)
31113110
}
31123111

31133112
})
31143113
}
31153114

31163115
override def errorCallback(channel1: String, error: PubnubError) {
3117-
assertTrue(false)
3116+
assertTrue(error.toString(), false)
31183117
}
31193118

31203119
})
31213120
}
31223121

31233122
override def errorCallback(channel1: String, error: PubnubError) {
3124-
assertTrue(false)
3123+
assertTrue(error.toString(), false)
31253124
}
31263125
})
31273126

@@ -3144,8 +3143,7 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
31443143
}
31453144

31463145
override def errorCallback(channel: String, error: PubnubError) {
3147-
assert(false)
3148-
testObj.test(false)
3146+
assertTrue(error.toString(), false)
31493147
}
31503148
})
31513149

@@ -3217,21 +3215,21 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
32173215
}
32183216

32193217
override def errorCallback(channel1: String, error: PubnubError) {
3220-
assertTrue(false)
3218+
assertTrue(error.toString(), false)
32213219
}
32223220

32233221
})
32243222
}
32253223

32263224
override def errorCallback(channel1: String, error: PubnubError) {
3227-
assertTrue(false)
3225+
assertTrue(error.toString(), false)
32283226
}
32293227

32303228
})
32313229
}
32323230

32333231
override def errorCallback(channel1: String, error: PubnubError) {
3234-
assertTrue(false)
3232+
assertTrue(error.toString(), false)
32353233
}
32363234
})
32373235

@@ -3254,8 +3252,7 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
32543252
}
32553253

32563254
override def errorCallback(channel: String, error: PubnubError) {
3257-
assert(false)
3258-
testObj.test(false)
3255+
assertTrue(error.toString(), false)
32593256
}
32603257
})
32613258

@@ -3327,21 +3324,21 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
33273324
}
33283325

33293326
override def errorCallback(channel1: String, error: PubnubError) {
3330-
assertTrue(false)
3327+
assertTrue(error.toString(), false)
33313328
}
33323329

33333330
})
33343331
}
33353332

33363333
override def errorCallback(channel1: String, error: PubnubError) {
3337-
assertTrue(false)
3334+
assertTrue(error.toString(), false)
33383335
}
33393336

33403337
})
33413338
}
33423339

33433340
override def errorCallback(channel1: String, error: PubnubError) {
3344-
assertTrue(false)
3341+
assertTrue(error.toString(), false)
33453342
}
33463343
})
33473344

@@ -3364,8 +3361,7 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
33643361
}
33653362

33663363
override def errorCallback(channel: String, error: PubnubError) {
3367-
assert(false)
3368-
testObj.test(false)
3364+
assertTrue(error.toString(), false)
33693365
}
33703366
})
33713367

@@ -3437,21 +3433,21 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
34373433
}
34383434

34393435
override def errorCallback(channel1: String, error: PubnubError) {
3440-
assertTrue(false)
3436+
assertTrue(error.toString(), false)
34413437
}
34423438

34433439
})
34443440
}
34453441

34463442
override def errorCallback(channel1: String, error: PubnubError) {
3447-
assertTrue(false)
3443+
assertTrue(error.toString(), false)
34483444
}
34493445

34503446
})
34513447
}
34523448

34533449
override def errorCallback(channel1: String, error: PubnubError) {
3454-
assertTrue(false)
3450+
assertTrue(error.toString(), false)
34553451
}
34563452
})
34573453

@@ -3474,7 +3470,7 @@ class SubscribeV2Spec extends fixture.FunSpec with AwaitilitySupport with Befor
34743470
}
34753471

34763472
override def errorCallback(channel: String, error: PubnubError) {
3477-
assert(false)
3473+
assertTrue(error.toString(), false)
34783474
}
34793475
})
34803476

0 commit comments

Comments
 (0)