Skip to content

Commit 75523ca

Browse files
authored
Merge branch 'master' into wss4j
2 parents 59cea58 + dedd1ce commit 75523ca

File tree

638 files changed

+34768
-7771
lines changed

Some content is hidden

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

638 files changed

+34768
-7771
lines changed

.github/workflows/Build.yml

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
servers: '[
5656
{ "id": "github-genexuslabs", "username": "genexusbot", "password": "${{ secrets.SECURE_TOKEN }}" },
5757
{ "id": "azure-devops", "username": "genexuslabs", "password": "${env.AZURE_ARTIFACTS_TOKEN}" },
58-
{ "id": "ossrh", "username": "${env.MAVEN_USERNAME}", "password": "${env.MAVEN_PASSWORD}" },
58+
{ "id": "central", "username": "${env.MAVEN_USERNAME}", "password": "${env.MAVEN_PASSWORD}" },
5959
{ "id": "gpg.passphrase", "passphrase": "${env.MAVEN_GPG_PASSPHRASE}" }
6060
]'
6161

@@ -80,16 +80,14 @@ jobs:
8080
master)
8181
echo "## Is MASTER branch"
8282
83-
versionChangelist="-stable.$timestamp-SNAPSHOT"
83+
versionChangelist="-preview.$timestamp-SNAPSHOT"
8484
SHOULD_DEPLOY='true'
8585
;;
8686
8787
beta)
88-
echo "## Is BETA branch, add +100 to major number"
88+
echo "## Is BETA branch"
8989
90-
pomMajorNumber=$(expr $pomMajorNumber + 100)
91-
92-
versionChangelist="-trunk.$timestamp-SNAPSHOT"
90+
versionChangelist="-beta.$timestamp-SNAPSHOT"
9391
SHOULD_DEPLOY='true'
9492
;;
9593
@@ -178,33 +176,16 @@ jobs:
178176
MAVEN_USERNAME: ${{ secrets.MAVEN_OSSRH_USERNAME }}
179177
MAVEN_PASSWORD: ${{ secrets.MAVEN_OSSRH_TOKEN }}
180178
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_BUILDER_PASSPHRASE }}
181-
182-
dispatch-build:
183-
name: Dispatch build result
184-
needs: build
185-
if: github.repository_owner == 'GeneXusLabs' && needs.build.outputs.SHOULD_DEPLOY == 'true'
186-
187-
runs-on: ubuntu-latest
188-
179+
180+
update-genexus-dependency:
189181
concurrency:
190182
group: build-${{ github.ref }}
191183
cancel-in-progress: true
192-
193-
steps:
194-
- name: Checkout action
195-
uses: actions/checkout@v2
196-
with:
197-
repository: genexuslabs/dispatch-build-result
198-
ref: releases/v2
199-
token: ${{ secrets.SECURE_TOKEN }}
200-
path: ./tmp/.github/actions/dispatch-build-result
201-
202-
- name: Dispatch build result
203-
uses: ./tmp/.github/actions/dispatch-build-result
204-
with:
205-
component-name: ${{ github.event.inputs.repository }}
206-
branch-ref: ${{ env.GIT_REF }}
207-
new-version: ${{ needs.build.outputs.MAVEN_VERSION }}
208-
committer: ${{ needs.build.outputs.LAST_COMMITTER }}
209-
commit-message: ${{ needs.build.outputs.COMMIT_MESSAGE }}
210-
token: ${{ secrets.SECURE_TOKEN }}
184+
uses: genexuslabs/build-genexus-reusable-workflow/.github/workflows/update-genexus-dep-version.yml@main
185+
needs: build
186+
if: github.repository_owner == 'genexuslabs' && needs.build.outputs.SHOULD_DEPLOY == 'true'
187+
with:
188+
VERSION: ${{ needs.build.outputs.MAVEN_VERSION }}
189+
PACKAGE_NAMES: ${{ needs.build.outputs.PACKAGES_NAME }}
190+
COMMITTER: ${{ needs.build.outputs.LAST_COMMITTER }}
191+
secrets: inherit
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Call Beta Bot
2+
3+
on:
4+
# Triggers the workflow on push to beta branch or changes in a pull request to main branch
5+
push:
6+
branches: [ "beta" ]
7+
pull_request:
8+
types: [ opened, synchronize, reopened, ready_for_review, closed, labeled, unlabeled ]
9+
branches: [ "master" ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
jobs:
15+
call-workflow:
16+
if: github.repository_owner == 'genexuslabs'
17+
uses: genexuslabs/build-genexus-reusable-workflow/.github/workflows/run-beta-bot.yml@main
18+
secrets: inherit

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,35 @@ These are the source of the GeneXus Standard Classes for Java, valid since GeneX
44
## Repo Status
55
| Branch | Build | Security
66
|---|---|---
7-
|master |[![](https://github.com/genexuslabs/JavaClasses/workflows/Build/badge.svg)](https://github.com/genexuslabs/JavaClasses/actions?query=workflow%3ABuild+branch%3Amaster)|[![CodeQL](https://github.com/genexuslabs/JavaClasses/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/genexuslabs/JavaClasses/actions/workflows/codeql-analysis.yml)
8-
|beta |[![](https://github.com/genexuslabs/JavaClasses/workflows/Build/badge.svg?branch=beta)](https://github.com/genexuslabs/JavaClasses/actions?query=workflow%3ABuild+branch%3Abeta)|[![CodeQL](https://github.com/genexuslabs/JavaClasses/actions/workflows/codeql-analysis.yml/badge.svg?branch=beta)](https://github.com/genexuslabs/JavaClasses/actions/workflows/codeql-analysis.yml)
7+
|master |[![Build](https://github.com/genexuslabs/JavaClasses/actions/workflows/Build.yml/badge.svg)](https://github.com/genexuslabs/JavaClasses/actions/workflows/Build.yml)|[![CodeQL](https://github.com/genexuslabs/JavaClasses/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/genexuslabs/JavaClasses/actions/workflows/codeql-analysis.yml)
8+
|beta |[![Build](https://github.com/genexuslabs/JavaClasses/actions/workflows/Build.yml/badge.svg?branch=beta)](https://github.com/genexuslabs/JavaClasses/actions/workflows/Build.yml)|[![CodeQL](https://github.com/genexuslabs/JavaClasses/actions/workflows/codeql-analysis.yml/badge.svg?branch=beta)](https://github.com/genexuslabs/JavaClasses/actions/workflows/codeql-analysis.yml)
99

1010
## Modules
1111

12-
| Name | Description
13-
|---|---
14-
| common | Classes common to Android and Java
15-
| gxcryptocommon | Classes common to Android and Java related to Cryptography
16-
| gxmail | Classes related to mail handling
17-
| java | Java standard classes, output is gxclassr.jar
18-
| wrappercommon | Interfaces to encapsulate Java EE and Jakarta EE support, output is gxwrappercommon.jar
19-
| wrapperjavax | Implement the interfaces defined in wrappercommon in Java EE, output is gxwrapperjavax.jar
20-
| wrapperjakarta | Implement the interfaces defined in wrappercommon in Jakarta EE, output is gxwrapperjakarta.jar
21-
| gxoffice | Formerly Java classes are now separated to be included only when using office.
22-
| gxsearch | Formerly in Java classes are now separated to be included only when using search.
12+
| Name | Description
13+
|--------------------------------|---
14+
| common | Classes common to Android and Java
15+
| gxcryptocommon | Classes common to Android and Java related to Cryptography
16+
| gxmail | Classes related to mail handling
17+
| java | Java standard classes, output is gxclassr.jar
18+
| wrappercommon | Interfaces to encapsulate Java EE and Jakarta EE support, output is gxwrappercommon.jar
19+
| wrapperjavax | Implement the interfaces defined in wrappercommon in Java EE, output is gxwrapperjavax.jar
20+
| wrapperjakarta | Implement the interfaces defined in wrappercommon in Jakarta EE, output is gxwrapperjakarta.jar
21+
| gxoffice | Formerly Java classes are now separated to be included only when using office.
22+
| gxsearch | Formerly in Java classes are now separated to be included only when using search.
2323
| gxandroidpublisher and javapns | They are necessary for when you have Push Notifications in your old implementation. These are projects that should disappear in the short term.
2424
| android | The standard Android classes. **Note that this is not the full runtime for Android, the full runtime can be created by using the Android Flexible Client project**.
2525
| gxexternalproviders | Implements service provider for IBM Cloud, Google, Azure, Amazon
2626
| gxgeospatial | Geography data type implementation
2727
| gxodata | OData access
28+
| securityapicommons | SecurityAPI's common module
29+
| gxcryptography | SecurityAPI's GeneXusCryptography module
30+
| gxjwt | SecurityAPI's GeneXusJWT module
31+
| gxxmlsignature | SecurityAPI's GeneXusXmlSignature module
32+
| gxftps | SecurityAPI's GeneXusFTPS module
33+
| gxsftp | SecurityAPI's GeneXusSFTP module
34+
| gamutils | GAM external object with utilities
35+
| gamtotp | GAM external object for RFC6238 implementation
2836

2937
The dependencies between the projects are specified in each pom.xml within their directory.
3038

android/pom.xml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
<groupId>commons-io</groupId>
2424
<artifactId>commons-io</artifactId>
2525
</exclusion>
26-
<exclusion> <!-- exclude bouncycastle from android -->
27-
<groupId>org.bouncycastle</groupId>
28-
<artifactId>bcprov-jdk18on</artifactId>
29-
</exclusion>
3026
</exclusions>
3127
</dependency>
3228
<dependency>
@@ -38,10 +34,6 @@
3834
<groupId>commons-io</groupId>
3935
<artifactId>commons-io</artifactId>
4036
</exclusion>
41-
<exclusion> <!-- exclude bouncycastle from android -->
42-
<groupId>org.bouncycastle</groupId>
43-
<artifactId>bcprov-jdk18on</artifactId>
44-
</exclusion>
4537
</exclusions>
4638
</dependency>
4739
<dependency>
@@ -66,14 +58,6 @@
6658
<artifactId>commons-io</artifactId>
6759
<version>2.2</version>
6860
</dependency>
69-
<!-- add explicit bouncycastle in Android, version used in Android Flexible client -->
70-
<!-- keep in sync version here and in Android Flexible client -->
71-
<dependency>
72-
<groupId>org.bouncycastle</groupId>
73-
<artifactId>bcprov-jdk15on</artifactId>
74-
<version>1.65</version>
75-
</dependency>
76-
7761
</dependencies>
7862

7963
<build>

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/Application.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,9 @@ public static boolean hasClientPreferences()
250250
*/
251251
public static ClientPreferences getClientPreferences()
252252
{
253+
if (!hasClientPreferences())
254+
return null;
255+
253256
return (ClientPreferences) ((ModelContext)ClientContext.getModelContext()).getPreferences();
254257
}
255258

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/DataStoreProvider.java

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.sql.SQLException;
44
import java.util.Date;
5+
import java.util.concurrent.locks.ReentrantLock;
56

67
import com.genexus.*;
78
import com.genexus.db.driver.DataSource;
@@ -164,10 +165,54 @@ public void executeBatch(int cursorIdx)
164165
{
165166
execute(cursorIdx, null, false);
166167
}
168+
169+
static ReentrantLock lockExecute = new ReentrantLock();
170+
167171
public synchronized void execute(int cursorIdx, Object[] parms)
168172
{
169-
execute(cursorIdx, parms, true);
170-
}
173+
DataSource ds = getDataSourceNoException();
174+
if(ds!=null && ds.jdbcIntegrity==false)
175+
{
176+
// If the JDBC integrity is disabled (XBASE_TINT), SQLIte is in autocommit mode.
177+
// we need to lock the execute method to avoid concurrency issues.
178+
// for example, the postExecute method (select changes()) cause exception in Android SQLite.
179+
// it happends with execute sql statements like from diferent threads, like using procedures submit.
180+
Cursor cursor = cursors[cursorIdx];
181+
if (cursor instanceof UpdateCursor) // if the cursor is an UpdateCursor, we need to lock the execute method.
182+
{
183+
AndroidLog.debug("execute UpdateCursor cursorIdx : " + cursorIdx);
184+
long timeStampStart = System.currentTimeMillis();
185+
lockExecute.lock();
186+
long timeStampLock = System.currentTimeMillis();
187+
AndroidLog.debug("START execute UpdateCursor afterlock cursorIdx: " + cursorIdx + " Waiting time ms: " + (timeStampLock - timeStampStart));
188+
try
189+
{
190+
// execute the cursor with the parameters.
191+
execute(cursorIdx, parms, true);
192+
}
193+
finally
194+
{
195+
lockExecute.unlock();
196+
}
197+
long timeStampEnd = System.currentTimeMillis();
198+
AndroidLog.debug("END execute UpdateCursor cursorIdx: " + cursorIdx+ " Execute time ms: " + (timeStampEnd - timeStampLock));
199+
}
200+
else
201+
{
202+
// if the cursor is not an UpdateCursor, we can execute it without locking.
203+
long timeStampStart = System.currentTimeMillis();
204+
execute(cursorIdx, parms, true);
205+
long timeStampEnd = System.currentTimeMillis();
206+
AndroidLog.debug("END execute cursorIdx: " + cursorIdx+ " Execute time ms: " + (timeStampEnd - timeStampStart));
207+
}
208+
}
209+
else
210+
{
211+
// default case, we execute the cursor with the parameters.
212+
execute(cursorIdx, parms, true);
213+
}
214+
215+
}
171216

172217
private void execute(int cursorIdx, Object[] parms, boolean preExecute)
173218
{

android/src/main/java/com/genexus/db/ForEachCursor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ public void setTimestamp(int index, java.sql.Timestamp value) throws SQLExceptio
217217
public void setBLOBFile(int index, String fileName) throws SQLException {}
218218
public void setBLOBFile(int index, String fileName, boolean isMultiMedia) throws SQLException {}
219219
public void setBLOBFile(int index, String fileName, boolean isMultiMedia, boolean downloadContent) throws SQLException {}
220+
public void setEmbedding(int index, Float[] value) throws SQLException {}
220221

221222
public void setVarchar(int index, String value, int length, boolean allowsNull) throws SQLException {}
222223
public void setLongVarchar(int index, String value, boolean allowsNull) throws SQLException {}

0 commit comments

Comments
 (0)