Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hannes Wellmann <[email protected]>
  • Loading branch information
tivervac and HannesWell authored May 2, 2024
1 parent 78407cd commit afdb8e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ private void updateIUContainerElements(Element containersElement, List<Element>
// Use a mock comparator, we only want to use the
// "elementAttributesComparator" also used in updateElements
TargetDefinitionDocumentTools.updateElements(containersElement, oldContainers, updatedContainers,
(Element e1, Element e2) -> 0);
(e1, e2) -> 0);

for (Entry<String, List<Element>> entry : oldContainersByRepo.entrySet()) {
entry.getValue().forEach(TargetDefinitionDocumentTools::removeChildAndWhitespace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
*******************************************************************************/
package org.eclipse.pde.genericeditor.extension.tests;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Scanner;

Expand Down Expand Up @@ -50,7 +50,7 @@ public void testSettingNullPersists() throws Exception {
ByteArrayOutputStream actualOutput = new ByteArrayOutputStream();
targetDefinition.setProgramArguments(null);
TargetDefinitionPersistenceHelper.persistXML(targetDefinition, actualOutput);
assertEquals(expectedOutput.toString(UTF_8.toString()), actualOutput.toString(UTF_8.toString()));
assertEquals(expectedOutput.toString(StandardCharsets.UTF_8), actualOutput.toString(StandardCharsets.UTF_8));
}

@Test
Expand Down Expand Up @@ -119,7 +119,7 @@ private void confirmMatch(ITargetDefinition targetDefinition, String expectedDef
ByteArrayOutputStream actualOutput = new ByteArrayOutputStream();
TargetDefinitionPersistenceHelper.persistXML(targetDefinition, actualOutput);

StringAsserts.assertEqualStringIgnoreDelim(actualOutput.toString(UTF_8.toString()), result);
StringAsserts.assertEqualStringIgnoreDelim(actualOutput.toString(StandardCharsets.UTF_8), result);
} catch (IOException e) {
}
}
Expand Down

0 comments on commit afdb8e5

Please sign in to comment.