[cvs] expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller Input.java

JCorporate Ltd jcorp at jcorp2.servlets.net
Thu Jun 3 15:43:53 PDT 2004


Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller
In directory jcorp2.servlets.net:/tmp/cvs-serv24240/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller

Modified Files:
	Input.java 
Log Message:
protect against null datamembers during cloning


Index: Input.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Input.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** Input.java	13 May 2004 23:19:50 -0000	1.24
--- Input.java	3 Jun 2004 22:43:51 -0000	1.25
***************
*** 268,276 ****
          synchronized (this) { // this sync means nothing since setter methods are not sync'd, but inputs are generally not handled by more than one thread at a time
              i = (Input) super.clone();
!             i.defaultValue = (ArrayList) defaultValue.clone();
              i.maxLength = maxLength;
              i.lookup = (lookup);
              i.key = key;
!             i.validValues = (Vector) validValues.clone();
          }
  
--- 268,276 ----
          synchronized (this) { // this sync means nothing since setter methods are not sync'd, but inputs are generally not handled by more than one thread at a time
              i = (Input) super.clone();
!             if ( defaultValue != null ) i.defaultValue = (ArrayList) defaultValue.clone();
              i.maxLength = maxLength;
              i.lookup = (lookup);
              i.key = key;
!             if (validValues != null) i.validValues = (Vector) validValues.clone();
          }
  



More information about the cvs mailing list