From f8f510d51c1602c1f7a1f03c5b1ff1d35fb852f6 Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Tue, 30 Apr 2013 22:04:12 +0200 Subject: [PATCH] corresponding corrections of equals() and hashCode() in <programmlisting> elements --- Doc/course.xml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/Doc/course.xml b/Doc/course.xml index 7fe250a6e..02cac667a 100644 --- a/Doc/course.xml +++ b/Doc/course.xml @@ -15775,10 +15775,10 @@ Namespace '<emphasis role="bold">http://www.w3.org/2000/svg</emphasis>' contains Tools</glossterm> <glossdef> - <para>Eclipse update site - http://tapestrytools.googlecode.com/svn/TapestryTools. In favour - of Eclipse marketplace installation which may fail fpr onknown - reason.</para> + <para>Eclipse update site <link + xlink:href="http://tapestrytools.googlecode.com/svn/TapestryTools">http://tapestrytools.googlecode.com/svn/TapestryTools</link>. + In favour of Eclipse marketplace installation which may fail for + unknown reason.</para> </glossdef> </glossentry> @@ -15786,8 +15786,8 @@ Namespace '<emphasis role="bold">http://www.w3.org/2000/svg</emphasis>' contains <glossterm>Eclipse jetty plugin</glossterm> <glossdef> - <para>Eclipse update site - http://run-jetty-run.googlecode.com/svn/trunk/updatesite.</para> + <para>Eclipse update site <link + xlink:href="http://run-jetty-run.googlecode.com/svn/trunk/updatesite">http://run-jetty-run.googlecode.com/svn/trunk/updatesite</link>.</para> </glossdef> </glossentry> </glosslist> @@ -18210,12 +18210,9 @@ public class User { if (this == other) <co linkends="equalByPrimaryKey-1" xml:id="equalByPrimaryKey-1-co"/>{ return true; - } else if (id == null) { - return false; - } else if (other instanceof User) { - final User that = (User) other; - return this.id.equals(that.getId()) <co linkends="equalByPrimaryKey-2" - xml:id="equalByPrimaryKey-2-co"/>; + } else if (null != other && other instanceof User) { + return getId().equals(((User) other).getId()) <co + linkends="equalByPrimaryKey-2" xml:id="equalByPrimaryKey-2-co"/>; } else { return false; } @@ -18225,7 +18222,7 @@ public class User { if (null == id) { return System.identityHashCode(this); } else { - return id.hashCode(); + return getId().hashCode(); } } }</programlisting> @@ -18371,11 +18368,8 @@ public class User { public boolean equals(Object other) { if (this == other) { return true; - } else if (getUid() == null) { - return false; - } else if (other instanceof User) { - final User that = (User) other; - return <emphasis role="bold">this.getUid().equals( that.getUid() )</emphasis>; <co + } else if (null != other && other instanceof User) { + return <emphasis role="bold">getUid().equals(((User) other).getUid())</emphasis>; <co linkends="implementEqualsByNaturalKey-2" xml:id="implementEqualsByNaturalKey-2-co"/> } else { -- GitLab