Skip to content

Commit 8713dd6

Browse files
author
Nico Verwer
committed
Merge remote-tracking branch 'origin/release/exist-6.4.0' into JB-current
2 parents f53d890 + 670af64 commit 8713dd6

File tree

88 files changed

+1592
-619
lines changed

Some content is hidden

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

88 files changed

+1592
-619
lines changed

.github/workflows/ci-test.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
timeout-minutes: 60
2121
dependencies:
2222
name: Dependency checks
23-
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop' }}
23+
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/develop-6.x.x' }}
2424
runs-on: ubuntu-latest
2525
steps:
2626
- uses: actions/checkout@v4
@@ -30,9 +30,7 @@ jobs:
3030
java-version: ${{ env.DEV_JDK }}
3131
cache: 'maven'
3232
- name: OWASP dependency check
33-
env:
34-
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
35-
run: mvn -V -B dependency-check:check
33+
run: mvn -V -B dependency-check:check -DnvdApiKey=${{ secrets.NVD_API_KEY }}
3634
timeout-minutes: 60
3735
test:
3836
name: ${{ matrix.os }} Test
@@ -58,7 +56,7 @@ jobs:
5856
file-version-suffix: ''
5957
cache: 'true'
6058
- name: Maven Build
61-
timeout-minutes: 10
59+
timeout-minutes: 30
6260
run: ${{ steps.install-mvnd.outputs.mvnd-dir }}/mvnd -V -B -T 1C compile test-compile -DtrimStackTrace=false -D'dependency-check.skip' -D'license.skip'
6361
- name: Maven Test
6462
timeout-minutes: 60

exist-ant/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>org.exist-db</groupId>
3030
<artifactId>exist-parent</artifactId>
31-
<version>6.4.0-SNAPSHOT</version>
31+
<version>6.4.1-SNAPSHOT</version>
3232
<relativePath>../exist-parent</relativePath>
3333
</parent>
3434

exist-core-jcstress/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>org.exist-db</groupId>
3030
<artifactId>exist-parent</artifactId>
31-
<version>6.3.0-SNAPSHOT</version>
31+
<version>6.3.1-SNAPSHOT</version>
3232
<relativePath>../exist-parent</relativePath>
3333
</parent>
3434

exist-core-jmh/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>org.exist-db</groupId>
3030
<artifactId>exist-parent</artifactId>
31-
<version>6.3.0-SNAPSHOT</version>
31+
<version>6.3.1-SNAPSHOT</version>
3232
<relativePath>../exist-parent</relativePath>
3333
</parent>
3434

exist-core/pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>org.exist-db</groupId>
3030
<artifactId>exist-parent</artifactId>
31-
<version>6.4.0-SNAPSHOT</version>
31+
<version>6.4.1-SNAPSHOT</version>
3232
<relativePath>../exist-parent</relativePath>
3333
</parent>
3434

@@ -59,7 +59,7 @@
5959
<dependency>
6060
<groupId>com.fasterxml.jackson.core</groupId>
6161
<artifactId>jackson-core</artifactId>
62-
<version>2.15.2</version>
62+
<version>2.18.3</version>
6363
</dependency>
6464

6565
<!-- dependency>
@@ -114,7 +114,7 @@
114114
<dependency>
115115
<groupId>org.relaxng</groupId>
116116
<artifactId>jing</artifactId>
117-
<version>20220510</version>
117+
<version>20241231</version>
118118
<exclusions>
119119
<exclusion> <!-- conflicts with xerces 2.12.2 dependency on xml-apis version 1.4.01 -->
120120
<groupId>xml-apis</groupId>
@@ -145,7 +145,7 @@
145145
<dependency>
146146
<groupId>org.bouncycastle</groupId>
147147
<artifactId>bcprov-jdk18on</artifactId>
148-
<version>1.78.1</version>
148+
<version>1.80</version>
149149
</dependency>
150150

