Apply suggestions from code review

Co-authored-by: Guillaume Smet <guillaume.smet@gmail.com>
This commit is contained in:
Liam Newman
2021-04-28 13:33:13 -07:00
committed by GitHub
parent fffe31220e
commit d526b13d7d

View File

@@ -153,7 +153,7 @@ public class ArchTests {
@Test
public void testRequireUseOfOnlySpecificApacheCommons() {
final ArchRule onlyApprovedApacheCommonsLang3Methods = classes()
final ArchRule onlyApprovedApacheCommonsMethods = classes()
.should(notCallMethodsInPackageUnless("org.apache.commons..",
// unless it is one of these methods
targetMethodIs(StringUtils.class, "capitalize", String.class),
@@ -187,9 +187,9 @@ public class ArchTests {
targetMethodIs(IOUtils.class, "toString", Reader.class),
targetMethodIs(IOUtils.class, "toByteArray", InputStream.class)))
.because(
"Commons methods must be manually verified to be compatible with commons-io:2.4 or earlier and commons-lang3:3.9 or earlier should be used.");
"Commons methods must be manually verified to be compatible with commons-io:2.4 or earlier and commons-lang3:3.9 or earlier.");
onlyApprovedApacheCommonsLang3Methods.check(classFiles);
onlyApprovedApacheCommonsMethods.check(classFiles);
}
public static ArchCondition<JavaClass> notCallMethodsInPackageUnless(final String packageIdentifier,