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 29, 2018
1 parent 90d16c6 commit 3f1abf5
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -4430,9 +4430,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 3f1abf5

Please sign in to comment.