[ 
https://issues.apache.org/jira/browse/FOP-3281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18033734#comment-18033734
 ] 

Matthias Reischenbacher commented on FOP-3281:
----------------------------------------------

Created PR, see [https://github.com/apache/xmlgraphics-fop/pull/97]

Remaining issue: On Windows builds the following warnings are generated
{code:java}
Warning:  src\main\java\org\apache\fop\utils\DefaultErrorListener.java:[1] 
(misc) NewlineAtEndOfFile: Expected line ending for file is LF(\n), but 
CRLF(\r\n) is detected.
Warning:  
src\main\java\org\apache\fop\utils\text\AdvancedMessageFormat.java:[1] (misc) 
NewlineAtEndOfFile: Expected line ending for file is LF(\n), but CRLF(\r\n) is 
detected.
Warning:  src\main\java\org\apache\fop\utils\XMLResourceBundle.java:[1] (misc) 
NewlineAtEndOfFile: Expected line ending for file is LF(\n), but CRLF(\r\n) is 
detected. {code}
Strangely this occurs only under Windows, but not Unix/Mac.

Anybody an idea why this is occurring?

> Update the checkstyle dependency
> --------------------------------
>
>                 Key: FOP-3281
>                 URL: https://issues.apache.org/jira/browse/FOP-3281
>             Project: FOP
>          Issue Type: Improvement
>            Reporter: Matthias Reischenbacher
>            Assignee: Matthias Reischenbacher
>            Priority: Minor
>
> The main pom.xml uses version 2.14 of the maven-checkstyle-plugin, which 
> internally uses Checkstyle version 5.8.
> I suggest to update to version 3.6.0 of the plugin, so that Checkstyle 9.3 is 
> being used. This would improve compatibility with Checkstyle plugins for IDEs 
> (e.g. "CheckStyle-IDEA" with IntelliJ)
> Most notable changes:
> * The InnerAssignment check is validated much more strictly requiring to turn 
> off the check in several Java files via
> {code:java}
> // CSOFF: InnerAssignment
> {code}
> so that code like this doesn't cause warnings (extracted from 
> DelimitedTextRange.java):
> {code:java}
> if ((levels = UnicodeBidiAlgorithm.resolveLevels(buffer, 
> paragraphEmbeddingLevel)) != null) {
> {code}
> * The OneStatementPerLine check requires to move the "break;" statement 
> inside "switch" fragments into its own line
> {code:java}
> case Constants.FO_TABLE:
>     holderName = "table";
>     break;
> {code}
> * The ImportOrder check unfortunately works completely different now. Static 
> imports can't be displayed together with the group of the non-static imports, 
> when a new line should be generated between non-static and static imports. 
> Therefore all static imports have to be defined now below the non-static 
> imports. So a notation likeĀ 
> {code:java}
> import java.io.IOException;
> import java.io.Writer;
> import static java.lang.Character.isHighSurrogate;
> import org.apache.fop.events.EventBroadcaster;
> import org.apache.fop.render.pdf.PDFEventProducer;
> {code}
> has to be changed too
> {code:java}
> import java.io.IOException;
> import java.io.Writer;
> import org.apache.fop.events.EventBroadcaster;
> import org.apache.fop.render.pdf.PDFEventProducer;
> import static java.lang.Character.isHighSurrogate;
> {code}
> * Some files had CRLF line endings (e.g. 
> fop-core/src/main/java/org/apache/fop/render/pdf/ImageRawPNGAdapter.java). 
> Those were changed to LF line endings (like the majority of the fiels)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to