File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
processor/src/test/java/org/mapstruct/ap/testutil/runner Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1010import java .io .FileWriter ;
1111import java .io .IOException ;
1212import java .lang .reflect .Method ;
13+ import java .nio .charset .StandardCharsets ;
1314import java .util .ArrayList ;
1415import java .util .Arrays ;
1516import java .util .Collection ;
@@ -237,7 +238,7 @@ private void assertCheckstyleRules() throws Exception {
237238
238239 int errors = checker .process ( findGeneratedFiles ( new File ( sourceOutputDir ) ) );
239240 if ( errors > 0 ) {
240- String errorLog = errorStream .toString ( "UTF-8" );
241+ String errorLog = errorStream .toString ( StandardCharsets . UTF_8 );
241242 fail ( "Expected checkstyle compliant output, but got errors:\n " + errorLog );
242243 }
243244 }
Original file line number Diff line number Diff line change 66package org .mapstruct .ap .testutil .runner ;
77
88import java .io .File ;
9- import java .io .UnsupportedEncodingException ;
109import java .net .URL ;
1110import java .net .URLDecoder ;
11+ import java .nio .charset .StandardCharsets ;
1212import java .util .ArrayList ;
1313import java .util .Arrays ;
1414import java .util .List ;
@@ -119,7 +119,7 @@ public JavaFileAssert forJavaFile(String path) {
119119 return new JavaFileAssert ( new File ( sourceOutputDir .get () + "/" + path ) );
120120 }
121121
122- private void handleFixtureComparison () throws UnsupportedEncodingException {
122+ private void handleFixtureComparison () {
123123 for ( Class <?> fixture : fixturesFor ) {
124124 String fixtureName = getMapperName ( fixture );
125125 URL expectedFile = getExpectedResource ( fixtureName );
@@ -131,7 +131,7 @@ private void handleFixtureComparison() throws UnsupportedEncodingException {
131131 ) );
132132 }
133133 else {
134- File expectedResource = new File ( URLDecoder .decode ( expectedFile .getFile (), "UTF-8" ) );
134+ File expectedResource = new File ( URLDecoder .decode ( expectedFile .getFile (), StandardCharsets . UTF_8 ) );
135135 forMapper ( fixture ).hasSameMapperContent ( expectedResource );
136136 }
137137 fixture .getPackage ().getName ();
You can’t perform that action at this time.
0 commit comments