Skip to content

Commit 29c3e61

Browse files
committed
FIXUP small cleanups
1 parent 6bc40bb commit 29c3e61

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

ehri-core/src/main/java/eu/ehri/project/core/impl/BlueprintsGraphManager.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,9 @@ public CloseableIterable<Vertex> getVertices(String key, Object value, EntityCla
196196
@Override
197197
public Vertex createVertex(String id, EntityClass type,
198198
Map<String, ?> data) throws IntegrityError {
199-
Preconditions
200-
.checkNotNull(id, "null vertex ID given for item creation");
199+
Preconditions.checkNotNull(id, "null vertex ID given for item creation");
201200
Map<String, ?> indexData = getVertexData(id, type, data);
202-
checkExists(id);
201+
assertDoesNotExist(id);
203202
Vertex node = graph.addVertex(null);
204203
for (Map.Entry<String, ?> entry : indexData.entrySet()) {
205204
if (entry.getValue() == null)
@@ -280,7 +279,7 @@ private <E extends Element> void addProperties(E item, Map<String, ?> data) {
280279
}
281280
}
282281

283-
private void checkExists(String id) throws IntegrityError {
282+
private void assertDoesNotExist(String id) throws IntegrityError {
284283
if (exists(id)) {
285284
throw new IntegrityError(id);
286285
}

ehri-ws/src/main/java/eu/ehri/project/ws/ToolsResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public String fixLinkPermissions(@QueryParam(COMMIT_PARAM) @DefaultValue("false"
215215
* regenerated ID would cause collisions
216216
* @param tolerant skip items that could cause collisions rather
217217
* then throwing an error
218-
* @param commit whether or not to rename the item
218+
* @param commit whether to rename the item
219219
* @param data the data table
220220
* @return a tab old-to-new mapping, or an empty
221221
* body if nothing was changed

ehri-ws/src/main/java/eu/ehri/project/ws/base/CreateResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public interface CreateResource {
3737
* @param accessors The users/groups who can initially access this resource.
3838
* @return A serialized resource representation.
3939
* @throws PermissionDenied if the user cannot perform the action
40-
* @throws DeserializationError if the input data is not well formed
40+
* @throws DeserializationError if the input data is not well-formed
4141
* @throws ValidationError if data constraints are not met
4242
*/
4343
Response create(Bundle bundle, List<String> accessors)

0 commit comments

Comments
 (0)