Author: ssteiner Date: Thu Feb 3 15:00:46 2022 New Revision: 1897728 URL: http://svn.apache.org/viewvc?rev=1897728&view=rev Log: Fix compile warnings
Modified: xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/accessibility/pdf/MissingLanguageWarningTestCase.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/EventProcessingTestCase.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/FlowNamedNotMappedTestCase.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/intermediate/AbstractIntermediateTest.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/memory/MemoryEater.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/RendererFactoryTestCase.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java Modified: xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/fonts/autodetect/FontFileFinder.java Thu Feb 3 15:00:46 2022 @@ -71,7 +71,7 @@ public class FontFileFinder extends Dire * @return IOFileFilter font directory filter */ protected static IOFileFilter getDirectoryFilter() { - return FileFilterUtils.andFileFilter( + return FileFilterUtils.and( FileFilterUtils.directoryFileFilter(), FileFilterUtils.notFileFilter(FileFilterUtils.prefixFileFilter(".")) ); @@ -82,7 +82,7 @@ public class FontFileFinder extends Dire * @return IOFileFilter font file filter */ protected static IOFileFilter getFileFilter() { - return FileFilterUtils.andFileFilter( + return FileFilterUtils.and( FileFilterUtils.fileFileFilter(), new WildcardFileFilter( new String[] {"*.ttf", "*.otf", "*.pfb", "*.ttc"}, Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/accessibility/pdf/MissingLanguageWarningTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/accessibility/pdf/MissingLanguageWarningTestCase.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/accessibility/pdf/MissingLanguageWarningTestCase.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/accessibility/pdf/MissingLanguageWarningTestCase.java Thu Feb 3 15:00:46 2022 @@ -79,7 +79,7 @@ public class MissingLanguageWarningTestC userAgent.setAccessibility(true); eventChecker = new MissingLanguageEventChecker(); userAgent.getEventBroadcaster().addEventListener(eventChecker); - fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, new NullOutputStream()); + fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, NullOutputStream.NULL_OUTPUT_STREAM); } @Test Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/EventProcessingTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/EventProcessingTestCase.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/EventProcessingTestCase.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/EventProcessingTestCase.java Thu Feb 3 15:00:46 2022 @@ -79,7 +79,7 @@ public class EventProcessingTestCase { FOUserAgent userAgent = fopFactory.newFOUserAgent(); userAgent.getEventBroadcaster().addEventListener(eventChecker); - Fop fop = fopFactory.newFop(mimeType, userAgent, new NullOutputStream()); + Fop fop = fopFactory.newFop(mimeType, userAgent, NullOutputStream.NULL_OUTPUT_STREAM); Transformer transformer = tFactory.newTransformer(); Source src = new StreamSource(inStream); Result res = new SAXResult(fop.getDefaultHandler()); Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/FlowNamedNotMappedTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/FlowNamedNotMappedTestCase.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/FlowNamedNotMappedTestCase.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/events/FlowNamedNotMappedTestCase.java Thu Feb 3 15:00:46 2022 @@ -64,7 +64,7 @@ public class FlowNamedNotMappedTestCase FOUserAgent userAgent = fopFactory.newFOUserAgent(); flowChecker = new FlowNameNotMappedEventChecker(); userAgent.getEventBroadcaster().addEventListener(flowChecker); - fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, new NullOutputStream()); + fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, NullOutputStream.NULL_OUTPUT_STREAM); Source src = new StreamSource(new FileInputStream("test/events/flowNameNotMapped.fo")); SAXResult res = new SAXResult(fop.getDefaultHandler()); Transformer transformer = TransformerFactory.newInstance().newTransformer(); Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/intermediate/AbstractIntermediateTest.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/intermediate/AbstractIntermediateTest.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/intermediate/AbstractIntermediateTest.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/intermediate/AbstractIntermediateTest.java Thu Feb 3 15:00:46 2022 @@ -192,7 +192,7 @@ public abstract class AbstractIntermedia out = new FileOutputStream(tgtFile); out = new BufferedOutputStream(out); } else { - out = new NullOutputStream(); + out = NullOutputStream.NULL_OUTPUT_STREAM; } try { Source src = new DOMSource(intermediate); Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/memory/MemoryEater.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/memory/MemoryEater.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/memory/MemoryEater.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/memory/MemoryEater.java Thu Feb 3 15:00:46 2022 @@ -77,7 +77,7 @@ public final class MemoryEater { Transformer transformer = replicatorTemplates.newTransformer(); transformer.setParameter("repeats", replicatorRepeats); - OutputStream out = new NullOutputStream(); //write to /dev/nul + OutputStream out = NullOutputStream.NULL_OUTPUT_STREAM; //write to /dev/nul try { FOUserAgent userAgent = fopFactory.newFOUserAgent(); Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, out); Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/RendererFactoryTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/RendererFactoryTestCase.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/RendererFactoryTestCase.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/RendererFactoryTestCase.java Thu Feb 3 15:00:46 2022 @@ -112,18 +112,18 @@ public class RendererFactoryTestCase { ua = fopFactory.newFOUserAgent(); foEventHandler = factory.createFOEventHandler( - ua, MimeConstants.MIME_PDF, new NullOutputStream()); + ua, MimeConstants.MIME_PDF, NullOutputStream.NULL_OUTPUT_STREAM); assertTrue(foEventHandler instanceof AreaTreeHandler); ua = fopFactory.newFOUserAgent(); foEventHandler = factory.createFOEventHandler( - ua, MimeConstants.MIME_RTF, new NullOutputStream()); + ua, MimeConstants.MIME_RTF, NullOutputStream.NULL_OUTPUT_STREAM); assertTrue(foEventHandler instanceof RTFHandler); ua = fopFactory.newFOUserAgent(); try { foEventHandler = factory.createFOEventHandler( - ua, "invalid/format", new NullOutputStream()); + ua, "invalid/format", NullOutputStream.NULL_OUTPUT_STREAM); fail("Expected UnsupportedOperationException"); } catch (UnsupportedOperationException uoe) { //expected @@ -139,7 +139,7 @@ public class RendererFactoryTestCase { } ua = fopFactory.newFOUserAgent(); - overrideFOEventHandler = new RTFHandler(ua, new NullOutputStream()); + overrideFOEventHandler = new RTFHandler(ua, NullOutputStream.NULL_OUTPUT_STREAM); ua.setFOEventHandlerOverride(overrideFOEventHandler); foEventHandler = factory.createFOEventHandler( ua, null, null); Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/ImageHandlingTestCase.java Thu Feb 3 15:00:46 2022 @@ -184,7 +184,7 @@ public class ImageHandlingTestCase exten + "rotate=\"30 30 0 15\">Hello SVG with FOP</text>\n" + "</svg>"; SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(null); - Document doc = factory.createDocument(null, IOUtils.toInputStream(svg)); + Document doc = factory.createDocument(null, IOUtils.toInputStream(svg, "utf-8")); ByteArrayOutputStream bos = new ByteArrayOutputStream(); new PSImageHandlerSVG().handleImage( new PSRenderingContext(ua, new PSGenerator(bos), new FontInfo()), Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/render/ps/svg/GradientTestCase.java Thu Feb 3 15:00:46 2022 @@ -68,7 +68,7 @@ public class GradientTestCase { svgGraphics2D.setGraphicContext(new GraphicContext()); svgGraphics2D.translate(100, 100); svgGraphics2D.applyPaint(gradient, true); - String expected = IOUtils.toString(getClass().getResourceAsStream(expectedResourceName)); + String expected = IOUtils.toString(getClass().getResourceAsStream(expectedResourceName), "utf-8"); assertEquals(expected.replace("\r", ""), out.toString()); } Modified: xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java?rev=1897728&r1=1897727&r2=1897728&view=diff ============================================================================== --- xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java (original) +++ xmlgraphics/fop/trunk/fop-core/src/test/java/org/apache/fop/threading/FOPTestbed.java Thu Feb 3 15:00:46 2022 @@ -266,7 +266,7 @@ public class FOPTestbed File outfile = new File(outputDir, df.format(num) + fop.getTargetFileExtension()); OutputStream out; if (writeToDevNull) { - out = new NullOutputStream(); + out = NullOutputStream.NULL_OUTPUT_STREAM; } else { out = new java.io.FileOutputStream(outfile); out = new java.io.BufferedOutputStream(out); --------------------------------------------------------------------- To unsubscribe, e-mail: fop-commits-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-commits-h...@xmlgraphics.apache.org