Skip to content

Commit 4b507ce

Browse files
committed
Merge branch 'master' into preview
# Conflicts: # pom.xml
2 parents 8f74095 + 2c2ea99 commit 4b507ce

File tree

9 files changed

+54
-44
lines changed

9 files changed

+54
-44
lines changed

β€ŽChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
## [6.6.3] - 2020-05-06
10+
11+
- velocypack v2.3.1
12+
13+
## [6.6.2] - 2020-04-07
14+
15+
- bugfix VelocyJack deserialization
916
- bugfix `allowImplicit` parameter in stream transactions
1017

1118
## [6.7.0_PREVIEW_3.7.0-alpha.2_0] - 2020-03-24

β€Žpom.xml

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,6 @@
2323

2424
<properties>
2525
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
26-
<slf4j-api.version>1.7.30</slf4j-api.version>
27-
<arangodb.velocypack.version>2.1.1</arangodb.velocypack.version>
28-
29-
<!-- provided -->
30-
<httpclient.version>4.5.11</httpclient.version>
31-
32-
<!-- test -->
33-
<logback-classic.version>1.2.3</logback-classic.version>
34-
<hamcrest-all.version>1.3</hamcrest-all.version>
35-
<junit.version>4.13</junit.version>
36-
37-
<!-- javadoc-->
38-
<javadoc.opts/>
3926
</properties>
4027

4128
<developers>
@@ -107,7 +94,7 @@
10794
<plugin>
10895
<groupId>org.apache.maven.plugins</groupId>
10996
<artifactId>maven-source-plugin</artifactId>
110-
<version>3.1.0</version>
97+
<version>3.2.0</version>
11198
<executions>
11299
<execution>
113100
<goals>
@@ -119,15 +106,14 @@
119106
<plugin>
120107
<groupId>org.apache.maven.plugins</groupId>
121108
<artifactId>maven-javadoc-plugin</artifactId>
122-
<version>3.1.1</version>
109+
<version>3.2.0</version>
123110
<executions>
124111
<execution>
125112
<id>attach-javadocs</id>
126113
<goals>
127114
<goal>jar</goal>
128115
</goals>
129116
<configuration>
130-
<additionalOptions>${javadoc.opts}</additionalOptions>
131117
<excludePackageNames>com.arangodb.internal</excludePackageNames>
132118
</configuration>
133119
</execution>
@@ -174,20 +160,7 @@
174160
<dependency>
175161
<groupId>org.apache.httpcomponents</groupId>
176162
<artifactId>httpclient</artifactId>
177-
<scope>provided</scope>
178-
</dependency>
179-
<dependency>
180-
<groupId>org.apache.httpcomponents</groupId>
181-
<artifactId>httpcore</artifactId>
182-
<scope>provided</scope>
183-
</dependency>
184-
<dependency>
185-
<groupId>commons-logging</groupId>
186-
<artifactId>commons-logging</artifactId>
187-
</dependency>
188-
<dependency>
189-
<groupId>commons-codec</groupId>
190-
<artifactId>commons-codec</artifactId>
163+
<optional>true</optional>
191164
</dependency>
192165
<dependency>
193166
<groupId>com.arangodb</groupId>
@@ -207,6 +180,12 @@
207180
<artifactId>junit</artifactId>
208181
<scope>test</scope>
209182
</dependency>
183+
<dependency>
184+
<groupId>com.fasterxml.jackson.core</groupId>
185+
<artifactId>jackson-core</artifactId>
186+
<version>2.11.0</version>
187+
<scope>test</scope>
188+
</dependency>
210189
<dependency>
211190
<groupId>org.hamcrest</groupId>
212191
<artifactId>hamcrest-all</artifactId>
@@ -231,7 +210,7 @@
231210
<dependency>
232211
<groupId>org.apache.httpcomponents</groupId>
233212
<artifactId>httpclient</artifactId>
234-
<version>${httpclient.version}</version>
213+
<version>4.5.12</version>
235214
</dependency>
236215
<dependency>
237216
<groupId>org.apache.httpcomponents</groupId>
@@ -251,27 +230,27 @@
251230
<dependency>
252231
<groupId>com.arangodb</groupId>
253232
<artifactId>velocypack</artifactId>
254-
<version>${arangodb.velocypack.version}</version>
233+
<version>2.3.1</version>
255234
</dependency>
256235
<dependency>
257236
<groupId>org.slf4j</groupId>
258237
<artifactId>slf4j-api</artifactId>
259-
<version>${slf4j-api.version}</version>
238+
<version>1.7.30</version>
260239
</dependency>
261240
<dependency>
262241
<groupId>ch.qos.logback</groupId>
263242
<artifactId>logback-classic</artifactId>
264-
<version>${logback-classic.version}</version>
243+
<version>1.2.3</version>
265244
</dependency>
266245
<dependency>
267246
<groupId>junit</groupId>
268247
<artifactId>junit</artifactId>
269-
<version>${junit.version}</version>
248+
<version>4.13</version>
270249
</dependency>
271250
<dependency>
272251
<groupId>org.hamcrest</groupId>
273252
<artifactId>hamcrest-all</artifactId>
274-
<version>${hamcrest-all.version}</version>
253+
<version>1.3</version>
275254
</dependency>
276255
</dependencies>
277256
</dependencyManagement>

β€Žsrc/main/java/com/arangodb/entity/CursorEntity.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
package com.arangodb.entity;
2222

