Iteration by entrySet() instead of keySet()
Change-Id: I7d4cbe10e42f6200a119c74982b8d000b3948e4f
This commit is contained in:
@@ -186,9 +186,9 @@ public class CommentsTest extends TestCase {
|
||||
assertNotNull(actual);
|
||||
assertEquals(expected.size(), actual.size());
|
||||
assertEquals(expected.keySet(), actual.keySet());
|
||||
for (String filename : expected.keySet()) {
|
||||
List<PatchLineComment> expectedComments = expected.get(filename);
|
||||
List<CommentInfo> actualComments = actual.get(filename);
|
||||
for (Map.Entry<String, ArrayList<PatchLineComment>> entry : expected.entrySet()) {
|
||||
List<PatchLineComment> expectedComments = entry.getValue();
|
||||
List<CommentInfo> actualComments = actual.get(entry.getKey());
|
||||
assertNotNull(actualComments);
|
||||
assertEquals(expectedComments.size(), actualComments.size());
|
||||
for (int i = 0; i < expectedComments.size(); i++) {
|
||||
|
@@ -200,8 +200,9 @@ public class SubmoduleSectionParserTest extends LocalDiskRepositoryTestCase {
|
||||
expect(bbc.getSubsections("submodule"))
|
||||
.andReturn(sectionsToReturn.keySet());
|
||||
|
||||
for (final String id : sectionsToReturn.keySet()) {
|
||||
final SubmoduleSection section = sectionsToReturn.get(id);
|
||||
for (Map.Entry<String, SubmoduleSection> entry : sectionsToReturn.entrySet()) {
|
||||
String id = entry.getKey();
|
||||
final SubmoduleSection section = entry.getValue();
|
||||
expect(bbc.getString("submodule", id, "url")).andReturn(section.getUrl());
|
||||
expect(bbc.getString("submodule", id, "path")).andReturn(
|
||||
section.getPath());
|
||||
|
Reference in New Issue
Block a user