Skip to content

Commit 1b96677

Browse files
author
Devendra
committed
changes for cn1 build
1 parent 354ba9c commit 1b96677

39 files changed

Lines changed: 169 additions & 170 deletions

‎android/Pubnub-Android-3.5.2.jar‎

2 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.
2 Bytes
Binary file not shown.
3 Bytes
Binary file not shown.

‎codenameone/pubnub.cn1lib‎

14 Bytes
Binary file not shown.

‎codenameone/src/com/pubnub/api/HttpClientCore.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public void setConnectionTimeout(int connectionTimeout) {
4848
public boolean isRedirect(int rc) {
4949
/* return (rc == HttpURLConnection.HTTP_MOVED_PERM
5050
|| rc == HttpURLConnection.HTTP_MOVED_TEMP || rc == HttpURLConnection.HTTP_SEE_OTHER);
51-
*/
52-
return true;
51+
*/
52+
return true;
5353
}
5454

5555
public boolean checkResponse(int rc) {
@@ -70,7 +70,7 @@ public synchronized HttpResponse fetch(String url, Hashtable headers)
7070

7171
public boolean isOk(int rc) {
7272
//return (rc == HttpURLConnection.HTTP_OK);
73-
return true;
73+
return true;
7474
}
7575

7676
public void shutdown() {

‎codenameone/src/com/pubnub/api/Logger.java‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
//import org.slf4j.LoggerFactory;
44

55
class Cn1Logger {
6-
7-
public Cn1Logger(Class c) {
8-
9-
}
10-
public void debug(String s) {
11-
12-
}
13-
public void trace(String s) {
14-
15-
}
16-
public void error(String s) {
17-
18-
}
19-
public void info(String s) {
20-
21-
}
6+
7+
public Cn1Logger(Class c) {
8+
9+
}
10+
public void debug(String s) {
11+
12+
}
13+
public void trace(String s) {
14+
15+
}
16+
public void error(String s) {
17+
18+
}
19+
public void info(String s) {
20+
21+
}
2222
}
2323

2424

‎codenameone/src/com/pubnub/api/PubnubUtil.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class PubnubUtil extends PubnubUtilCore {
1616
* @return , encoded string
1717
*/
1818
public static String urlEncode(String sUrl) {
19-
// TODO
19+
// TODO
2020
return null;
2121
}
2222
}

‎codenameone/srcJson/org/json/JSONArray.java‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ public JSONArray put(boolean value) {
553553
/**
554554
* Put a value in the JSONArray, where the value will be a
555555
* JSONArray which is produced from a Collection.
556-
* @param value A Collection value.
557-
* @return this.
556+
* @param value A Collection value.
557+
* @return this.
558558
*/
559559
public JSONArray put(Vector value) {
560560
put(new JSONArray(value));
@@ -606,8 +606,8 @@ public JSONArray put(long value) {
606606
//# /**
607607
//# * Put a value in the JSONArray, where the value will be a
608608
//# * JSONObject which is produced from a Map.
609-
//# * @param value A Map value.
610-
//# * @return this.
609+
//# * @param value A Map value.
610+
//# * @return this.
611611
//# */
612612
//# public JSONArray put(Hashtable value) {
613613
//# put(new JSONObject(value));
@@ -650,8 +650,8 @@ public JSONArray put(int index, boolean value) throws JSONException {
650650
* Put a value in the JSONArray, where the value will be a
651651
* JSONArray which is produced from a Collection.
652652
* @param index The subscript.
653-
* @param value A Collection value.
654-
* @return this.
653+
* @param value A Collection value.
654+
* @return this.
655655
* @throws JSONException If the index is negative or if the value is
656656
* not finite.
657657
*/
@@ -713,8 +713,8 @@ public JSONArray put(int index, long value) throws JSONException {
713713
//# * Put a value in the JSONArray, where the value will be a
714714
//# * JSONObject which is produced from a Map.
715715
//# * @param index The subscript.
716-
//# * @param value The Map value.
717-
//# * @return this.
716+
//# * @param value The Map value.
717+
//# * @return this.
718718
//# * @throws JSONException If the index is negative or if the the value is
719719
//# * an invalid number.
720720
//# */

‎codenameone/srcJson/org/json/JSONObject.java‎

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ of this software and associated documentation files (the "Software"), to deal
8484
* @version 2
8585
*/
8686
public class JSONObject {
87-
87+
8888
//#if CLDC=="1.0"
8989
public static final Boolean TRUE = new Boolean(true);
9090
public static final Boolean FALSE = new Boolean(false);
91-
//#endif
91+
//#endif
9292

9393
/**
9494
* JSONObject.NULL is equivalent to the value that JavaScript calls null,
@@ -245,8 +245,8 @@ public JSONObject(JSONTokener x) throws JSONException {
245245
//# }
246246
//# }
247247
//# }
248-
//#endif
249-
248+
//#endif
249+
250250
/**
251251
* Construct a JSONObject from a string.
252252
* This is the most commonly used JSONObject constructor.
@@ -295,8 +295,8 @@ public JSONObject accumulate(String key, Object value)
295295
//# * @param key A key string.
296296
//# * @param value An object to be accumulated under the key.
297297
//# * @return this.
298-
//# * @throws JSONException If the key is null or if the current value
299-
//# * associated with the key is not a JSONArray.
298+
//# * @throws JSONException If the key is null or if the current value
299+
//# * associated with the key is not a JSONArray.
300300
//# */
301301
//# public JSONObject append(String key, Object value)
302302
//# throws JSONException {
@@ -305,8 +305,8 @@ public JSONObject accumulate(String key, Object value)
305305
//# if (o == null) {
306306
//# put(key, new JSONArray().put(value));
307307
//# } else if (o instanceof JSONArray) {
308-
//# throw new JSONException("JSONObject[" + key +
309-
//# "] is not a JSONArray.");
308+
//# throw new JSONException("JSONObject[" + key +
309+
//# "] is not a JSONArray.");
310310
//# } else {
311311
//# put(key, new JSONArray().put(o).put(value));
312312
//# }
@@ -323,11 +323,11 @@ public JSONObject accumulate(String key, Object value)
323323
//# */
324324
//# static public String doubleToString(double d) {
325325
//# if (Double.isInfinite(d) || Double.isNaN(d)) {
326-
//# return "null";
326+
//# return "null";
327327
//# }
328-
//#
328+
//#
329329
//# // Shave off trailing zeros and decimal point, if possible.
330-
//#
330+
//#
331331
//# String s = Double.toString(d);
332332
//# if (s.indexOf('.') > 0 && s.indexOf('e') < 0 && s.indexOf('E') < 0) {
333333
//# while (s.endsWith("0")) {
@@ -418,7 +418,7 @@ public boolean getBoolean(String key) throws JSONException {
418418
//# throw new JSONException("JSONObject[" + quote(key) +
419419
//# "] is not a number.");
420420
//# }
421-
//# }
421+
//# }
422422
//# throw new JSONException("JSONObject[" + quote(key) +
423423
//# "] is not a number.");
424424
//# }
@@ -452,7 +452,7 @@ public int getInt(String key) throws JSONException {
452452
//# } else if (o instanceof String) {
453453
//# return (int) getDouble(key);
454454
//#endif
455-
}
455+
}
456456
throw new JSONException("JSONObject[" + quote(key) +
457457
"] is not a number.");
458458
}
@@ -519,7 +519,7 @@ public long getLong(String key) throws JSONException {
519519
//# } else if (o instanceof String) {
520520
//# return (long) getDouble(key);
521521
//#endif
522-
}
522+
}
523523
throw new JSONException("JSONObject[" + quote(key) +
524524
"] is not a number.");
525525
}
@@ -592,7 +592,7 @@ public JSONArray names() {
592592
return ja.length() == 0 ? null : ja;
593593
}
594594

595-
595+
596596
/**
597597
* Shave off trailing zeros and decimal point, if possible.
598598
*/
@@ -663,21 +663,21 @@ public boolean optBoolean(String key, boolean defaultValue) {
663663
}
664664
}
665665

666-
666+
667667
/**
668668
* Put a key/value pair in the JSONObject, where the value will be a
669669
* JSONArray which is produced from a Collection.
670-
* @param key A key string.
671-
* @param value A Collection value.
672-
* @return this.
670+
* @param key A key string.
671+
* @param value A Collection value.
672+
* @return this.
673673
* @throws JSONException
674674
*/
675675
public JSONObject put(String key, Vector value) throws JSONException {
676676
put(key, new JSONArray(value));
677677
return this;
678678
}
679679

680-
680+
681681
//#if CLDC!="1.0"
682682
//# /**
683683
//# * Get an optional double associated with a key,
@@ -895,22 +895,22 @@ public JSONObject put(String key, long value) throws JSONException {
895895
return this;
896896
}
897897

898-
898+
899899
//#ifdef PRODUCER
900900
//# /**
901901
//# * Put a key/value pair in the JSONObject, where the value will be a
902902
//# * JSONObject which is produced from a Map.
903-
//# * @param key A key string.
904-
//# * @param value A Map value.
905-
//# * @return this.
903+
//# * @param key A key string.
904+
//# * @param value A Map value.
905+
//# * @return this.
906906
//# * @throws JSONException
907907
//# */
908908
//# public JSONObject put(String key, Hashtable value) throws JSONException {
909909
//# put(key, new JSONObject(value));
910910
//# return this;
911911
//# }
912-
//#endif
913-
912+
//#endif
913+
914914
/**
915915
* Put a key/value pair in the JSONObject. If the value is null,
916916
* then the key will be removed from the JSONObject if it is present.
@@ -1197,23 +1197,23 @@ static String valueToString(Object value) throws JSONException {
11971197
return "null";
11981198
}
11991199
if (value instanceof JSONString) {
1200-
Object o;
1201-
try {
1202-
o = ((JSONString)value).toJSONString();
1200+
Object o;
1201+
try {
1202+
o = ((JSONString)value).toJSONString();
12031203
} catch (Exception e) {
1204-
throw new JSONException(e);
1204+
throw new JSONException(e);
12051205
}
12061206
if (o instanceof String) {
1207-
return (String)o;
1208-
}
1207+
return (String)o;
1208+
}
12091209
throw new JSONException("Bad value from toJSONString: " + o);
12101210
}
12111211
//#if CLDC!="1.0"
12121212
//# if (value instanceof Float || value instanceof Double ||
12131213
//#else
12141214
if (
12151215
//#endif
1216-
value instanceof Byte || value instanceof Short ||
1216+
value instanceof Byte || value instanceof Short ||
12171217
value instanceof Integer || value instanceof Long) {
12181218
return numberToString(value);
12191219
}
@@ -1245,21 +1245,21 @@ static String valueToString(Object value, int indentFactor, int indent)
12451245
return "null";
12461246
}
12471247
try {
1248-
if (value instanceof JSONString) {
1249-
Object o = ((JSONString)value).toJSONString();
1250-
if (o instanceof String) {
1251-
return (String)o;
1252-
}
1253-
}
1248+
if (value instanceof JSONString) {
1249+
Object o = ((JSONString)value).toJSONString();
1250+
if (o instanceof String) {
1251+
return (String)o;
1252+
}
1253+
}
12541254
} catch (Exception e) {
1255-
/* forget about it */
1255+
/* forget about it */
12561256
}
12571257
//#if CLDC!="1.0"
12581258
//# if (value instanceof Float || value instanceof Double ||
12591259
//#else
12601260
if (
12611261
//#endif
1262-
value instanceof Byte || value instanceof Short ||
1262+
value instanceof Byte || value instanceof Short ||
12631263
value instanceof Integer || value instanceof Long) {
12641264
return numberToString(value);
12651265
}

0 commit comments

Comments
 (0)