@@ -272,7 +272,7 @@ protected static String quotedPathArgument(String value) {
272
272
}
273
273
274
274
/**
275
- * Convenience method that copy all <code>doc-files</code> directories from <code>javadocDir</code> to the
275
+ * Convenience method that copies all <code>doc-files</code> directories from <code>javadocDir</code> to the
276
276
* <code>outputDirectory</code>.
277
277
*
278
278
* @param outputDirectory the output directory
@@ -302,7 +302,7 @@ protected static void copyJavadocResources(File outputDirectory, File javadocDir
302
302
javadocDir , "resources,**/doc-files" , String .join ("," , excludes ), false , true );
303
303
for (String docFile : docFiles ) {
304
304
File docFileOutput = new File (outputDirectory , docFile );
305
- FileUtils . mkdir ( docFileOutput .getAbsolutePath ());
305
+ Files . createDirectories ( Paths . get ( docFileOutput .getAbsolutePath () ));
306
306
FileUtils .copyDirectoryStructure (new File (javadocDir , docFile ), docFileOutput );
307
307
List <String > files = FileUtils .getFileAndDirectoryNames (
308
308
docFileOutput , String .join ("," , excludes ), null , true , true , true , true );
@@ -854,13 +854,12 @@ protected static void invokeMaven(
854
854
*
855
855
* @param javaFile not null
856
856
* @param encoding could be null
857
- * @return the content with unified line separator of the given javaFile using the given encoding.
858
- * @see FileUtils#fileRead(File, String)
857
+ * @return the content of the given javaFile using the given encoding
859
858
* @since 2.6.1
860
859
*/
861
860
protected static String readFile (final File javaFile , final String encoding ) {
862
861
try {
863
- return FileUtils . fileRead (javaFile , encoding );
862
+ return new String ( Files . readAllBytes (javaFile . toPath ()), Charset . forName ( encoding ) );
864
863
} catch (IOException e ) {
865
864
return null ;
866
865
}
@@ -878,7 +877,7 @@ protected static String readFile(final File javaFile, final String encoding) {
878
877
*
879
878
* @param path which can contain multiple paths separated with a colon (<code>:</code>) or a semi-colon
880
879
* (<code>;</code>), platform independent. Could be null.
881
- * @return the path splitted by colon or semi-colon or <code>null</code> if path was <code>null</code>.
880
+ * @return the path split by colon or semi-colon or <code>null</code> if path was <code>null</code>.
882
881
* @since 2.6.1
883
882
*/
884
883
protected static String [] splitPath (final String path ) {
0 commit comments