151151
<dependency>
@@ -162,7 +162,7 @@
162162
<dependency>
163163
<groupId>com.fasterxml.uuid</groupId>
164164
<artifactId>java-uuid-generator</artifactId>
165-
<version>4.3.0</version>
165+
<version>5.1.0</version>
166166
</dependency>
167167

168168
<dependency>
@@ -191,7 +191,7 @@
191191
<dependency>
192192
<groupId>org.jline</groupId>
193193
<artifactId>jline</artifactId>
194-
<version>3.25.1</version>
194+
<version>3.29.0</version>
195195
</dependency>
196196

197197
<dependency>
@@ -233,13 +233,13 @@
233233
<dependency>
234234
<groupId>commons-logging</groupId>
235235
<artifactId>commons-logging</artifactId>
236-
<version>1.3.0</version>
236+
<version>1.3.5</version>
237237
</dependency>
238238

239239
<dependency>
240240
<groupId>org.apache.commons</groupId>
241241
<artifactId>commons-pool2</artifactId>
242-
<version>2.12.0</version>
242+
<version>2.12.1</version>
243243
</dependency>
244244

245245
<dependency>
@@ -432,7 +432,7 @@
432432
<dependency>
433433
<groupId>com.fifesoft</groupId>
434434
<artifactId>rsyntaxtextarea</artifactId>
435-
<version>3.3.4</version>
435+
<version>3.6.0</version>
436436
</dependency>
437437

438438
<dependency>

exist-core/src/main/java/org/exist/storage/ValueIndexFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public final static byte[] serialize(final Indexable value, final int offset) th
127127
return serialize(value, offset, true);
128128
}
129129

