Skip to content

Commit

Permalink
[MJAVADOC-544] - Changed behaviour of Javadoc for temporary files enc…
Browse files Browse the repository at this point in the history
…oding (options, argfile, ...)

 changed behaviour to handle special characters in argsfile-file for java >= 9
  • Loading branch information
michael-st committed Nov 13, 2018
1 parent 64e619f commit 42c3c3b
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -4470,9 +4470,15 @@ private void addCommandLineArgFile( Commandline cmd, File javadocOutputDirectory
cmd.createArg().setValue( "@" + FILES_FILE_NAME );
}

/* default to platform encoding */
String encoding = null;
if ( JAVA_VERSION.compareTo( SINCE_JAVADOC_9 ) >= 0 )
{
encoding = StandardCharsets.UTF_8.name();
}
try
{
FileUtils.fileWrite( argfileFile.getAbsolutePath(), null /* platform encoding */,
FileUtils.fileWrite( argfileFile.getAbsolutePath(), encoding,
StringUtils.join( files.iterator(), SystemUtils.LINE_SEPARATOR ) );
}
catch ( IOException e )
Expand Down

0 comments on commit 42c3c3b

Please sign in to comment.