Skip to content

Commit 6c6690c

Browse files
Address errorprone warnings.
1 parent af69f4d commit 6c6690c

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

datastore/src/main/java/io/spine/server/storage/datastore/DsSessionStorage.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ Optional<ShardSessionRecord> read(ShardIndex index) {
8080
* {@inheritDoc}
8181
*
8282
* <p>Executes the write operation in a new transaction.
83-
*
84-
* @param message
8583
*/
8684
@Override
8785
public void write(ShardSessionRecord message) {

datastore/src/test/java/io/spine/server/storage/datastore/DsRecordStorageTest.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
import static io.spine.protobuf.AnyPacker.unpack;
9292
import static io.spine.server.ContextSpec.singleTenant;
9393
import static io.spine.server.entity.FieldMasks.applyMask;
94-
import static io.spine.server.entity.storage.EntityRecordWithColumns.create;
9594
import static io.spine.server.storage.datastore.given.CollegeEntity.CollegeColumn.ADMISSION_DEADLINE;
9695
import static io.spine.server.storage.datastore.given.CollegeEntity.CollegeColumn.CREATED;
9796
import static io.spine.server.storage.datastore.given.CollegeEntity.CollegeColumn.NAME;
@@ -161,7 +160,8 @@ protected EntityState newState(ProjectId projectId) {
161160
private EntityRecordWithColumns newRecordWithColumns(RecordStorage<ProjectId> storage) {
162161
EntityRecord record = newStorageRecord();
163162
Entity<ProjectId, Project> entity = new TestCounterEntity(newId());
164-
EntityRecordWithColumns recordWithColumns = create(record, entity, storage);
163+
EntityRecordWithColumns recordWithColumns =
164+
EntityRecordWithColumns.create(record, entity, storage);
165165
return recordWithColumns;
166166
}
167167

@@ -225,7 +225,8 @@ void testPersistColumns() {
225225
.setVersion(versionValue)
226226
.vBuild();
227227
DsRecordStorage<ProjectId> storage = newStorage(TestCounterEntity.class);
228-
EntityRecordWithColumns recordWithColumns = create(record, entity, storage);
228+
EntityRecordWithColumns recordWithColumns =
229+
EntityRecordWithColumns.create(record, entity, storage);
229230
ImmutableSet<String> columns = recordWithColumns.columnNames()
230231
.stream()
231232
.map(ColumnName::value)
@@ -324,7 +325,8 @@ void testLifecycleFlags() {
324325
.vBuild();
325326
TestCounterEntity entity = new TestCounterEntity(id);
326327
RecordStorage<ProjectId> storage = newStorage(TestCounterEntity.class);
327-
EntityRecordWithColumns recordWithColumns = create(record, entity, storage);
328+
EntityRecordWithColumns recordWithColumns =
329+
EntityRecordWithColumns.create(record, entity, storage);
328330
storage.write(id, recordWithColumns);
329331

330332
RecordReadRequest<ProjectId> request = new RecordReadRequest<>(id);
@@ -609,7 +611,10 @@ void testQueryEntityWithoutLifecycleById() {
609611
ProjectId id = newId();
610612
EntityRecord record = newEntityRecord(id, newState(id));
611613
EntityWithoutLifecycle entity = new EntityWithoutLifecycle(id);
612-
storage.writeRecord(entity.id(), create(record, entity, storage));
614+
storage.writeRecord(
615+
entity.id(),
616+
EntityRecordWithColumns.create(record, entity, storage)
617+
);
613618

614619
// Create ID filter.
615620
List<Any> targetIds = singletonList(pack(entity.id()));

datastore/src/test/java/io/spine/server/storage/datastore/given/DsInboxStorageTestEnv.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static InboxMessage generate(int shardIndex, int totalShards, Timestamp w
7676
}
7777

7878
/**
79-
* Generates {@code totalMessage} in a selected shard.
79+
* Generates {@code totalMessages} in a selected shard.
8080
*
8181
* <p>Each message is generated as received {@code now} and in
8282
* {@link InboxMessageStatus#TO_DELIVER TO_DELIVER} status.

datastore/src/test/java/io/spine/server/storage/datastore/given/DsRecordStorageTestEnv.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
import static io.spine.client.OrderBy.Direction.DESCENDING;
5757
import static io.spine.protobuf.AnyPacker.pack;
5858
import static io.spine.protobuf.AnyPacker.unpack;
59-
import static io.spine.server.entity.storage.EntityRecordWithColumns.create;
6059
import static java.util.Collections.shuffle;
6160
import static java.util.Collections.unmodifiableList;
6261
import static java.util.Comparator.comparing;
@@ -245,18 +244,19 @@ private static CollegeEntity createAndStoreEntity(RecordStorage<CollegeId> stora
245244
return entity;
246245
}
247246

248-
private static CollegeEntity createAndStoreEntity(RecordStorage<CollegeId> storage,
249-
String name) {
247+
private static CollegeEntity
248+
createAndStoreEntity(RecordStorage<CollegeId> storage, String name) {
250249
CollegeId id = newCollegeId();
251250
College state = newCollege(id, name);
252251
CollegeEntity entity = CollegeEntity.create(id, state);
253252
storeEntity(storage, entity);
254253
return entity;
255254
}
256255

257-
public static void storeEntity(RecordStorage<CollegeId> storage, CollegeEntity entity) {
256+
private static void storeEntity(RecordStorage<CollegeId> storage, CollegeEntity entity) {
258257
EntityRecord record = newEntityRecord(entity.id(), entity.state());
259-
EntityRecordWithColumns withColumns = create(record, entity, storage);
258+
EntityRecordWithColumns withColumns =
259+
EntityRecordWithColumns.create(record, entity, storage);
260260
storage.write(entity.id(), withColumns);
261261
}
262262

0 commit comments

Comments
 (0)