Skip to content

Commit ec69615

Browse files
author
Achim Brandt
committed
fixed warnings
1 parent d9cd605 commit ec69615

30 files changed

+730
-689
lines changed

src/main/java/com/arangodb/ArangoConfigure.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ public int getProxyPort() {
402402
* Don't use this method. Please use {@link #setArangoHost(ArangoHost)
403403
* setArangoHost}
404404
*
405-
* @deprecated
406-
* @param port
405+
* @param clientPort
407406
* the port number
407+
* @deprecated
408408
*/
409409
@Deprecated
410410
public void setClinetPort(int clientPort) {

src/main/java/com/arangodb/ArangoDriver.java

+142-148
Large diffs are not rendered by default.

src/main/java/com/arangodb/ArangoException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public ArangoException() {
3131
}
3232

3333
public ArangoException(BaseEntity entity) {
34-
super((entity.getErrorNumber() == 0 ? "" : "[" + entity.getErrorNumber() + "]") + entity.getErrorMessage());
34+
super((entity.getErrorNumber() == 0 ? "" : "[" + entity.getErrorNumber() + "] ") + entity.getErrorMessage());
3535
this.entity = entity;
3636
}
3737

src/main/java/com/arangodb/BaseArangoDriver.java

+11-5
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ protected void validateDocumentHandle(String documentHandle) throws ArangoExcept
9292
* @param database
9393
* @param allowNull
9494
* @throws ArangoException
95-
* @see http
96-
* ://www.arangodb.com/manuals/current/NamingConventions.html#DatabaseNames
95+
* @see <a
96+
* href="http://www.arangodb.com/manuals/current/NamingConventions.html#DatabaseNames">DatabaseNames
97+
* documentation</a>
9798
*/
9899
protected void validateDatabaseName(String database, boolean allowNull) throws ArangoException {
99100
boolean valid = false;
@@ -169,12 +170,17 @@ protected ReplicationDumpHeader toReplicationDumpHeader(HttpResponseEntity res)
169170
}
170171

171172
/**
172-
* HTTPレスポンスから指定した型へ変換する。 レスポンスがエラーであるかを確認して、エラーの場合は例外を投げる。
173+
* Creates an entity object
173174
*
174175
* @param res
175-
* @param type
176+
* the response of the database
177+
* @param clazz
178+
* the class of the entity object
179+
* @param pclazz
180+
* the class of the object wrapped in the entity object
176181
* @param validate
177-
* @return
182+
* true for validation
183+
* @return the result entity object of class T (T extends BaseEntity)
178184
* @throws ArangoException
179185
*/
180186
protected <T extends BaseEntity> T createEntity(

src/main/java/com/arangodb/InternalCursorDriver.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,22 @@ <T, S extends DocumentEntity<T>> DocumentCursorResult<T, S> executeBaseCursorQue
5151
* Get the shortest path from a vertex to another vertex
5252
*
5353
* @param database
54+
* the database name
5455
* @param graphName
56+
* the graph name
5557
* @param startVertexExample
58+
* a start vertex example object (or null)
5659
* @param endVertexExample
60+
* a start vertex example object (or null)
5761
* @param shortestPathOptions
62+
* shortest path options
5863
* @param aqlQueryOptions
64+
* AQL query options
5965
* @param vertexClass
66+
* the vertex class
6067
* @param edgeClass
61-
* @return
68+
* the edge class
69+
* @return a ShortestPathEntity object
6270
* @throws ArangoException
6371
*/
6472
public <V, E> ShortestPathEntity<V, E> getShortesPath(

src/main/java/com/arangodb/InternalGraphDriver.java

+6-7
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ <T> VertexEntity<T> createVertex(
250250
* @param clazz
251251
* @param ifMatchRevision
252252
* @param ifNoneMatchRevision
253-
* @return
253+
* @return a VertexEntity object
254254
* @throws ArangoException
255255
*/
256256
<T> VertexEntity<T> getVertex(
@@ -301,7 +301,7 @@ <T> VertexEntity<T> replaceVertex(
301301
* @param waitForSync
302302
* @param ifMatchRevision
303303
* @param ifNoneMatchRevision
304-
* @return
304+
* @return a VertexEntity object
305305
* @throws ArangoException
306306
*/
307307
<T> VertexEntity<T> updateVertex(
@@ -326,7 +326,7 @@ <T> VertexEntity<T> updateVertex(
326326
* @param waitForSync
327327
* @param ifMatchRevision
328328
* @param ifNoneMatchRevision
329-
* @return
329+
* @return a DeletedEntity object
330330
* @throws ArangoException
331331
*/
332332
DeletedEntity deleteVertex(
@@ -349,7 +349,7 @@ DeletedEntity deleteVertex(
349349
* @param toHandle
350350
* @param value
351351
* @param waitForSync
352-
* @return <T> EdgeEntity<T>
352+
* @return a EdgeEntity object
353353
* @throws ArangoException
354354
*/
355355
<T> EdgeEntity<T> createEdge(
@@ -370,10 +370,9 @@ <T> EdgeEntity<T> createEdge(
370370
* @param edgeCollectionName
371371
* @param key
372372
* @param clazz
373-
* @param rev
374373
* @param ifNoneMatchRevision
375374
* @param ifMatchRevision
376-
* @return <T> EdgeEntity<T>
375+
* @return a EdgeEntity object
377376
* @throws ArangoException
378377
*/
379378
<T> EdgeEntity<T> getEdge(
@@ -474,7 +473,7 @@ <T> EdgeEntity<T> updateEdge(
474473
* @param labels
475474
* @param driver
476475
* @param properties
477-
* @return
476+
* @return a CursorEntity object
478477
* @throws ArangoException
479478
*/
480479
@Deprecated

src/main/java/com/arangodb/entity/Direction.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
*
2222
* @author tamtam180 - kirscheless at gmail.com
2323
*
24-
* @Deprecated As of release 2.5.4, replaced by {@link com.arangodb.Direction}
24+
* @deprecated As of release 2.5.4, replaced by {@link com.arangodb.Direction}
2525
*
2626
*/
2727
@Deprecated
2828
public enum Direction {
29-
ANY, IN, OUT
29+
ANY,
30+
IN,
31+
OUT
3032
}

src/main/java/com/arangodb/entity/EdgeDefinitionsEntity.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6-
import com.arangodb.ArangoException;
7-
86
public class EdgeDefinitionsEntity {
97

108
/**
@@ -40,7 +38,7 @@ public int getSize() {
4038
/**
4139
* get all edge definitions
4240
*
43-
* @return
41+
* @return a list of EdgeDefinitionEntity objects
4442
*/
4543
public List<EdgeDefinitionEntity> getEdgeDefinitions() {
4644
return edgeDefinitions;
@@ -62,7 +60,6 @@ public void setEdgeDefinitions(List<EdgeDefinitionEntity> edgeDefinitions) {
6260
*
6361
* @param edgeDefinition
6462
* the edge definition to be added
65-
* @throws ArangoException
6663
*/
6764
public void addEdgeDefinition(EdgeDefinitionEntity edgeDefinition) {
6865
if (!this.edgeCollections.contains(edgeDefinition.getCollection())) {

src/main/java/com/arangodb/entity/EntityDeserializers.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ public static class DeserializeSingleEntry {
641641
* desirializes any jsonElement
642642
*
643643
* @param jsonElement
644-
* @return
644+
* @return a object
645645
*/
646646
public static Object deserializeJsonElement(JsonElement jsonElement) {
647647
if (jsonElement.getClass() == JsonPrimitive.class) {
@@ -1908,7 +1908,6 @@ public EdgeEntity<?> deserialize(JsonElement json, Type typeOfT, JsonDeserializa
19081908
}
19091909

19101910
public static class TraversalEntityDeserializer implements JsonDeserializer<TraversalEntity<?, ?>> {
1911-
@SuppressWarnings("unchecked")
19121911
@Override
19131912
public TraversalEntity<?, ?> deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
19141913
throws JsonParseException {

src/main/java/com/arangodb/entity/EntityFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public static <T> String toJsonString(T obj, boolean includeNullValue) {
195195
/**
196196
* @param obj
197197
* @param includeNullValue
198-
* @return
198+
* @return a JsonElement object
199199
* @since 1.4.0
200200
*/
201201
public static <T> JsonElement toJsonElement(T obj, boolean includeNullValue) {

src/main/java/com/arangodb/entity/IndexType.java

+17-15
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,24 @@
1818

1919
/**
2020
* Index Type.
21+
*
2122
* @author tamtam180 - kirscheless at gmail.com
22-
* @see http://www.arangodb.com/manuals/current/HttpIndex.html#HttpIndexIntro
23+
* @see <a
24+
* href="http://www.arangodb.com/manuals/current/HttpIndex.html#HttpIndexIntro">HttpIndexIntro</a>
2325
*/
2426
public enum IndexType {
25-
/** Primary Index */
26-
PRIMARY,
27-
/** Edge Index */
28-
EDGE,
29-
/** Cap Index */
30-
CAP,
31-
/** Geo Index */
32-
GEO,
33-
/** Hash Index */
34-
HASH,
35-
/** Skiplist Index */
36-
SKIPLIST,
37-
/** Fulltext Inex */
38-
FULLTEXT
27+
/** Primary Index */
28+
PRIMARY,
29+
/** Edge Index */
30+
EDGE,
31+
/** Cap Index */
32+
CAP,
33+
/** Geo Index */
34+
GEO,
35+
/** Hash Index */
36+
HASH,
37+
/** Skiplist Index */
38+
SKIPLIST,
39+
/** Fulltext Inex */
40+
FULLTEXT
3941
}

src/main/java/com/arangodb/entity/ReplicationEventType.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
/**
2222
* @author tamtam180 - kirscheless at gmail.com
2323
* @since 1.4.0
24-
* @see https://www.arangodb.com/documentation
24+
* @see <a href="https://www.arangodb.com/documentation">ArangoDB
25+
* documentation</a>
2526
*
2627
*/
2728
public enum ReplicationEventType {

src/main/java/com/arangodb/entity/ShortestPathEntity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void setDistance(Long distance) {
7171
/**
7272
* Returns the document handle of the start vertex
7373
*
74-
* @return
74+
* @return the document handle of the start vertex
7575
*/
7676
public String getStartVertex() {
7777
return startVertex;

src/main/java/com/arangodb/entity/TransactionResultEntity.java

+38-37
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,42 @@
2323
*/
2424
public class TransactionResultEntity extends BaseEntity {
2525

26-
/**
27-
* Result object of transaction.
28-
*/
29-
private Object result;
30-
31-
public <T> T getResult() {
32-
return (T) this.result;
33-
}
34-
35-
public long getResultAsLong() {
36-
java.lang.Number number = (java.lang.Number) this.result;
37-
return number.longValue();
38-
}
39-
40-
public double getResultAsDouble() {
41-
java.lang.Number number = (java.lang.Number) this.result;
42-
return number.doubleValue();
43-
}
44-
45-
public byte getResultAsByte() {
46-
java.lang.Number number = (java.lang.Number) this.result;
47-
return number.byteValue();
48-
}
49-
50-
public float getResultAsFloat() {
51-
java.lang.Number number = (java.lang.Number) this.result;
52-
return number.floatValue();
53-
}
54-
55-
public int getResultAsInt() {
56-
java.lang.Number number = (java.lang.Number) this.result;
57-
return number.intValue();
58-
}
59-
60-
public void setResult(Object result) {
61-
this.result = result;
62-
}
26+
/**
27+
* Result object of transaction.
28+
*/
29+
private Object result;
30+
31+
@SuppressWarnings("unchecked")
32+
public <T> T getResult() {
33+
return (T) this.result;
34+
}
35+
36+
public long getResultAsLong() {
37+
java.lang.Number number = (java.lang.Number) this.result;
38+
return number.longValue();
39+
}
40+
41+
public double getResultAsDouble() {
42+
java.lang.Number number = (java.lang.Number) this.result;
43+
return number.doubleValue();
44+
}
45+
46+
public byte getResultAsByte() {
47+
java.lang.Number number = (java.lang.Number) this.result;
48+
return number.byteValue();
49+
}
50+
51+
public float getResultAsFloat() {
52+
java.lang.Number number = (java.lang.Number) this.result;
53+
return number.floatValue();
54+
}
55+
56+
public int getResultAsInt() {
57+
java.lang.Number number = (java.lang.Number) this.result;
58+
return number.intValue();
59+
}
60+
61+
public void setResult(Object result) {
62+
this.result = result;
63+
}
6364
}

src/main/java/com/arangodb/entity/marker/MissingInstanceCreater.java

+14-12
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,18 @@
2727
*/
2828
public class MissingInstanceCreater {
2929

30-
private static HashMap<Class<?>, Class<? extends BaseEntity>> mapping = new HashMap<Class<?>, Class<? extends BaseEntity>>();
31-
static {
32-
mapping.put(VertexEntity.class, DocumentEntity.class);
33-
}
34-
public static <T extends BaseEntity> Class<?> getMissingClass(Class<T> clazz) {
35-
Class<T> c = (Class<T>) mapping.get(clazz);
36-
if (c == null) {
37-
c = clazz;
38-
}
39-
return c;
40-
}
41-
30+
private static HashMap<Class<?>, Class<? extends BaseEntity>> mapping = new HashMap<Class<?>, Class<? extends BaseEntity>>();
31+
static {
32+
mapping.put(VertexEntity.class, DocumentEntity.class);
33+
}
34+
35+
@SuppressWarnings("unchecked")
36+
public static <T extends BaseEntity> Class<?> getMissingClass(Class<T> clazz) {
37+
Class<T> c = (Class<T>) mapping.get(clazz);
38+
if (c == null) {
39+
c = clazz;
40+
}
41+
return c;
42+
}
43+
4244
}

0 commit comments

Comments
 (0)