Here’s the list of errors I found in the book Holub On Patterns:

  • 60-62: The text sometimes refers to the factory class as Employee.Factory, when it is actually Employee.EmployeeFactory (or EmployeeFactory alone).

    Later on, the code in page 69 does define Employee.Factory. May be that’s the cause of the typo.

  • 67: The code in the g() method invokes function “f( stuff )”, when I think it should read “client( stuff )” (or, alternatively, rename the “client()” function to “f()”).

  • 79: In the last code listing, buildPage() method uses variable “factory” instead of “default”.

  • 82: I think the 1st (leftmost) “life” diagram under the second bullet is not right: the gray dot in the center will also stay alive, since it has exactly three neighbors… So, Shouldn’t it be black?.

  • 98: Caption of Figure 3.6 should say “Removing” instead of “Adding”.

  • 161: Refers to “Listing 3-7 Line 30” when he meant listing 3-5.

  • 204: The last sentence reads ends with: …”a call to ‘done()’”, but it should be ‘a call to endTable()’.

  • 228: Line 1 of the code listing: “t new new” should be “t = new”.

  • 256: Last paragraph is referring to “ThreadSafeCollection” instead of “SynchronizedCollection”, and “unmodifiableCollection()” instead of “synchronizedCollection()”.

  • 255: Figure 4-8, the Unmodifiable* classes contain long spaces in their names.

  • 262: By the end of 5th paragraph: …”I discussed Flyweight in Chapter 4”… should be Chapter 3 instead.

  • 277: The caption of Figure 4-14 is that of Figure 4-13. It should read something like “Chain of Command in Java Servlets” instead.

  • 311: In line 852, I think “must be Boolean” should be “must be Numeric”.

  • 314: In lines 971, 972, I think the comparisons against LT and GT are wrong. They should be swapped (LT is used for >, and GT for <, but it’s the other way around).

  • 319: End of 2nd paragraph: Wrong reference to Listing 4-32, line -1 (minus one?)

  • 331: Middle of 1st paragraph, references Figure 4-11, when he meant 4-18.

  • 394: Under the “Pros and Cons” section, there’s a “Cons” item that reads: “Communication overhead is small”. That doesn’t sound right: it’s either a “Pro”, or the sentence actually meant that the overhead is NOT small.

  • 399: In the top right listing, the last line of code says: ( new Printer() ), but it should be ( new DirectoryPrinter() ).

Errata for Holub On Patterns