Permalink
Browse files

Issue #128 File storage in Bean

  • Loading branch information...
1 parent 5c2080c commit c94b6ea15e473cf5e331b7330dfbfb584d5420c6 @rolfl rolfl committed Mar 30, 2014
Showing with 13 additions and 13 deletions.
  1. +13 −13 contrib/src/java/org/jdom2/contrib/beans/JDOMBean.java
@@ -131,8 +131,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
/** file cache **/
private Map<String, FileInfo> files = new HashMap<String, FileInfo>();
- /** where to locate files **/
- private File fileRoot;
+// /** where to locate files **/
+// private File fileRoot;
/**
* default constructor, uses "org.apache.xerces.parsers.SAXParser"
@@ -174,21 +174,21 @@ public String getParser() {
* @param root the path (absolute or relative) to the document root
**/
public void setFileRoot(String root) {
- if (!root.endsWith("/")) {
- root = root + "/";
- }
- this.fileRoot = new File(root);
- System.out.println("fileroot=" + fileRoot);
+// if (!root.endsWith("/")) {
+// root = root + "/";
+// }
+// this.fileRoot = new File(root);
+// System.out.println("fileroot=" + fileRoot);
}
/**
* @return the path (absolute or relative) to the document root
**/
public String getFileRoot() {
- if (fileRoot == null) {
+// if (fileRoot == null) {
return null;
- }
- return fileRoot.getAbsolutePath();
+// }
+// return fileRoot.getAbsolutePath();
}
/**
@@ -232,10 +232,10 @@ public Element getRootElement(String file) throws JDOMException, IOException {
}
private File getFile(String filename) {
- if (fileRoot == null) {
+// if (fileRoot == null) {
return new File(filename);
- }
- return new File(fileRoot, filename);
+// }
+// return new File(fileRoot, filename);
}
/**

0 comments on commit c94b6ea

Please sign in to comment.