[FOray-commit] SF.net SVN: foray: [7809] trunk/foray/foray-core/src/java/org/foray/core
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-07-22 19:56:33
|
Revision: 7809 Author: victormote Date: 2006-07-22 12:56:23 -0700 (Sat, 22 Jul 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7809&view=rev Log Message: ----------- Implement standard use of "final" modifier on local variables and parameters. Modified Paths: -------------- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java Modified: trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2006-07-22 19:42:06 UTC (rev 7808) +++ trunk/foray/foray-core/src/java/org/foray/core/ConfigurationParser.java 2006-07-22 19:56:23 UTC (rev 7809) @@ -87,9 +87,9 @@ * @param logger The logger to which errors and other messages * should be sent. */ - public ConfigurationParser(SessionConfig sessionConfig, - Configuration outputConfig, InputSource source, Log logger) - throws FOrayException { + public ConfigurationParser(final SessionConfig sessionConfig, + final Configuration outputConfig, final InputSource source, + final Log logger) throws FOrayException { this.sessionConfig = sessionConfig; this.outputConfig = outputConfig; this.filename = source; @@ -108,16 +108,16 @@ * @throws FOrayException If there are errors parsing the input. */ public void parseDocument() throws FOrayException { - XMLReader parser = createParser(); + final XMLReader parser = createParser(); parser.setContentHandler(this); try { parser.parse(filename); - } catch (SAXException e) { + } catch (final SAXException e) { if (e.getException() instanceof FOrayException) { throw (FOrayException)e.getException(); } throw new FOrayException(e); - } catch (IOException e) { + } catch (final IOException e) { throw new FOrayException(e); } } @@ -129,16 +129,16 @@ */ private XMLReader createParser() throws FOrayException { try { - SAXParserFactory spf = javax.xml.parsers.SAXParserFactory + final SAXParserFactory spf = javax.xml.parsers.SAXParserFactory .newInstance(); spf.setNamespaceAware(true); - XMLReader xmlReader = spf.newSAXParser().getXMLReader(); + final XMLReader xmlReader = spf.newSAXParser().getXMLReader(); logger.info("Config: Using " + xmlReader.getClass().getName() + " as SAX2 Parser."); return xmlReader; - } catch (javax.xml.parsers.ParserConfigurationException e) { + } catch (final javax.xml.parsers.ParserConfigurationException e) { throw new FOrayException(e); - } catch (SAXException e) { + } catch (final SAXException e) { throw new FOrayException(e); } } @@ -150,7 +150,7 @@ * Set the locator which is used to report the position of the element * in the source document. */ - public void setDocumentLocator(Locator locator) { + public void setDocumentLocator(final Locator locator) { this.locator = locator; } @@ -158,8 +158,8 @@ * extracts the element and attribute name and sets the fitting status and * datatype values */ - public void startElement(String uri, String localName, String qName, - Attributes attributes) { + public void startElement(final String uri, final String localName, + final String qName, final Attributes attributes) { if (localName.equals("key")) { status += IN_KEY; return; @@ -183,7 +183,8 @@ * stores subentries or entries into their hashes (map for subentries, * configuration for entry) */ - public void endElement(String uri, String localName, String qName) { + public void endElement(final String uri, final String localName, + final String qName) { if (localName.equals("entry")) { this.store(key, value); status = OUT; @@ -200,10 +201,10 @@ * extracts characters from text nodes and puts them into their respective * variables */ - public void characters(char[] ch, int start, int length) { - char characters[] = new char[length]; + public void characters(final char[] ch, final int start, final int length) { + final char characters[] = new char[length]; System.arraycopy(ch, start, characters, 0, length); - String text = new String(characters); + final String text = new String(characters); switch (status) { case IN_KEY: key = text; @@ -220,7 +221,7 @@ * @param key a string containing the key value for the configuration * @param value a string containing the value for the configuration */ - private void store(String key, String value) { + private void store(final String key, final String value) { // Try the SessionConfig first. if (this.sessionConfig.parseOption(key, value, SessionConfig.PRECEDENCE_CONFIG_FILE)) { Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2006-07-22 19:42:06 UTC (rev 7808) +++ trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2006-07-22 19:56:23 UTC (rev 7809) @@ -112,7 +112,7 @@ * Private constructor used only by the other constructors. * @param session The parent FOraySession. */ - private FOrayDocument(FOraySession session) { + private FOrayDocument(final FOraySession session) { this.session = session; session.registerDocument(this); treeBuilder = this.session.getFOTreeServer().makeFOTree(); @@ -127,8 +127,9 @@ * @throws FOrayException If "null" parser is passed and there is an error * creating one. */ - public FOrayDocument(FOraySession session, InputSource inputSource, - XMLReader parser) throws FOrayException { + public FOrayDocument(final FOraySession session, + final InputSource inputSource, XMLReader parser) + throws FOrayException { this(session); this.inputSource = inputSource; if (parser == null) { @@ -143,8 +144,8 @@ * @param session The parent FOraySession. * @param domDocument A DOM Document. */ - public FOrayDocument (FOraySession session, Document domDocument) - throws FOrayException { + public FOrayDocument (final FOraySession session, + final Document domDocument) throws FOrayException { this(session); this.inputSource = new DocumentInputSource(domDocument); this.parser = new DocumentReader(); @@ -156,8 +157,9 @@ * @param session The parent FOraySession. * @param jaxpTransformer A JAXP Transformer. */ - public FOrayDocument (FOraySession session, Transformer jaxpTransformer, - Source jaxpSource) throws FOrayException { + public FOrayDocument (final FOraySession session, + final Transformer jaxpTransformer, final Source jaxpSource) + throws FOrayException { this(session); this.jaxpTransformer = jaxpTransformer; this.jaxpSource = jaxpSource; @@ -169,28 +171,28 @@ * xslt input. * @param session The parent FOraySession. */ - public FOrayDocument (FOraySession session, URL xmlInput, URL xsltInput) - throws FOrayException { + public FOrayDocument (final FOraySession session, final URL xmlInput, + final URL xsltInput) throws FOrayException { this(session); InputStream xmlInputStream = null; try { xmlInputStream = xmlInput.openStream(); - } catch (IOException e) { + } catch (final IOException e) { throw new FOrayException(e); } this.jaxpSource = new StreamSource(xmlInputStream); InputStream xsltInputStream = null; try { xsltInputStream = xsltInput.openStream(); - } catch (IOException e) { + } catch (final IOException e) { throw new FOrayException(e); } - Source xsltSource = new StreamSource(xsltInputStream); - TransformerFactory factory = TransformerFactory.newInstance(); + final Source xsltSource = new StreamSource(xsltInputStream); + final TransformerFactory factory = TransformerFactory.newInstance(); this.jaxpTransformer = null; try { this.jaxpTransformer = factory.newTransformer(xsltSource); - } catch (TransformerConfigurationException e) { + } catch (final TransformerConfigurationException e) { throw new FOrayException(e); } this.jaxpResult = new SAXResult(this.treeBuilder); @@ -200,7 +202,7 @@ * Registers a FOrayTarget instance that this FOrayDocument should process. * @param target The FOrayTarget instance that should be processed. */ - protected void registerTarget(FOrayTarget target) { + protected void registerTarget(final FOrayTarget target) { if (target == null) { return; } @@ -229,7 +231,7 @@ return this.jaxpResult; } - public void setTarget(FOrayTarget target) throws FOrayException { + public void setTarget(final FOrayTarget target) throws FOrayException { if (target.getDocument() != this) { throw new FOrayException("FOrayTarget not a child of this " + "FOrayDocument."); @@ -239,14 +241,14 @@ public synchronized void process() throws FOrayException { // Get the FOrayTarget to process. - FOrayTarget target = (FOrayTarget) targetList.get(0); + final FOrayTarget target = (FOrayTarget) targetList.get(0); processTarget(target); } /** * Build the formatting object tree from the input. */ - public synchronized void processTarget(FOrayTarget target) + public synchronized void processTarget(final FOrayTarget target) throws FOrayException { this.setTarget(target); this.treeBuilder.setFontConsumer(this.getFontConsumer()); @@ -258,34 +260,34 @@ // SAX Events generated by a JAXP Transformer jaxpTransformer.transform(this.jaxpSource, jaxpResult); } - } catch (SAXException e) { + } catch (final SAXException e) { if (e.getException() instanceof FOrayException) { throw (FOrayException)e.getException(); } throw new FOrayException(e); - } catch (TransformerException e) { + } catch (final TransformerException e) { if (e.getException() instanceof FOrayException) { throw (FOrayException)e.getException(); } throw new FOrayException(e); - } catch (IOException e) { + } catch (final IOException e) { throw new FOrayException(e); } finally { cleanup(currentTarget); } } - public void cleanup(FOrayTarget target) { + public void cleanup(final FOrayTarget target) { } /** * Dumps an error */ - public void dumpError(Exception e) { + public void dumpError(final Exception e) { if (! this.getConfiguration().optionVerbosity().equals("debug")) { return; } - Log log = getLogger(); + final Log log = getLogger(); if (e instanceof SAXException) { log.error(e.getMessage()); if (((SAXException)e).getException() != null) { @@ -371,20 +373,21 @@ * @return The newly-created SAX parser. */ XMLReader createParser() throws FOrayException { - SAXParserFactory spf = javax.xml.parsers.SAXParserFactory.newInstance(); + final SAXParserFactory spf = + javax.xml.parsers.SAXParserFactory.newInstance(); spf.setNamespaceAware(true); XMLReader xmlReader = null; try { xmlReader = spf.newSAXParser().getXMLReader(); - } catch (javax.xml.parsers.ParserConfigurationException e) { + } catch (final javax.xml.parsers.ParserConfigurationException e) { throw new FOrayException(e); - } catch (SAXException e) { + } catch (final SAXException e) { throw new FOrayException(e); } try { xmlReader.setFeature( "http://xml.org/sax/features/namespace-prefixes", true); - } catch (SAXException e) { + } catch (final SAXException e) { throw new FOrayException("Error in setting up parser feature " + "namespace-prefixes\n" + "You need a parser which supports SAX version 2", e); Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2006-07-22 19:42:06 UTC (rev 7808) +++ trunk/foray/foray-core/src/java/org/foray/core/FOrayException.java 2006-07-22 19:56:23 UTC (rev 7809) @@ -46,41 +46,42 @@ * * @param message descriptive message */ - public FOrayException(String message) { + public FOrayException(final String message) { super(message); this.contextMessage = null; } - public FOrayException(String message, String contextMessage) { + public FOrayException(final String message, final String contextMessage) { super(message); this.contextMessage = contextMessage; } - public FOrayException(Throwable e) { + public FOrayException(final Throwable e) { super(e.getMessage()); setException(e); this.contextMessage = null; } - public FOrayException(Throwable e, String contextMessage) { + public FOrayException(final Throwable e, final String contextMessage) { super(e.getMessage()); setException(e); this.contextMessage = contextMessage; } - public FOrayException(String message, Throwable e) { + public FOrayException(final String message, final Throwable e) { super(message); setException(e); this.contextMessage = null; } - public FOrayException(String message, Throwable e, String contextMessage) { + public FOrayException(final String message, final Throwable e, + final String contextMessage) { super(message); setException(e); this.contextMessage = contextMessage; } - protected void setException(Throwable t) { + protected void setException(final Throwable t) { _exception = t; } @@ -88,7 +89,7 @@ return _exception; } - public void setContextMessage(String contextMessage) { + public void setContextMessage(final String contextMessage) { this.contextMessage = contextMessage; } @@ -135,7 +136,7 @@ } } - public void printStackTrace(PrintStream stream) { + public void printStackTrace(final PrintStream stream) { synchronized (stream) { super.printStackTrace(stream); if (_exception != null) { @@ -149,7 +150,7 @@ } } - public void printStackTrace(PrintWriter writer) { + public void printStackTrace(final PrintWriter writer) { synchronized (writer) { super.printStackTrace(writer); if (_exception != null) { Modified: trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2006-07-22 19:42:06 UTC (rev 7808) +++ trunk/foray/foray-core/src/java/org/foray/core/FOraySession.java 2006-07-22 19:56:23 UTC (rev 7809) @@ -110,11 +110,12 @@ * instance will be created by this FOray Session. If an instance is passed, * it needs to be fully configured and ready to be used. */ - public FOraySession(Log logger, SessionConfig configuration, - FontServer fontServer, HyphenationServer hyphenServer, - TextServer textServer, GraphicServer graphicServer, - FOTreeFactory foTreeFactory, AreaTreeFactory areaTreeFactory, - LayoutFactory layoutFactory) throws FOrayException { + public FOraySession(final Log logger, final SessionConfig configuration, + final FontServer fontServer, final HyphenationServer hyphenServer, + final TextServer textServer, final GraphicServer graphicServer, + final FOTreeFactory foTreeFactory, + final AreaTreeFactory areaTreeFactory, + final LayoutFactory layoutFactory) throws FOrayException { /* Validate Logger. */ if (logger == null) { throw new FOrayException("Logger required for FOraySession."); @@ -185,7 +186,7 @@ * Registers a FOrayDocument instance that this FOraySession should process. * @param document The FOrayDocument instance that should be processed. */ - protected void registerDocument(FOrayDocument document) { + protected void registerDocument(final FOrayDocument document) { if (document == null) { return; } @@ -197,14 +198,15 @@ */ private void setupFontServer() { if (log.isDebugEnabled()) { - String[] systemFontFamilies = fontServer.getSystemFontFamilyList(); + final String[] systemFontFamilies = + fontServer.getSystemFontFamilyList(); if (systemFontFamilies != null) { log.debug("Java font family names:"); for (int i = 0; i < systemFontFamilies.length; i++) { log.debug(" " + systemFontFamilies[i]); } } - java.awt.Font[] systemFonts = fontServer.getSystemFontList(); + final java.awt.Font[] systemFonts = fontServer.getSystemFontList(); if (systemFonts != null) { log.debug("Java font names:"); for (int i = 0; i < systemFonts.length; i++) { @@ -242,9 +244,9 @@ * processes each one. */ public void process() throws FOrayException { - Iterator iter = documentList.iterator(); + final Iterator iter = documentList.iterator(); while (iter.hasNext()) { - FOrayDocument document = (FOrayDocument) iter.next(); + final FOrayDocument document = (FOrayDocument) iter.next(); document.process(); } } @@ -257,7 +259,7 @@ * Sets the EntityResolver that should be used to resolve XML entities. * @param entityResolver The EntityResolver that should be set. */ - public void setEntityResolver(EntityResolver entityResolver) { + public void setEntityResolver(final EntityResolver entityResolver) { this.entityResolver = entityResolver; } Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-07-22 19:42:06 UTC (rev 7808) +++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-07-22 19:56:23 UTC (rev 7809) @@ -110,9 +110,9 @@ private FontConsumer fontConsumer; - public FOrayTarget(FOrayDocument document, OutputTarget outputTarget, - Layout layout, OutputStream outputStream) - throws FOrayException { + public FOrayTarget(final FOrayDocument document, + final OutputTarget outputTarget, final Layout layout, + final OutputStream outputStream) throws FOrayException { // Validate the FOrayDocument. this.document = document; if (this.document == null) { @@ -144,7 +144,7 @@ } /* Obtain a FontConsumer instance. */ - FontServer server = getFontServer(); + final FontServer server = getFontServer(); this.fontConsumer = server.makeFontConsumer(); this.fontConsumer.setFontSources(this.getOutputTarget() .getFontSources()); @@ -177,7 +177,7 @@ startTime = System.currentTimeMillis(); try { outputTarget.startOutput(); - } catch (IOException e) { + } catch (final IOException e) { throw new FOrayException(e); } } @@ -190,10 +190,10 @@ try { processQueue(true); outputTarget.stopOutput(); - } catch (AreaRException e) { + } catch (final AreaRException e) { throw new SAXException(e); } - catch (IOException e) { + catch (final IOException e) { throw new SAXException(e); } @@ -201,8 +201,8 @@ System.gc(); // This takes time but gives better results } - long memoryNow = runtime.totalMemory() - runtime.freeMemory(); - long memoryUsed = (memoryNow - initialMemory) / 1024L; + final long memoryNow = runtime.totalMemory() - runtime.freeMemory(); + final long memoryUsed = (memoryNow - initialMemory) / 1024L; getLogger().debug("Initial heap size: " + (initialMemory/1024L) + "Kb"); getLogger().debug("Current heap size: " + (memoryNow/1024L) + "Kb"); @@ -215,7 +215,7 @@ + "comparatively"); } - long timeUsed = System.currentTimeMillis() - startTime; + final long timeUsed = System.currentTimeMillis() - startTime; getLogger().debug("Total time used: " + timeUsed + "ms"); getLogger().debug("Pages rendered: " + pageCount); @@ -236,28 +236,28 @@ are not all valid. In this case we defer the rendering until they are all valid. */ - public void render(PageSequence pageSequence) throws FOrayException { + public void render(final PageSequence pageSequence) throws FOrayException { pageSequenceCount ++; getLogger().info("Starting layout of page-sequence " + pageSequenceCount + "."); if (this.outputTarget instanceof Renderer) { - Renderer renderer = (Renderer) this.outputTarget; - org.axsl.areaR.AreaTree areaTreeR = getRenderedAreaTree(); + final Renderer renderer = (Renderer) this.outputTarget; + final org.axsl.areaR.AreaTree areaTreeR = getRenderedAreaTree(); renderer.setAreaTree(areaTreeR); - org.axsl.areaW.PageCollection pageCollection = - areaTree.makePageCollection(pageSequence); + final org.axsl.areaW.PageCollection pageCollection = + areaTree.makePageCollection(pageSequence); try { layout.formatPageSequence(pageCollection); - } catch (AreaWException e) { + } catch (final AreaWException e) { throw new FOrayException(e); - } catch (LayoutException e) { + } catch (final LayoutException e) { throw new FOrayException(e); } try { processQueue(false); - } catch (AreaRException e1) { + } catch (final AreaRException e1) { throw new FOrayException(e1); - } catch (IOException e1) { + } catch (final IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } @@ -277,25 +277,26 @@ private org.axsl.areaR.AreaTree getRenderedAreaTree() throws FOrayException { - org.axsl.areaW.AreaTree areaTreeW = getCreatedAreaTree(); + final org.axsl.areaW.AreaTree areaTreeW = getCreatedAreaTree(); if (! (areaTreeW instanceof org.axsl.areaR.AreaTree)) { throw new FOrayException("Area Tree cannot be rendered."); } return (org.axsl.areaR.AreaTree) areaTreeW; } - public void pageComplete(AreaTreeEvent event) { - org.axsl.areaW.PageArea page = event.getPage(); - org.axsl.areaR.PageArea pageToRender = (PageArea) page; + public void pageComplete(final AreaTreeEvent event) { + final org.axsl.areaW.PageArea page = event.getPage(); + final org.axsl.areaR.PageArea pageToRender = (PageArea) page; try { queuePage(pageToRender); - } catch (AreaWException e) { + } catch (final AreaWException e) { /* TODO: Do something better with this. */ e.printStackTrace(); } } - public synchronized void queuePage(PageArea page) throws AreaWException { + public synchronized void queuePage(final PageArea page) + throws AreaWException { /* * We run the pages through a queue because any page page that contains * an unresolved ref-id prevents subsequent pages from being rendered. @@ -321,14 +322,14 @@ If an entry can't be processed, then the queue can't move forward, so return. */ - private synchronized void processQueue(boolean force) + private synchronized void processQueue(final boolean force) throws AreaRException, IOException { if (! (this.outputTarget instanceof Renderer)) { return; } - Renderer renderer = (Renderer) this.outputTarget; + final Renderer renderer = (Renderer) this.outputTarget; while (renderQueue.size() > 0) { - PageArea page = (PageArea) renderQueue.get(0); + final PageArea page = (PageArea) renderQueue.get(0); if (force || page.firstUnresolvedRefId() == null) { renderer.render(page); renderQueue.remove(0); @@ -351,7 +352,7 @@ * do not need to do anything with it, so we ignore it. * @param event The FOTreeEvent that was fired. */ - public void foFObjComplete(FOTreeEvent event) { + public void foFObjComplete(final FOTreeEvent event) { } /** @@ -359,13 +360,13 @@ * FOTreeEvent that is fired when a PageSequence object has been completed. * @param event the FOTreeEvent that was fired */ - public void foPageSequenceComplete(FOTreeEvent event) { + public void foPageSequenceComplete(final FOTreeEvent event) { try { - boolean shouldRender = this.getConfiguration().isModeRender(); + final boolean shouldRender = this.getConfiguration().isModeRender(); if (shouldRender) { render(event.getPageSequence()); } - } catch (FOrayException e) { + } catch (final FOrayException e) { // TODO Auto-generated catch block e.printStackTrace(); } @@ -376,11 +377,11 @@ * is fired when the Document has been completely parsed. * @param event the FOTreeEvent that was fired */ - public void foDocumentComplete(FOTreeEvent event) { + public void foDocumentComplete(final FOTreeEvent event) { getCreatedAreaTree().createDocumentNodes(); try { stopRenderer(); - } catch (SAXException e) { + } catch (final SAXException e) { e.printStackTrace(); } } @@ -431,7 +432,7 @@ if (this.outputStream != null) { try { this.outputStream.close(); - } catch (Exception e) { + } catch (final Exception e) { } } } Modified: trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java =================================================================== --- trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2006-07-22 19:42:06 UTC (rev 7808) +++ trunk/foray/foray-core/src/java/org/foray/core/SessionConfig.java 2006-07-22 19:56:23 UTC (rev 7809) @@ -41,7 +41,7 @@ * if any. */ URL baseDocument = null; - public SessionConfig(Log logger) { + public SessionConfig(final Log logger) { super(logger); } @@ -53,7 +53,7 @@ * Sets the default values that should be used unless overridden later. */ protected void setDefaults() { - URL baseDirectory = parseURLDirectory("base-directory", + final URL baseDirectory = parseURLDirectory("base-directory", System.getProperty("user.dir")); put("base-directory", baseDirectory, PRECEDENCE_DEFAULT); @@ -69,12 +69,13 @@ put("mode", "render", PRECEDENCE_DEFAULT); } - public boolean parseOption(String key, String value, int precedenceValue) { + public boolean parseOption(final String key, final String value, + final int precedenceValue) { if (key.equals("cache-graphics") || key.equals("dump-configuration") || key.equals("stroke-svg-text")) { // Boolean value. - Boolean booleanValue = this.parseBoolean(key, value); + final Boolean booleanValue = this.parseBoolean(key, value); put(key, booleanValue, precedenceValue); return true; } @@ -82,13 +83,13 @@ || key.equals("font-base-directory") || key.equals("hyphenation-base-directory")) { // URL for a directory. - URL baseDir = parseURLDirectory(key, value); + final URL baseDir = parseURLDirectory(key, value); put (key, baseDir, precedenceValue); return true; } if (key.equals("font-configuration")) { // URL for a file. - URL baseDir = parseURLFile(key, value); + final URL baseDir = parseURLFile(key, value); put (key, baseDir, precedenceValue); return true; } @@ -127,7 +128,7 @@ return (URL) getValue("base-directory"); } - public void setBaseDirectory(URL newBaseDir, int precedence) { + public void setBaseDirectory(final URL newBaseDir, final int precedence) { put ("base-directory", newBaseDir, precedence); } @@ -142,7 +143,7 @@ } public URL optionFontBaseDirectory() { - URL value = (URL) getValue("font-base-directory"); + final URL value = (URL) getValue("font-base-directory"); return value; } @@ -155,7 +156,7 @@ } public URL optionHyphenationBaseDirectory() { - URL value = (URL) getValue("hyphenation-base-directory"); + final URL value = (URL) getValue("hyphenation-base-directory"); if (value == null) { return optionBaseDirectory(); } @@ -187,7 +188,7 @@ * resources with relative URLs. * @param baseDocument The path to the base document. */ - public void setBaseDocument(URL baseDocument) { + public void setBaseDocument(final URL baseDocument) { this.baseDocument = baseDocument; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |