cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r360310 - /cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UploadDefinition.java
Date Sat, 31 Dec 2005 16:17:25 GMT
Author: antonio
Date: Sat Dec 31 08:17:21 2005
New Revision: 360310

URL: http://svn.apache.org/viewcvs?rev=360310&view=rev
Log:
substring(0) returns the whole string

Modified:
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UploadDefinition.java

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UploadDefinition.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UploadDefinition.java?rev=360310&r1=360309&r2=360310&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UploadDefinition.java
(original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UploadDefinition.java
Sat Dec 31 08:17:21 2005
@@ -27,35 +27,35 @@
     private ValueChangedListener listener;
     private boolean required;
     private String mimeTypes;
-    
+
     public UploadDefinition() {
     	this.mimeTypes = null;
     	this.required = false;
     }
-    
+
     public UploadDefinition(boolean required, String mimeTypes) {
         this.required = required;
         this.mimeTypes = mimeTypes;
     }
-    
+
     /**
      * initialize this definition with the other, sort of like a copy constructor
      */
     public void initializeFrom(WidgetDefinition definition) throws Exception {
         super.initializeFrom(definition);
-        
+
         if(definition instanceof UploadDefinition) {
             UploadDefinition other = (UploadDefinition)definition;
-            
+
             this.required = other.required;
-            this.mimeTypes = other.mimeTypes.substring(0); // deep copy
+            this.mimeTypes = other.mimeTypes;
             this.listener = WidgetEventMulticaster.add(this.listener, other.listener);
-            
+
         } else {
             throw new Exception("Definition to inherit from is not of the right type! (at
"+getLocation()+")");
         }
     }
-    
+
     public void addMimeTypes(String types) {
         if(types != null) {
             if(mimeTypes == null)
@@ -67,7 +67,7 @@
             }
         }
     }
-    
+
     public void setRequired(boolean required) {
         checkMutable();
         this.required = required;
@@ -81,7 +81,7 @@
     public boolean isRequired() {
         return required;
     }
-    
+
     public String getMimeTypes() {
         return this.mimeTypes;
     }
@@ -90,11 +90,11 @@
         checkMutable();
         this.listener = WidgetEventMulticaster.add(this.listener, listener);
     }
-    
+
     public ValueChangedListener getValueChangedListener() {
         return this.listener;
     }
-    
+
     public boolean hasValueChangedListeners() {
         return listener != null;
     }



Mime
View raw message