Skip to content

Commit 4b10040

Browse files
committed
Cosmetic changes DefaultStorageHandler.
1 parent 329431d commit 4b10040

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Naksha_2.2.14
2+
- Refactor the `DefaultStorageHandler.java` to make it extensible without modifying the core implementation.
3+
14
## Naksha_2.2.13
25
- Local testing support for extensions.
36

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ mavenPassword=YourPassword
1111
# - here-naksha-lib-core/src/main/com/here/naksha/lib/core/NakshaVersion (static property: latest)
1212
# - here-naksha-app-service/src/main/resources/swagger/openapi.yaml (info.version property)
1313
# - CHANGELOG.md
14-
version=2.2.13
14+
version=2.2.14
1515

here-naksha-app-service/src/main/resources/swagger/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ servers:
1212
info:
1313
title: "Naksha Hub-API"
1414
description: "Naksha Hub-API is a REST API to provide simple access to geo data."
15-
version: "2.2.13"
15+
version: "2.2.14"
1616

1717
security:
1818
- AccessToken: [ ]

here-naksha-lib-core/src/main/java/com/here/naksha/lib/core/NakshaVersion.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@ public class NakshaVersion implements Comparable<NakshaVersion> {
7171
public static final String v2_2_11 = "2.2.11";
7272
public static final String v2_2_12 = "2.2.12";
7373
public static final String v2_2_13 = "2.2.13";
74+
public static final String v2_2_14 = "2.2.14";
7475

7576
/**
7677
* The latest version of the naksha-extension stored in the resources.
7778
*/
7879
@AvailableSince(v2_0_5)
79-
public static final NakshaVersion latest = of(v2_2_13);
80+
public static final NakshaVersion latest = of(v2_2_14);
8081

8182
private final int major;
8283
private final int minor;

here-naksha-lib-handlers/src/main/java/com/here/naksha/lib/handlers/DefaultStorageHandler.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import com.here.naksha.lib.core.storage.IWriteSession;
4747
import com.here.naksha.lib.core.util.StreamInfo;
4848
import com.here.naksha.lib.core.util.json.JsonSerializable;
49-
import com.here.naksha.lib.core.util.storage.RequestHelper;
5049
import com.here.naksha.lib.handlers.exceptions.MissingCollectionsException;
5150
import java.sql.SQLException;
5251
import java.util.List;
@@ -271,9 +270,10 @@ private boolean isUpdateCollectionRequest(@NotNull WriteCollections<?, ?, ?> wc)
271270
@NotNull F1<Result, RuntimeException> reattempt,
272271
@NotNull StopWatch storageTimer) {
273272
try {
274-
if (wr instanceof WriteXyzCollections){
275-
return measuredStorageSupplier(() -> performAtomicWriteCollection(ctx, storageImpl, (WriteXyzCollections) wr), storageTimer);
276-
} else{
273+
if (wr instanceof WriteXyzCollections) {
274+
return measuredStorageSupplier(
275+
() -> performAtomicWriteCollection(ctx, storageImpl, (WriteXyzCollections) wr), storageTimer);
276+
} else {
277277
return measuredStorageSupplier(() -> performAtomicWriteFeatures(ctx, storageImpl, wr), storageTimer);
278278
}
279279
} catch (RuntimeException re) {
@@ -282,17 +282,13 @@ private boolean isUpdateCollectionRequest(@NotNull WriteCollections<?, ?, ?> wc)
282282
}
283283

284284
private @NotNull Result performAtomicWriteCollection(
285-
@NotNull NakshaContext ctx,
286-
@NotNull IStorage storageImpl,
287-
@NotNull WriteXyzCollections writeCollections) {
288-
return singleWrite(ctx, storageImpl, writeCollections);
285+
@NotNull NakshaContext ctx, @NotNull IStorage storageImpl, @NotNull WriteXyzCollections writeCollections) {
286+
return singleWrite(ctx, storageImpl, writeCollections);
289287
}
290288

291289
protected @NotNull Result performAtomicWriteFeatures(
292-
@NotNull NakshaContext ctx,
293-
@NotNull IStorage storageImpl,
294-
@NotNull WriteRequest<?, ?, ?> wr) {
295-
return singleWrite(ctx, storageImpl, wr);
290+
@NotNull NakshaContext ctx, @NotNull IStorage storageImpl, @NotNull WriteRequest<?, ?, ?> wr) {
291+
return singleWrite(ctx, storageImpl, wr);
296292
}
297293

298294
private @NotNull Result singleWrite(

0 commit comments

Comments
 (0)