130+
// TODO(AR) switch implementation to various serialize methods in the AtomicValues (requires major version bump)
130131
public final static byte[] serialize(final Indexable value, final int offset, final boolean caseSensitive) throws EXistException {
131132
/* xs:string */
132133
if (Type.subTypeOf(value.getType(), Type.STRING)) {

exist-core/src/main/java/org/exist/util/ByteConversion.java

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*/
2222
package org.exist.util;
2323

24+
import java.nio.ByteBuffer;
25+
2426
/**
2527
* A collection of static methods to write integer values from/to a
2628
* byte array.
@@ -64,6 +66,27 @@ public final static int byteToIntH(final byte[] data, final int start ) {
6466
( ( data[start] & 0xff ) << 24 );
6567
}
6668

69+
/**
70+
* Read an integer value from the specified byte buffer.
71+
*
72+
* This version of the method reads the highest byte first.
73+
*
74+
* @param buf the byte buffer to read from
75+
*
76+
* @return the integer
77+
*/
78+
public final static int byteToIntH(final ByteBuffer buf) {
79+
final byte b0 = buf.get();
80+
final byte b1 = buf.get();
81+
final byte b2 = buf.get();
82+
final byte b3 = buf.get();
83+
84+
return (b3 & 0xff) |
85+
((b2 & 0xff) << 8) |
86+
((b1 & 0xff) << 16) |
87+
((b0 & 0xff) << 24);
88+
}
89+
6790
/**
6891
* Read a long value from the specified byte array, starting at start.
6992
*
@@ -83,6 +106,33 @@ public final static long byteToLong( final byte[] data, final int start ) {
83106
( ( (long) data[start + 7] ) & 0xffL );
84107
}
85108

109+
/**
110+
* Read a long value from the specified byte buffer.
111+
*
112+
* @param buf the byte buffer to read from
113+
*
114+
* @return the long integer
115+
*/
116+
public final static long byteToLong(final ByteBuffer buf) {
117+
final byte b0 = buf.get();
118+
final byte b1 = buf.get();
119+
final byte b2 = buf.get();
120+
final byte b3 = buf.get();
121+
final byte b4 = buf.get();
122+
final byte b5 = buf.get();
123+
final byte b6 = buf.get();
124+
final byte b7 = buf.get();
125+
126+
return ((((long) b0) & 0xffL) << 56) |
127+
((((long) b1) & 0xffL) << 48) |
128+
((((long) b2) & 0xffL) << 40) |
129+
((((long) b3) & 0xffL) << 32) |
130+
((((long) b4) & 0xffL) << 24) |
131+
((((long) b5) & 0xffL) << 16) |
132+
((((long) b6) & 0xffL) << 8) |
133+
(((long) b7) & 0xffL);
134+
}
135+
86136
/**
87137
* Read a short value from the specified byte array, starting at start.
88138
*
@@ -114,6 +164,21 @@ public final static short byteToShortH( final byte[] data, final int start ) {
114164
( data[start + 1] & 0xff ) );
115165
}
116166

167+
/**
168+
* Read a short value from the specified byte array, starting at start.
169+
*
170+
* This version of the method reads the highest byte first.
171+
*
172+
* @param buf the byte buffer to read from
173+
*
174+
* @return the short integer
175+
*/
176+
public final static short byteToShortH(final ByteBuffer buf) {
177+
final byte b0 = buf.get();
178+
final byte b1 = buf.get();
179+
return (short) (((b0 & 0xff) << 8) | (b1 & 0xff));
180+
}
181+
117182
/**
118183
* Write an int value to the specified byte array. The first byte is written
119184
* into the location specified by start.
@@ -134,7 +199,22 @@ public final static byte[] intToByte( final int v, final byte[] data, final int
134199
}
135200

136201
/**
137-
* Write an int value to the specified byte array. The first byte is written
202+
* Write an int value to the specified byte array.
203+
*
204+
* This version of the method writes the highest byte first.
205+
*
206+
* @param v the value
207+
* @param buf the byte buffer to write into
208+
*/
209+
public final static void intToByteH(final int v, final ByteBuffer buf) {
210+
buf.put((byte) ((v >>> 24) & 0xff));
211+
buf.put((byte) ((v >>> 16) & 0xff));
212+
buf.put((byte) ((v >>> 8) & 0xff));
213+
buf.put((byte) ((v >>> 0) & 0xff));
214+
}
215+
216+
/**
217+
* Write an int value to the specified byte buffer. The first byte is written
138218
* into the location specified by start.
139219
*
140220
* This version of the method writes the highest byte first.
@@ -173,6 +253,22 @@ public final static byte[] longToByte( final long v, final byte[] data, final in
173253
return data;
174254
}
175255

256+
/**
257+
* Write a long value to the specified byte buffer.
258+
*
259+
* @param v the value
260+
* @param buf the byte buffer to write into
261+
*/
262+
public final static void longToByte(final long v, final ByteBuffer buf) {
263+
buf.put((byte) ((v >>> 56) & 0xff));
264+
buf.put((byte) ((v >>> 48) & 0xff));
265+
buf.put((byte) ((v >>> 40) & 0xff));
266+
buf.put((byte) ((v >>> 32) & 0xff));
267+
buf.put((byte) ((v >>> 24) & 0xff));
268+
buf.put((byte) ((v >>> 16) & 0xff));
269+
buf.put((byte) ((v >>> 8) & 0xff));
270+
buf.put((byte) ((v >>> 0) & 0xff));
271+
}
176272

177273
/**
178274
* Write an int value to a newly allocated byte array.
@@ -228,5 +324,19 @@ public final static byte[] shortToByteH( final short v, final byte[] data, final
228324
data[start] = (byte) ( ( v >>> 8 ) & 0xff );
229325
return data;
230326
}
327+
328+
/**
329+
* Write a short value to the specified byte array.
330+
*
331+
* This version writes the highest byte first.
332+
*
333+
* @param v the value
334+
* @param buf the byte buffer to write into
335+
*/
336+
public final static void shortToByteH(final short v, final ByteBuffer buf) {
337+
buf.put( (byte) ((v >>> 8) & 0xff));
338+
buf.put((byte) ((v >>> 0) & 0xff));
339+
340+
}
231341
}
232342

0 commit comments

Comments
 (0)