Revision: 7806
Author: victormote
Date: 2006-07-22 11:11:33 -0700 (Sat, 22 Jul 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7806&view=rev
Log Message:
-----------
Implement standard use of "final" modifier on local variables and parameters.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
trunk/foray/foray-app/src/java/org/foray/app/FOray.java
trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
trunk/foray/foray-app/src/java/org/foray/app/Options.java
trunk/foray/foray-app/src/java/org/foray/app/OutputTargetFactory.java
trunk/foray/foray-app/src/java/org/foray/app/PrintStarter.java
trunk/foray/foray-app/src/java/org/foray/app/Starter.java
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTaskStarter.java
trunk/foray/foray-app/src/java/org/foray/app/ant/RunTest.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoFO2PDF.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoObj2PDF.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoObj2XML.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoXML2FO.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoXML2PDF.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectMember.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeam.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamInputSource.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/AbstractObjectReader.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/EasyContentHandlerProxy.java
trunk/foray/foray-app/src/java/org/foray/demo/servlet/AbstractDemoServlet.java
trunk/foray/foray-app/src/java/org/foray/demo/servlet/DemoPrintServlet.java
trunk/foray/foray-app/src/java/org/foray/demo/servlet/DemoServlet.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-07-22 16:15:41 UTC (rev 7805)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-07-22 18:11:33 UTC (rev 7806)
@@ -68,9 +68,9 @@
private Translator resource;
private UserMessage userMessage;
- public AWTStarter(Log logger, SessionConfig sessionConfig,
- OutputConfig renderConfig, CommandLineOptions commandLineOptions)
- throws FOrayException {
+ public AWTStarter(final Log logger, final SessionConfig sessionConfig,
+ final OutputConfig renderConfig,
+ final CommandLineOptions commandLineOptions) throws FOrayException {
super(logger, sessionConfig, renderConfig, commandLineOptions);
init();
}
@@ -80,7 +80,7 @@
try {
UIManager.setLookAndFeel(
new javax.swing.plaf.metal.MetalLookAndFeel());
- } catch (Exception e) {
+ } catch (final Exception e) {
e.printStackTrace();
}
@@ -88,7 +88,7 @@
if (language == null) {
try {
language = System.getProperty("user.language");
- } catch(SecurityException se) {
+ } catch(final SecurityException se) {
// if this is running in a secure place
}
}
@@ -98,12 +98,14 @@
+ "messages." + language));
resource.setMissingEmphasized(false);
- SessionConfig configuration = this.options.getSessionConfig();
- FOraySession session = FOraySpecific.makeFOraySession(configuration);
+ final SessionConfig configuration = this.options.getSessionConfig();
+ final FOraySession session = FOraySpecific.makeFOraySession(
+ configuration);
this.document = new FOrayDocument(session, inputSource, null);
- OutputConfig renderOptions = commandLineOptions.getRendererOptions();
+ final OutputConfig renderOptions =
+ commandLineOptions.getRendererOptions();
this.renderer = new AWTRenderer(this.getLogger(), renderOptions);
frame = createPreviewDialog(renderer, resource);
renderer.setProgressListener(frame);
@@ -116,7 +118,7 @@
frame.progress(resource.getString("Build FO tree") + " ...");
try {
document.process();
- } catch (Exception e) {
+ } catch (final Exception e) {
frame.reportException(e);
if (e instanceof FOrayException) {
throw (FOrayException)e;
@@ -127,19 +129,21 @@
frame.showPage();
}
- protected PreviewDialog createPreviewDialog(AWTRenderer renderer,
- Translator res) {
- PreviewDialog frame = new PreviewDialog(renderer, res, getLogger());
+ protected PreviewDialog createPreviewDialog(final AWTRenderer renderer,
+ final Translator res) {
+ final PreviewDialog frame = new PreviewDialog(renderer, res,
+ getLogger());
frame.validate();
frame.addWindowListener(new WindowAdapter() {
- public void windowClosed(WindowEvent we) {
- System.exit(0);
- }
- });
+ public void windowClosed(final WindowEvent we) {
+ System.exit(0);
+ }
+ });
// center window
- Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- Dimension frameSize = frame.getSize();
+ final Dimension screenSize = Toolkit.getDefaultToolkit()
+ .getScreenSize();
+ final Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
@@ -171,7 +175,7 @@
}
in = url.openStream();
- } catch (Exception ex) {
+ } catch (final Exception ex) {
getLogger().error("Can't find URL to: <" + path + "> "
+ ex.getMessage());
getLogger().error(ex.getMessage());
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-07-22 16:15:41 UTC (rev 7805)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-07-22 18:11:33 UTC (rev 7806)
@@ -87,7 +87,7 @@
/** State variable indicating current index into args[]. */
private transient int currentArgument = 0;
- public CommandLineOptions(String[] args, Log logger)
+ public CommandLineOptions(final String[] args, final Log logger)
throws FOrayException, FileNotFoundException {
this.log = logger;
@@ -101,17 +101,17 @@
checkSettings();
debug();
}
- } catch (FOrayException e) {
+ } catch (final FOrayException e) {
printUsage(log);
throw e;
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
printUsage(log);
throw e;
}
}
private void adjustLogger() {
- String verbosity = this.sessionConfig.optionVerbosity();
+ final String verbosity = this.sessionConfig.optionVerbosity();
if (verbosity.equals("debug")) {
setLogger(Logging.makeDebugLogger());
} else if (verbosity.equals("quiet")) {
@@ -126,10 +126,10 @@
* @exception FOrayException if there was an error in the format of the
* options.
*/
- private boolean parseOptions(String args[]) throws FOrayException {
+ private boolean parseOptions(final String args[]) throws FOrayException {
this.currentArgument = 0;
while (currentArgument < args.length) {
- boolean optionParsedSuccessfully = parseOneOption(args);
+ final boolean optionParsedSuccessfully = parseOneOption(args);
if (! optionParsedSuccessfully) {
printUsage(log);
return false;
@@ -144,7 +144,7 @@
* @return True if the option was successfully parsed, false otherwise.
* @throws FOrayException
*/
- private boolean parseOneOption(String[] args) throws FOrayException {
+ private boolean parseOneOption(final String[] args) throws FOrayException {
if (args[currentArgument].equals("-c")) {
if ((currentArgument + 1 == args.length)
|| (args[currentArgument + 1].charAt(0) == '-')) {
@@ -154,14 +154,14 @@
try {
this.userConfig = URLFactory.createURL(
args[currentArgument + 1]);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
throw new FOrayException(e);
}
currentArgument++;
return true;
}
if (args[currentArgument].equals("-so")) {
- boolean success = parseConfigurationOption(args);
+ final boolean success = parseConfigurationOption(args);
if (success) {
currentArgument += 2;
}
@@ -174,10 +174,10 @@
throw new FOrayException("you must specify the fo file "
+ "for the '-fo' option");
}
- String foString = args[currentArgument + 1];
+ final String foString = args[currentArgument + 1];
try {
this.foInput = URLFactory.createURL(foString);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
throw new FOrayException("Malformed URL: " + foString);
}
this.sessionConfig.setBaseDocument(this.foInput);
@@ -191,10 +191,10 @@
throw new FOrayException("you must specify the stylesheet "
+ "file for the '-xsl' option");
}
- String xsltString = args[currentArgument + 1];
+ final String xsltString = args[currentArgument + 1];
try {
xsltInput = URLFactory.createURL(xsltString);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
throw new FOrayException("Malformed URL: " + xsltString);
}
currentArgument++;
@@ -207,10 +207,10 @@
throw new FOrayException("you must specify the input file "
+ "for the '-xml' option");
}
- String xmlString = args[currentArgument + 1];
+ final String xmlString = args[currentArgument + 1];
try {
this.xmlInput = URLFactory.createURL(xmlString);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
throw new FOrayException("Malformed URL: " + xmlString);
}
this.sessionConfig.setBaseDocument(xmlInput);
@@ -303,7 +303,7 @@
inputmode = INPUT_FO;
try {
foInput = URLFactory.createURL(args[currentArgument]);
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
throw new FOrayException(e);
}
} else if (outputmode == INPUT_NOT_SET) {
@@ -333,7 +333,7 @@
/**
* @param args
*/
- private boolean parseConfigurationOption(String[] args)
+ private boolean parseConfigurationOption(final String[] args)
throws FOrayException {
/*
* Configuration options are always in key-value pairs, so there are
@@ -344,8 +344,8 @@
throw new FOrayException("Argument " + currentArgument
+ " must be followed by key and value.");
}
- String key = args[currentArgument + 1];
- String value = args[currentArgument + 2];
+ final String key = args[currentArgument + 1];
+ final String value = args[currentArgument + 2];
if (this.sessionConfig.parseOption(key, value,
SessionConfig.PRECEDENCE_COMMAND_LINE)) {
return true;
@@ -354,7 +354,7 @@
OutputConfig.PRECEDENCE_COMMAND_LINE));
}
- private void setOutputMode(int mode) throws FOrayException {
+ private void setOutputMode(final int mode) throws FOrayException {
if (outputmode == INPUT_NOT_SET) {
outputmode = mode;
} else {
@@ -417,7 +417,7 @@
}
} // end checkSettings
- private void setLogger(Log newLogger) {
+ private void setLogger(final Log newLogger) {
this.log = newLogger;
}
@@ -437,7 +437,7 @@
if (inputmode == INPUT_FO) {
try {
return new InputSource(foInput.openStream());
- } catch (IOException e) {
+ } catch (final IOException e) {
throw new FOrayException(e);
}
}
@@ -459,7 +459,7 @@
try {
starter = new AWTStarter(log, getSessionConfig(),
getRendererOptions(), this);
- } catch (Exception e) {
+ } catch (final Exception e) {
if (e instanceof FOrayException) {
throw (FOrayException)e;
}
@@ -470,7 +470,7 @@
try {
starter = new PrintStarter(log, getSessionConfig(),
getRendererOptions(), this);
- } catch (Exception e) {
+ } catch (final Exception e) {
if (e instanceof FOrayException) {
throw (FOrayException)e;
}
@@ -535,7 +535,7 @@
* shows the commandline syntax including a summary of all available
* options and some examples
*/
- public static void printUsage(Log logger) {
+ public static void printUsage(final Log logger) {
logger.error("\nUSAGE\nFOray [options] [-fo|-xml] infile "
+ "[-xsl file] [-awt|-pdf|-mif|-pcl|-ps|-txt|-at|-print] "
+ "<outfile>\n"
@@ -601,7 +601,7 @@
* If in debug mode, logs all commandline settings.
*/
private void debug() {
- String verbosity = this.sessionConfig.optionVerbosity();
+ final String verbosity = this.sessionConfig.optionVerbosity();
if (! verbosity.equals("debug")) {
return;
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2006-07-22 16:15:41 UTC (rev 7805)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2006-07-22 18:11:33 UTC (rev 7806)
@@ -48,8 +48,9 @@
CommandLineOptions commandLineOptions;
- public CommandLineStarter(Log logger, SessionConfig sessionConfig,
- OutputConfig outputConfig, CommandLineOptions commandLineOptions)
+ public CommandLineStarter(final Log logger,
+ final SessionConfig sessionConfig, final OutputConfig outputConfig,
+ final CommandLineOptions commandLineOptions)
throws FOrayException {
super(logger, sessionConfig, outputConfig);
this.commandLineOptions = commandLineOptions;
@@ -69,8 +70,9 @@
*/
/* Instantiate the FOraySession. */
- SessionConfig sessionConfig = this.options.getSessionConfig();
- FOraySession session = FOraySpecific.makeFOraySession(sessionConfig);
+ final SessionConfig sessionConfig = this.options.getSessionConfig();
+ final FOraySession session = FOraySpecific.makeFOraySession(
+ sessionConfig);
/*
* Instantiate and configure the FOrayDocument(s). The constructor
@@ -95,9 +97,9 @@
* OutputTargets, but you can create and use a non-standard OutputTarget
* as well.
*/
- int outputType = commandLineOptions.getOutputType();
- OutputConfig outputOptions = this.outputConfig;
- OutputTarget outputTarget = OutputTargetFactory.makeOutputTarget(
+ final int outputType = commandLineOptions.getOutputType();
+ final OutputConfig outputOptions = this.outputConfig;
+ final OutputTarget outputTarget = OutputTargetFactory.makeOutputTarget(
outputType, outputOptions, session.getLogger());
/*
@@ -109,10 +111,10 @@
* Targets that do not need an OutputStream should set that parameter
* to null.
*/
- LayoutStrategy layout = new PioneerLS(session.getLogger());
- FileOutputStream outputFileStream = getFileOutputStream();
- FOrayTarget target = new FOrayTarget(document, outputTarget, layout,
- outputFileStream);
+ final LayoutStrategy layout = new PioneerLS(session.getLogger());
+ final FileOutputStream outputFileStream = getFileOutputStream();
+ final FOrayTarget target = new FOrayTarget(document, outputTarget,
+ layout, outputFileStream);
/*
* Everything is now ready to go. There are two different processing
@@ -181,10 +183,10 @@
}
private FileOutputStream getFileOutputStream() throws FOrayException {
- File outputFile = commandLineOptions.getOutputFile();
+ final File outputFile = commandLineOptions.getOutputFile();
try {
return new FileOutputStream(outputFile);
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
throw new FOrayException(e);
}
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOray.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2006-07-22 16:15:41 UTC (rev 7805)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOray.java 2006-07-22 18:11:33 UTC (rev 7806)
@@ -33,18 +33,18 @@
import java.io.FileNotFoundException;
public class FOray {
- public static void main(String[] args) {
+ public static void main(final String[] args) {
CommandLineOptions options = null;
- Log logger = Logging.makeDefaultLogger();
+ final Log logger = Logging.makeDefaultLogger();
try {
options = new CommandLineOptions(args, logger);
- Starter starter = options.getStarter();
+ final Starter starter = options.getStarter();
starter.run();
- } catch (FOrayException e) {
+ } catch (final FOrayException e) {
logger.error("" + e.getMessage());
if (options != null) {
- SessionConfig sessionConfig = options.getSessionConfig();
+ final SessionConfig sessionConfig = options.getSessionConfig();
if (sessionConfig.optionVerbosity().equals("debug")) {
e.printStackTrace();
}
@@ -53,10 +53,10 @@
}
}
System.exit(2);
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
logger.error("" + e.getMessage());
if (options != null) {
- SessionConfig sessionConfig = options.getSessionConfig();
+ final SessionConfig sessionConfig = options.getSessionConfig();
if (sessionConfig.optionVerbosity().equals("debug")) {
e.printStackTrace();
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2006-07-22 16:15:41 UTC (rev 7805)
+++ trunk/foray/foray-app/src/java/org/foray/app/FOraySpecific.java 2006-07-22 18:11:33 UTC (rev 7806)
@@ -74,28 +74,30 @@
* @throws FOrayException For errors in creating the server and factories,
* or in instantiating the FOraySession.
*/
- public static FOraySession makeFOraySession(SessionConfig sessionConfig)
- throws FOrayException {
- Log logger = FOraySpecific.makeLogger(sessionConfig);
- FontServer fontServer = FOraySpecific.makeFontServer(logger,
+ public static FOraySession makeFOraySession(
+ final SessionConfig sessionConfig) throws FOrayException {
+ final Log logger = FOraySpecific.makeLogger(sessionConfig);
+ final FontServer fontServer = FOraySpecific.makeFontServer(logger,
sessionConfig);
- HyphenationServer hyphenServer = FOraySpecific.makeHyphenationServer(
- logger, sessionConfig);
- TextServer textServer = FOraySpecific.makeTextServer(logger,
+ final HyphenationServer hyphenServer =
+ FOraySpecific.makeHyphenationServer(logger, sessionConfig);
+ final TextServer textServer = FOraySpecific.makeTextServer(logger,
hyphenServer);
- GraphicServer graphicServer = FOraySpecific.makeGraphicServer(logger);
- FOTreeFactory foTreeServer = FOraySpecific.makeFOTreeFactory(logger,
- sessionConfig, graphicServer, textServer);
- AreaTreeFactory areaTreeFactory = FOraySpecific.makeAreaTreeFactory(
- logger, textServer);
- LayoutFactory layoutFactory = FOraySpecific.makeLayoutFactory(logger);
- FOraySession session = new FOraySession(logger, sessionConfig,
+ final GraphicServer graphicServer = FOraySpecific.makeGraphicServer(
+ logger);
+ final FOTreeFactory foTreeServer = FOraySpecific.makeFOTreeFactory(
+ logger, sessionConfig, graphicServer, textServer);
+ final AreaTreeFactory areaTreeFactory =
+ FOraySpecific.makeAreaTreeFactory(logger, textServer);
+ final LayoutFactory layoutFactory = FOraySpecific.makeLayoutFactory(
+ logger);
+ final FOraySession session = new FOraySession(logger, sessionConfig,
fontServer, hyphenServer, textServer, graphicServer,
foTreeServer, areaTreeFactory, layoutFactory);
return session;
}
- public static Log makeLogger(SessionConfig configuration) {
+ public static Log makeLogger(final SessionConfig configuration) {
if (configuration.optionVerbosity().equals("debug")) {
return Logging.makeDebugLogger();
} else {
@@ -103,10 +105,10 @@
}
}
- public static FontServer makeFontServer(Log logger,
- SessionConfig configuration) throws FOrayException {
- EntityResolver entityResolver = makeEntityResolver(configuration);
- FOrayFontServer forayFontServer = new FOrayFontServer(logger);
+ public static FontServer makeFontServer(final Log logger,
+ final SessionConfig configuration) throws FOrayException {
+ final EntityResolver entityResolver = makeEntityResolver(configuration);
+ final FOrayFontServer forayFontServer = new FOrayFontServer(logger);
forayFontServer.setBaseFontURL(
configuration.optionFontBaseDirectory());
forayFontServer.setBaseURL(configuration.optionBaseDirectory());
@@ -114,67 +116,69 @@
try {
forayFontServer.setup(configuration.optionFontConfiguration(),
null);
- } catch (FontException e) {
+ } catch (final FontException e) {
throw new FOrayException(e);
}
return forayFontServer;
}
- public static TextServer makeTextServer(Log logger,
- HyphenationServer hyphenServer) throws FOrayException {
+ public static TextServer makeTextServer(final Log logger,
+ final HyphenationServer hyphenServer) throws FOrayException {
return new org.foray.text.TextServer(logger, hyphenServer);
}
- public static HyphenationServer makeHyphenationServer(Log logger,
- SessionConfig configuration) {
- URL hyphenationDir = configuration.optionHyphenationBaseDirectory();
+ public static HyphenationServer makeHyphenationServer(final Log logger,
+ final SessionConfig configuration) {
+ final URL hyphenationDir =
+ configuration.optionHyphenationBaseDirectory();
return new org.foray.hyphenR.HyphenationServer(logger, hyphenationDir);
}
- public static GraphicServer makeGraphicServer(Log logger)
+ public static GraphicServer makeGraphicServer(final Log logger)
throws FOrayException {
return new FOrayGraphicServer(logger, XMLParser.getParserClassName());
}
- public static FOTreeFactory makeFOTreeFactory(Log logger,
- SessionConfig configuration, GraphicServer graphicServer,
- TextServer textServer)
+ public static FOTreeFactory makeFOTreeFactory(final Log logger,
+ final SessionConfig configuration,
+ final GraphicServer graphicServer, final TextServer textServer)
throws FOrayException {
- URL[] graphicSearchPath = buildGraphicSearchPath(configuration);
+ final URL[] graphicSearchPath = buildGraphicSearchPath(configuration);
return new FOrayFOTreeServer(logger, graphicServer, textServer,
graphicSearchPath, configuration.optionCacheGraphics());
}
- private static URL[] buildGraphicSearchPath(SessionConfig configuration) {
- URL[] urls = new URL[3];
+ private static URL[] buildGraphicSearchPath(
+ final SessionConfig configuration) {
+ final URL[] urls = new URL[3];
urls[0] = configuration.getBaseDocument();
urls[1] = configuration.optionBaseDirectory();
try {
urls[2] = URLFactory.createURL(System.getProperty("user.dir"));
- } catch (MalformedURLException e) {
+ } catch (final MalformedURLException e) {
// Ignore this -- just leave the null value in the array
}
return urls;
}
- public static AreaTreeFactory makeAreaTreeFactory(Log logger,
- TextServer textServer) throws FOrayException {
+ public static AreaTreeFactory makeAreaTreeFactory(final Log logger,
+ final TextServer textServer) throws FOrayException {
return new FOrayAreaTreeFactory(logger, textServer);
}
- public static LayoutFactory makeLayoutFactory(Log logger)
+ public static LayoutFactory makeLayoutFactory(final Log logger)
throws FOrayException {
return new PioneerFactory(logger);
}
public static EntityResolver makeEntityResolver(
- SessionConfig configuration) {
- String catalog = configuration.optionXMLCatalog();
+ final SessionConfig configuration) {
+ final String catalog = configuration.optionXMLCatalog();
if (catalog == null) {
return null;
}
- String [] catalogs = {catalog};
- XMLCatalogResolver resolver = new XMLCatalogResolver();
+ final String [] catalogs = {catalog};
+ final XMLCatalogResolver resolver = new XMLCatalogResolver();
resolver.setPreferPublic(true);
resolver.setCatalogList(catalogs);
return resolver;
Modified: trunk/foray/foray-app/src/java/org/foray/app/Options.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Options.java 2006-07-22 16:15:41 UTC (rev 7805)
+++ trunk/foray/foray-app/src/java/org/foray/app/Options.java 2006-07-22 18:11:33 UTC (rev 7806)
@@ -48,15 +48,15 @@
/** The logger that should be used. */
private Log logger;
- public Options(Log logger, SessionConfig sessionConfig,
- OutputConfig renderConfig) throws FOrayException {
+ public Options(final Log logger, final SessionConfig sessionConfig,
+ final OutputConfig renderConfig) throws FOrayException {
this.logger = logger;
this.sessionConfig = sessionConfig;
this.renderConfig = renderConfig;
}
- public Options(Log logger, SessionConfig sessionConfig,
- OutputConfig renderConfig, URL userConfigFile)
+ public Options(final Log logger, final SessionConfig sessionConfig,
+ final OutputConfig renderConfig, final URL userConfigFile)
throws FOrayException {
this(logger, sessionConfig, renderConfig);
this.loadUserconfiguration(userConfigFile);
@@ -72,10 +72,10 @@
}
// setting clOptions
- void setCommandLineOptions(CommandLineOptions clOptions)
+ void setCommandLineOptions(final CommandLineOptions clOptions)
throws FOrayException {
// load user configuration file,if there is one
- URL userConfigFile = clOptions.getUserConfigFile();
+ final URL userConfigFile = clOptions.getUserConfigFile();
if (userConfigFile != null) {
this.loadUserconfiguration(userConfigFile);
}
@@ -87,29 +87,29 @@
}
}
- public void loadUserconfiguration(URL userConfigFile)
+ public void loadUserconfiguration(final URL userConfigFile)
throws FOrayException {
if (userConfigFile == null) {
return;
}
try {
- InputSource inputSource = new InputSource(
+ final InputSource inputSource = new InputSource(
userConfigFile.openStream());
loadUserconfiguration(inputSource);
- } catch (IOException e) {
+ } catch (final IOException e) {
...
[truncated message content] |