Update of /cvsroot/struts/sia
In directory usw-pr-cvs1:/tmp/cvs-serv23939
Modified Files:
errata.html
Log Message:
Routine update.
Index: errata.html
===================================================================
RCS file: /cvsroot/struts/sia/errata.html,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** errata.html 7 Nov 2002 14:20:12 -0000 1.1.1.1
--- errata.html 7 Nov 2002 16:09:19 -0000 1.2
***************
*** 38,47 ****
-->
<!--
! Listing 1.1 (page 19)
The first code on page 19 has a number of
obvious faults, including two unnecessary "this." references and six
extraneous ";"s.
-->
<p>
<b>Section 3.4.17 (page 103)</b>
</p>
--- 38,99 ----
-->
<!--
!
The first code on page 19 has a number of
obvious faults, including two unnecessary "this." references and six
extraneous ";"s.
-->
+
+ <p>
+ <!-- Micael -->
+ <b>Listing 1.1 (page 19)</b>
+ </p>
+ <p>
+ The listing contains unnecessary semi-colons and references to "this".
+ </p>
+ <blockquote><pre><code>
+ package app;
+ import org.apache.struts.action.*;
+
+ public class RegisterForm extends ActionForm {
+ protected String username;
+ protected String password1;
+ protected String password2;
+
+ public String getUsername () {return this.username;};
+ public String getPassword1() {return this.password1;};
+ public String getPassword2() {return this.password2;};
+
+ public void setUsername (String username) {this.username = username;};
+ public void setPassword1(String password) {this.password1 = password;};
+ public void setPassword2(String password) {this.password2 = password;};
+
+ }
+ </code></pre></blockquote>
<p>
+ Might be better expressed as:
+ </p>
+ <blockquote><pre><code>
+ package app;
+ import org.apache.struts.action.*;
+
+ public class RegisterForm extends ActionForm {
+ protected String username;
+ protected String password1;
+ protected String password2;
+
+ public String getUsername () {return username;}
+ public String getPassword1() {return password1;}
+ public String getPassword2() {return password2;}
+
+ public void setUsername (String username) {this.username = username;}
+ public void setPassword1(String password) {this.password1 = password;}
+ public void setPassword2(String password) {this.password2 = password;}
+
+ }
+ </code></pre></blockquote>
+
+
+ <p>
+ <!-- Kurt A. Seiffert -->
<b>Section 3.4.17 (page 103)</b>
</p>
|