2323
import com.arangodb.velocypack.VPackSlice;
24-
import org.apache.http.protocol.HTTP;
2524

2625
import java.util.Collection;
2726
import java.util.Map;
@@ -95,8 +94,8 @@ public Map<String, String> getMeta() {
9594
* @return remove not allowed (valid storable) meta information
9695
*/
9796
public Map<String, String> cleanupMeta(Map<String, String> meta) {
98-
meta.remove(HTTP.CONTENT_LEN);
99-
meta.remove(HTTP.TRANSFER_ENCODING);
97+
meta.remove("Content-Length");
98+
meta.remove("Transfer-Encoding");
10099
return meta;
101100
}
102101

β€Žsrc/main/java/com/arangodb/entity/arangosearch/analyzer/SearchAnalyzer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
package com.arangodb.entity.arangosearch.analyzer;
2222

2323

24+
import com.arangodb.entity.Entity;
2425
import com.arangodb.entity.arangosearch.AnalyzerFeature;
2526
import com.arangodb.entity.arangosearch.AnalyzerType;
2627

@@ -30,7 +31,7 @@
3031
/**
3132
* @author Michele Rastelli
3233
*/
33-
public abstract class SearchAnalyzer {
34+
public abstract class SearchAnalyzer implements Entity {
3435
private String name;
3536
private AnalyzerType type;
3637
private Set<AnalyzerFeature> features;

β€Žsrc/main/java/com/arangodb/internal/ArangoExecutor.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
import com.arangodb.velocypack.exception.VPackException;
2727
import com.arangodb.velocystream.Response;
2828

29+
import java.lang.reflect.ParameterizedType;
2930
import java.lang.reflect.Type;
31+
import java.util.Map;
3032

3133
/**
3234
* @author Mark Vollmary
@@ -36,7 +38,7 @@ public abstract class ArangoExecutor {
3638
@SuppressWarnings("unchecked")
3739
protected <T> T createResult(final Type type, final Response response) {
3840
if (type != Void.class && response.getBody() != null) {
39-
if (type instanceof Class && Entity.class.isAssignableFrom((Class) type)) {
41+
if (isInternal(type)) {
4042
return (T) util.get(Serializer.INTERNAL).deserialize(response.getBody(), type);
4143
} else {
4244
return (T) util.get(Serializer.CUSTOM).deserialize(response.getBody(), type);
@@ -46,6 +48,26 @@ protected <T> T createResult(final Type type, final Response response) {
4648
}
4749
}
4850

51+
private boolean isInternal(final Type type) {
52+
if (type instanceof ParameterizedType) {
53+
ParameterizedType pType = ((ParameterizedType) type);
54+
Type rawType = pType.getRawType();
55+
56+
if (rawType instanceof Class<?> && (
57+
Map.class.isAssignableFrom((Class<?>) rawType) || Iterable.class.isAssignableFrom((Class<?>) rawType)
58+
)) {
59+
for (Type arg : pType.getActualTypeArguments()) {
60+
if (!isInternal(arg)) {
61+
return false;
62+
}
63+
}
64+
return true;
65+
}
66+
}
67+
68+
return type instanceof Class<?> && Entity.class.isAssignableFrom((Class<?>) type);
69+
}
70+
4971
private final DocumentCache documentCache;
5072
private final ArangoSerializationFactory util;
5173

β€Žsrc/main/java/com/arangodb/internal/util/CURLLogger.java renamed to β€Žsrc/main/java/com/arangodb/internal/http/CURLLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Copyright holder is ArangoDB GmbH, Cologne, Germany
1919
*/
2020

21-
package com.arangodb.internal.util;
21+
package com.arangodb.internal.http;
2222

2323
import com.arangodb.util.ArangoSerialization;
2424
import com.arangodb.velocystream.Request;

β€Žsrc/main/java/com/arangodb/internal/http/HttpConnection.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.arangodb.Protocol;
2525
import com.arangodb.internal.net.Connection;
2626
import com.arangodb.internal.net.HostDescription;
27-
import com.arangodb.internal.util.CURLLogger;
2827
import com.arangodb.internal.util.IOUtils;
2928
import com.arangodb.internal.util.ResponseUtils;
3029
import com.arangodb.util.ArangoSerialization;

β€Žsrc/test/java/com/arangodb/ArangoCollectionTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ public void getDocumentIfNoneMatchFail() {
312312
}
313313

314314
@Test
315+
@Ignore
316+
// FIXME: test with VelocyJack fails due to slash escape char
315317
public void getDocumentAsJson() {
316318
String key = rnd();
317319
collection.insertDocument("{\"_key\":\"" + key + "\",\"a\":\"test\"}", null);

β€Žsrc/test/java/com/arangodb/BaseTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public abstract class BaseTest {
4444
static final List<ArangoDB> arangos = Arrays.asList(
4545
new ArangoDB.Builder().useProtocol(Protocol.VST).build(),
4646
new ArangoDB.Builder().useProtocol(Protocol.HTTP_JSON).build(),
47-
new ArangoDB.Builder().useProtocol(Protocol.HTTP_VPACK).build()
47+
new ArangoDB.Builder().useProtocol(Protocol.HTTP_VPACK).build(),
48+
new ArangoDB.Builder().serializer(new VelocyJack()).build()
4849
);
4950

5051
@Parameters

0 commit comments

Comments
 (0)