File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
appengine-java8/datastore/src/test/java/com/example/appengine Expand file tree Collapse file tree 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 {
218218 assertThat (retrievedFruits ).containsExactlyElementsIn (favoriteFruit ).inOrder ();
219219 }
220220
221- @ SuppressWarnings (VariableDeclarationUsageDistance )
221+ @ SuppressWarnings (" VariableDeclarationUsageDistance" )
222222 @ Test
223223 public void embeddedEntity_fromEmbedded_embedsProperties () throws Exception {
224224 Entity employee = new Entity ("Employee" );
Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ public void entityGroups() throws Exception {
140140 }
141141 }
142142
143- @ SuppressWarnings (VariableDeclarationUsageDistance )
144143 @ Test
145144 public void creatingAnEntityInASpecificEntityGroup () throws Exception {
146145 String boardName = "my-message-board" ;
@@ -152,14 +151,14 @@ public void creatingAnEntityInASpecificEntityGroup() throws Exception {
152151 String messageText = "Some message." ;
153152 Date postDate = new Date ();
154153
155- Transaction txn = datastore .beginTransaction ();
156-
157154 Key messageBoardKey = KeyFactory .createKey ("MessageBoard" , boardName );
158155
159156 Entity message = new Entity ("Message" , messageBoardKey );
160157 message .setProperty ("message_title" , messageTitle );
161158 message .setProperty ("message_text" , messageText );
162159 message .setProperty ("post_date" , postDate );
160+
161+ Transaction txn = datastore .beginTransaction ();
163162 datastore .put (txn , message );
164163
165164 txn .commit ();
You can’t perform that action at this time.
0 commit comments