File tree 2 files changed +3
-4
lines changed
appengine-java8/datastore/src/test/java/com/example/appengine
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ public void repeatedProperties_storesList() throws Exception {
218
218
assertThat (retrievedFruits ).containsExactlyElementsIn (favoriteFruit ).inOrder ();
219
219
}
220
220
221
- @ SuppressWarnings (VariableDeclarationUsageDistance )
221
+ @ SuppressWarnings (" VariableDeclarationUsageDistance" )
222
222
@ Test
223
223
public void embeddedEntity_fromEmbedded_embedsProperties () throws Exception {
224
224
Entity employee = new Entity ("Employee" );
Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ public void entityGroups() throws Exception {
140
140
}
141
141
}
142
142
143
- @ SuppressWarnings (VariableDeclarationUsageDistance )
144
143
@ Test
145
144
public void creatingAnEntityInASpecificEntityGroup () throws Exception {
146
145
String boardName = "my-message-board" ;
@@ -152,14 +151,14 @@ public void creatingAnEntityInASpecificEntityGroup() throws Exception {
152
151
String messageText = "Some message." ;
153
152
Date postDate = new Date ();
154
153
155
- Transaction txn = datastore .beginTransaction ();
156
-
157
154
Key messageBoardKey = KeyFactory .createKey ("MessageBoard" , boardName );
158
155
159
156
Entity message = new Entity ("Message" , messageBoardKey );
160
157
message .setProperty ("message_title" , messageTitle );
161
158
message .setProperty ("message_text" , messageText );
162
159
message .setProperty ("post_date" , postDate );
160
+
161
+ Transaction txn = datastore .beginTransaction ();
163
162
datastore .put (txn , message );
164
163
165
164
txn .commit ();
You can’t perform that action at this time.
0 commit comments