File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
main/java/com/arangodb/internal/velocypack Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ public String translateName(final Field field) {
95
95
context .registerDeserializer (Permissions .class , VPackDeserializers .PERMISSIONS );
96
96
context .registerDeserializer (QueryExecutionState .class , VPackDeserializers .QUERY_EXECUTION_STATE );
97
97
context .registerDeserializer (ReplicationFactor .class , VPackDeserializers .REPLICATION_FACTOR );
98
+ context .registerDeserializer (MinReplicationFactor .class , VPackDeserializers .MIN_REPLICATION_FACTOR );
98
99
context .registerDeserializer (ViewType .class , VPackDeserializers .VIEW_TYPE );
99
100
context .registerDeserializer (ArangoSearchProperties .class , VPackDeserializers .ARANGO_SEARCH_PROPERTIES );
100
101
context .registerDeserializer (ArangoSearchPropertiesEntity .class , VPackDeserializers .ARANGO_SEARCH_PROPERTIES_ENTITY );
Original file line number Diff line number Diff line change @@ -197,7 +197,9 @@ public void serialize(
197
197
final String attribute ,
198
198
final MinReplicationFactor value ,
199
199
final VPackSerializationContext context ) throws VPackException {
200
- builder .add (attribute , value .getMinReplicationFactor ());
200
+ if (value .getMinReplicationFactor () != null ) {
201
+ builder .add (attribute , value .getMinReplicationFactor ());
202
+ }
201
203
}
202
204
};
203
205
Original file line number Diff line number Diff line change @@ -99,8 +99,9 @@ public void create() {
99
99
final CollectionEntity result = db .collection (COLLECTION_NAME + "_1" ).create ();
100
100
assertThat (result , is (notNullValue ()));
101
101
assertThat (result .getId (), is (notNullValue ()));
102
- } finally {
103
102
db .collection (COLLECTION_NAME + "_1" ).drop ();
103
+ } catch (final ArangoDBException e ) {
104
+ throw e ;
104
105
}
105
106
}
106
107
Original file line number Diff line number Diff line change @@ -234,10 +234,9 @@ public void createCollectionWithMinReplicationFactor() {
234
234
assertThat (db .collection (COLLECTION_NAME ).getProperties ().getReplicationFactor (), is (2 ));
235
235
assertThat (db .collection (COLLECTION_NAME ).getProperties ().getMinReplicationFactor (), is (2 ));
236
236
assertThat (db .collection (COLLECTION_NAME ).getProperties ().getSatellite (), is (nullValue ()));
237
+ db .collection (COLLECTION_NAME ).drop ();
237
238
} catch (final ArangoDBException e ) {
238
239
e .printStackTrace ();
239
- } finally {
240
- db .collection (COLLECTION_NAME ).drop ();
241
240
}
242
241
243
242
}
You can’t perform that action at this time.
0 commit comments