Skip to content

Commit ef21efe

Browse files
authored
Merge branch 'master' into feat/update-snapshot-labels
2 parents 09eafd3 + 9d8addf commit ef21efe

File tree

121 files changed

+859
-5508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+859
-5508
lines changed

.github/workflows/Build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,5 @@ jobs:
187187
with:
188188
VERSION: ${{ needs.build.outputs.MAVEN_VERSION }}
189189
PACKAGE_NAMES: ${{ needs.build.outputs.PACKAGES_NAME }}
190-
COMMIT_MESSAGE: ${{ needs.build.outputs.COMMIT_MESSAGE }}
191190
COMMITTER: ${{ needs.build.outputs.LAST_COMMITTER }}
192191
secrets: inherit

android/src/main/java/com/artech/base/synchronization/bc/PendingEventHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.genexus.GxSilentTrnSdt;
1010
import com.genexus.IGxSilentTrn;
1111

12-
import json.org.json.JSONArray;
12+
import org.json.JSONArray;
1313

1414
public class PendingEventHelper {
1515

android/src/main/java/com/artech/synchronization/ISynchronizationHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import java.util.TreeMap;
44

5-
import json.org.json.JSONArray;
5+
import org.json.JSONArray;
66

77
public interface ISynchronizationHelper {
88

android/src/main/java/com/genexus/GXutil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import com.genexus.util.GXThreadLocal;
2222
import com.genexus.util.IThreadLocal;
2323

24-
import json.org.json.JSONObject;
24+
import org.json.JSONObject;
2525

2626
public final class GXutil
2727
{

android/src/main/java/com/genexus/db/driver/ExternalProviderMetadata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.genexus.db.driver;
22

3-
import json.org.json.JSONException;
4-
import json.org.json.JSONObject;
3+
import org.json.JSONException;
4+
import org.json.JSONObject;
55

66
public class ExternalProviderMetadata
77
{

android/src/main/java/com/genexus/internet/HttpAjaxContext.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
import java.util.ArrayList;
44
import java.util.Stack;
55

6-
import json.org.json.IJsonFormattable;
7-
import json.org.json.JSONArray;
8-
import json.org.json.JSONException;
9-
import json.org.json.JSONObject;
6+
import org.json.JSONArray;
7+
import org.json.JSONException;
8+
import org.json.JSONObject;
109

1110
public abstract class HttpAjaxContext
1211
{
@@ -497,7 +496,7 @@ public Object GetJSONObject()
497496
return wrapper;
498497
}
499498

500-
public void FromJSONObject(IJsonFormattable obj)
499+
public void FromJSONObject(Object obj)
501500
{
502501
}
503502

android/src/main/java/com/genexus/internet/HttpContext.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
import com.genexus.util.Codecs;
1414
import com.genexus.util.Encryption;
1515

16-
import json.org.json.IJsonFormattable;
17-
import json.org.json.JSONArray;
18-
import json.org.json.JSONException;
19-
import json.org.json.JSONObject;
16+
import org.json.JSONArray;
17+
import org.json.JSONException;
18+
import org.json.JSONObject;
2019

2120
public abstract class HttpContext extends HttpAjaxContext implements IHttpContext
2221
{
@@ -613,7 +612,7 @@ public void ajax_req_read_hidden_sdt(String jsonStr, Object SdtObj)
613612
{
614613
try
615614
{
616-
IJsonFormattable jsonObj;
615+
Object jsonObj;
617616
if (jsonStr.startsWith("["))
618617
jsonObj = new JSONArray(jsonStr);
619618
else
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.genexus.specific.android;
2+
3+
import com.genexus.common.interfaces.IExtensionJSONSerialization;
4+
import com.genexus.json.JSONObjectWrapper;
5+
6+
import java.util.Iterator;
7+
import java.util.LinkedHashMap;
8+
import java.util.Map;
9+
10+
public class AndroidJSONSerialization implements IExtensionJSONSerialization {
11+
@Override
12+
public Iterator<Map.Entry<String, Object>> getJSONObjectIterator(JSONObjectWrapper obj) {
13+
Map<String, Object> map = new LinkedHashMap<>();
14+
for (Iterator<String> it = obj.keys(); it.hasNext(); ) {
15+
String k = it.next();
16+
map.put(k, null); // value is not used for now, so we just set it as null
17+
}
18+
19+
return map.entrySet().iterator();
20+
}
21+
}

android/src/main/java/com/genexus/specific/android/Connect.java

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
import java.util.Date;
44

55
import com.genexus.common.interfaces.SpecificImplementation;
6-
import com.genexus.db.UserInformation;
76

8-
import json.org.json.IExtensionJSONObject;
9-
import json.org.json.JSONException;
10-
import json.org.json.JSONObject;
7+
import org.json.JSONException;
8+
import org.json.JSONObject;
119

1210
public final class Connect {
1311

@@ -34,35 +32,13 @@ public static void init()
3432
// connect GXSilentTrn
3533
SpecificImplementation.GXSilentTrnSdt = new GXSilentTrnSdt();
3634
SpecificImplementation.SdtMessages_Message = new SdtMessages_Message();
35+
SpecificImplementation.JsonSerialization = new AndroidJSONSerialization();
3736

3837
SpecificImplementation.KeepDecimals = true;
3938
SpecificImplementation.MillisecondMask = "SSS";
4039
SpecificImplementation.SupportPending = true;
4140
SpecificImplementation.cdowMask = "EEEE";
4241
SpecificImplementation.Base64Encode = "8859_1";
4342
SpecificImplementation.UseUnicodeCharacterClass = false;
44-
JSONObject.extension = new JSONObjectExtension();
45-
4643
}
47-
48-
static class JSONObjectExtension implements IExtensionJSONObject {
49-
50-
@Override
51-
public String dateToString(Date d) throws JSONException {
52-
if (d == null) {
53-
throw new JSONException("Null pointer");
54-
}
55-
UserInformation ui = (UserInformation) com.genexus.GXObjectHelper.getUserInformation(new com.genexus.ModelContext(com.genexus.ModelContext.getModelContextPackageClass()), -1);
56-
com.genexus.LocalUtil localUtil = ui.getLocalUtil();
57-
String dateString = localUtil.format(d, localUtil.getDateFormat() + " " + localUtil.getTimeFormat());
58-
try
59-
{
60-
com.genexus.db.DBConnectionManager.getInstance().disconnect(ui.getHandle());
61-
}
62-
catch (Throwable e)
63-
{}
64-
return dateString;
65-
}
66-
67-
}
6844
}

android/src/main/java/com/genexus/util/GxJsonReader.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.io.InputStreamReader;
66
import java.io.UnsupportedEncodingException;
77

8-
import org.apache.commons.lang.CharEncoding;
8+
import java.nio.charset.StandardCharsets;
99

1010
import com.genexus.internet.StringCollection;
1111
import com.google.gson.stream.JsonReader;
@@ -14,11 +14,7 @@ public class GxJsonReader {
1414
private JsonReader reader;
1515

1616
public GxJsonReader(InputStream stream) {
17-
try {
18-
reader = new JsonReader(new InputStreamReader(stream, CharEncoding.UTF_8));
19-
} catch (UnsupportedEncodingException e) {
20-
//TODO
21-
}
17+
reader = new JsonReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
2218
}
2319

2420
public boolean readBeginArray() {

0 commit comments

Comments
 (0)