[FOray-commit] SF.net SVN: foray: [8272] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-10-03 02:17:22
|
Revision: 8272
http://svn.sourceforge.net/foray/?rev=8272&view=rev
Author: victormote
Date: 2006-10-02 19:17:13 -0700 (Mon, 02 Oct 2006)
Log Message:
-----------
Modify a copy of the parameter, instead of the parameter itself.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.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-10-03 02:12:50 UTC (rev 8271)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-10-03 02:17:13 UTC (rev 8272)
@@ -162,7 +162,7 @@
- private SecureResourceBundle getResourceBundle(String path) {
+ private SecureResourceBundle getResourceBundle(final String path) {
InputStream in = null;
try {
@@ -171,11 +171,12 @@
/* The following code was added by Alex Alishevskikh
* [al...@op...] to fix for crashes on machines with
* unsupported user languages */
- if (url == null) {
+ String modifiedPath = path;
+ if (url == null) {
/* if the given resource file not found, the english resource
* uses as default */
- path = path.substring(0, path.lastIndexOf(".")) + ".en";
- url = getClass().getResource(path);
+ modifiedPath = path.substring(0, path.lastIndexOf(".")) + ".en";
+ url = getClass().getResource(modifiedPath);
}
in = url.openStream();
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2006-10-03 02:12:50 UTC (rev 8271)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2006-10-03 02:17:13 UTC (rev 8272)
@@ -91,14 +91,15 @@
return frame;
}
- private SecureResourceBundle getResourceBundle(String path)
+ private SecureResourceBundle getResourceBundle(final String path)
throws IOException {
URL url = getClass().getResource(path);
+ String modifiedPath = path;
if (url == null) {
/* if the given resource file not found, the english resource uses
* as default */
- path = path.substring(0, path.lastIndexOf(".")) + ".en";
- url = getClass().getResource(path);
+ modifiedPath = path.substring(0, path.lastIndexOf(".")) + ".en";
+ url = getClass().getResource(modifiedPath);
}
return new SecureResourceBundle(url.openStream(), getLogger());
}
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2006-10-03 02:12:50 UTC (rev 8271)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2006-10-03 02:17:13 UTC (rev 8272)
@@ -126,14 +126,14 @@
* creating one.
*/
public FOrayDocument(final FOraySession session,
- final InputSource inputSource, XMLReader parser)
+ final InputSource inputSource, final XMLReader parser)
throws FOrayException {
this(session);
this.inputSource = inputSource;
+ this.parser = parser;
if (parser == null) {
- parser = this.createParser();
+ this.parser = this.createParser();
}
- this.parser = parser;
this.parser.setContentHandler(treeBuilder);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|