Commits

plightbo  committed 416b488

turns out simple was a bad idea

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2123573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits c7bac46

Comments (0)

Files changed (1)

File src/java/com/opensymphony/webwork/quickstart/MultiDirResource.java

     MultiWebApplicationContext ctx;
     File[] files;
     String uri;
-    boolean simple = false;
 
     public MultiDirResource(MultiWebApplicationContext ctx, String uri, List pathPriority, Map paths) {
         this.ctx = ctx;
         }
 
         this.files = (File[]) files.toArray(new File[files.size()]);
-        if (this.files.length == 1) {
-            this.simple = true;
-        }
     }
 
     public void release() {
     public boolean exists() {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return true;
             }
         }
     public boolean isDirectory() {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return file.isDirectory();
             }
         }
     public long lastModified() {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return file.lastModified();
             }
         }
     public long length() {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return file.length();
             }
         }
     public URL getURL() {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 try {
                     return file.toURL();
                 } catch (MalformedURLException e) {
     public File getFile() throws IOException {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return file;
             }
         }
     public String getName() {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return file.getName();
             }
         }
     public InputStream getInputStream() throws IOException {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return new FileInputStream(file);
             }
         }
     public OutputStream getOutputStream() throws IOException, SecurityException {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return new FileOutputStream(file);
             }
         }
     public boolean delete() throws SecurityException {
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 return file.delete();
             }
         }
         HashSet set = new HashSet();
         for (int i = 0; i < files.length; i++) {
             File file = files[i];
-            if (simple || file.exists()) {
+            if (file.exists()) {
                 String[] files = file.list();
                 for (int j = 0; j < files.length; j++) {
                     String s = files[j];