Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SupressWarnings correctly #824

Merged
merged 1 commit into from
Aug 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void repeatedProperties_storesList() throws Exception {
assertThat(retrievedFruits).containsExactlyElementsIn(favoriteFruit).inOrder();
}

@SuppressWarnings(VariableDeclarationUsageDistance)
@SuppressWarnings("VariableDeclarationUsageDistance")
@Test
public void embeddedEntity_fromEmbedded_embedsProperties() throws Exception {
Entity employee = new Entity("Employee");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ public void entityGroups() throws Exception {
}
}

@SuppressWarnings(VariableDeclarationUsageDistance)
@Test
public void creatingAnEntityInASpecificEntityGroup() throws Exception {
String boardName = "my-message-board";
Expand All @@ -152,14 +151,14 @@ public void creatingAnEntityInASpecificEntityGroup() throws Exception {
String messageText = "Some message.";
Date postDate = new Date();

Transaction txn = datastore.beginTransaction();

Key messageBoardKey = KeyFactory.createKey("MessageBoard", boardName);

Entity message = new Entity("Message", messageBoardKey);
message.setProperty("message_title", messageTitle);
message.setProperty("message_text", messageText);
message.setProperty("post_date", postDate);

Transaction txn = datastore.beginTransaction();
datastore.put(txn, message);

txn.commit();
Expand Down