Welcome to the Core Java Bug List
Sixth Edition Volume 1 (JDK
1.4)
- Page 17
- Change
j2sdk<version>-doc.zip to j2sdk-<version>-doc.zip
- Page 17
- Change
src.jar to src.zip
- Page 41
- Change "please see Chapter 12 of Volume 2." to "please see
Chapter 10 of Volume 2."
- Page 43
- Change public static final double CM_PER_INCH =
2.54;; to public static final double CM_PER_INCH =
2.54;
- Page 49
- Table 3-4: The associativity of ?: operator
- Change left to right to right to left
- Page 52
- Change "will be explained in Chapter 5." to "will be explained in
Chapter 4."
- Page 57
- Change "more detail in Chapter 5." to "more detail in Chapter 4."
- Page 57
- Change x = 10000.0 / 3.0 to double x = 10000.0 /
3.0
- Page 57
- Change java.swing.JOptionPane to
javax.swing.JOptionPane.
- Page 85
- Change double[] temp to double temp
- Page 89
- Change "We hope this section-especially when combined with the
example code supplied in the text and on the CD" to "We hope
this section-especially when combined with the example code supplied in
the text and on the companion web site "
- Page 117
- Change Employee e = new Employee("Romeo", 50000); to Employee
e = new Employee("Romeo", 5000, 2003, 3, 31);
- Page 144
- The code for the Card class is misaligned. It should be
public class Card
{
public Card(int aValue, int aSuit) { . . . }
public int getValue() { . . . }
public int getSuit() { . . . }
private int value;
private int suit;
}
- Page 157
- Change "its type is known only as the generic type s"
to "its type is known only as the generic type Object"
- Page 164
- Change "Call the explicit parameter otherObject" to "Name the explicit parameter otherObject".
- Page 177
- Change void remove(int index) to Object remove(int
index)
- Page 184
- Change "ThegetDeclaredFields," to "The getDeclaredFields,"
- Page 186
- Change
- System.out.print(Modifier.toString(c.getModifiers()));
- System.out.print(" " + name + "(");
- to
- System.out.print(" " +
Modifier.toString(c.getModifiers()));
- System.out.print(" " + name + "(");
- Change
- System.out.print(Modifier.toString(m.getModifiers()));
- System.out.print(" " + retType.getName() +
" " + name
- to
- System.out.print(" " +
Modifier.toString(m.getModifiers()));
- System.out.print(" " + retType.getName() + " " + name
- Page 187
- Change
- System.out.print(Modifier.toString(f.getModifiers()));
- System.out.println(" " + type.getName() + "
" + name
- to
- System.out.print(" " +
Modifier.toString(f.getModifiers()));
- System.out.println(" " + type.getName() + " " + name
- Page 195
- Change Object newInstance(Class componentType, int length)
to static Object newInstance(Class componentType, int length)
- Change Object newInstance(Class componentType,[] int lengths)
to static Object newInstance(Class componentType, int[] lengths)
- Page 205
- Change "sinterface variables" to " interface variables"
- Page 214
- Change the pay day to the hire day (4x in the
comment of setHireDay)
- Page 229
- Change @param a an array of floating point numbers
to @param d an array of floating point numbers
- Page 230
- Change "(See Chapter 4 of Volume 2 for more information
on RMI.)" to "(See Chapter 5 of Volume 2 for more information
on RMI.)"
- Change "(See Chapter 7 of Volume 2 for more information
on Java beans.)" to "(See Chapter 8 of Volume 2 for more
information on Java beans.)"
- Page 258
- Change g.setPaint to g2.setPaint
- Change g.drawString to g2.drawString
- Page 269
- Add a line break before the first fontcharset.serif.2 and remove
the second occurrence of fontcharset.serif.2=sun.awt.CharToByteSymbol
- Page 272
- Change MediaTracker tracker = new MediaTracker(); to MediaTracker
tracker = new MediaTracker(component);
- Page 274
- Move the methods drawImage
(2x) and copyArea under
the java.awt.Graphics
heading
- Page 274
- In the first drawImage
, change "draws a scaled image" to "draws an unscaled image".
- Page 276
- After the heading java.awt.MediaTracker, add
- . MediaTracker(Component comp)
Tracks images that are displayed in the given component
. void addImage(Image image, int id)
- Page 284
- Change java.swing.JButton to javax.swing.JButton
- Page 289
- Change UIManager.setLook-AndFeel to UIManager.setLookAndFeel
- Page 293
- In Figure 8-4, change "addActionListener" to
"addWindowListener"
- Page 296
- Change "Seven of the AWT listener interfaces" to "Eight
of the AWT listener interfaces"
- Change "The remaining four interfaces" to "The remaining six
interfaces"
- Page 308
- Change if (current >= 0) to if (current != null)
- Page 315
- In the API note for java.awt.Window.isActive, change
- "The title bars of active frames are dialogs usually
marked" to "The title bars of active frames and dialogs are usually marked"
- Page 319
- Change Event.CTRL_MASK); to InputEvent.CTRL_MASK
- Page 322
- Change java.swing.Action to javax.swing.Action
- Change java.swing.JMenu to javax.swing.JMenu
- Page 323
- Change java.swing.KeyStroke to javax.swing.KeyStroke
- Change java.swing.JComponent to javax.swing.JComponent
- Page 334
- Change private EventListenerList listeners; to private
EventListenerList listenerList;
- Page 341
- Change DefaultButtonUI to BasicButtonUI
- Page 346
- Change java.swing.JPanel to javax.swing.JPanel
- Page 351
- Change "from the TextComponent parent class" to "from
the JTextComponent parent class"
- Page 355
- Change javax.awt.Component to java.awt.Component
- Page 357
- Change "On the surface, this input validation sounds task
simple." to "On the surface, this input validation task sounds
simple."
- Page 359
- Change StringBuffer buffer = StringBuffer(); to StringBuffer
buffer = StringBuffer(string);
- Change buffer.deleteChar(i); to buffer.deleteCharAt(i);
- Page 367
- The replace method
needs to be replaced with the following code:
public void replace(FilterBypass fb, int offset,
int length, String string, AttributeSet attr)
throws BadLocationException
{
if (string != null)
{
StringBuffer buffer = new StringBuffer(string);
for (int i = buffer.length() - 1; i >= 0; i--)
{
char ch = buffer.charAt(i);
if (!Character.isDigit(ch) && ch != '-')
buffer.deleteCharAt(i);
}
string = buffer.toString();
}
super.replace(fb, offset, length, string, attr);
}
- Page 369
- Change javax.text.DateFormat to java.text.DateFormat
- Page 370
- In the API note for javax.swing.text.DocumentFilter.remove
- Change "before removing a part of a document with a new string."
to "before removing a part of a document."
- Page 389
- Change color, shadow to highlight, shadow
- Page 398
- Change slider.setLabelTable(Dictionary table) to void
setLabelTable(Dictionary table)
- Page 398
- Change "You can get the current value by calling the setValue
method." to "You can get the current value by calling the getValue
method.
- Page 399
- Line 2, change Spinner to JSpinner
- Page 405
- Change javax.text.SimpleDateFormat to java.text.SimpleDateFormat
- Page 412
- Change javax.awt.event.MouseEvent to java.awt.event.MouseEvent
- Page 414
- In the API note for javax.swing.AbstractButton, change void
setMnemonic(char mnemonic) to
void setMnemonic(int mnemonic)
- Page 421
- Change "and as the tool tips in the tool bar." to "and the short
descriptions as the tool tips in the tool bar."
- Page 424
- In the API note for javax.swing.JToolBar.add
- Change "inside the tool bar with name, icon, and action callback"
to "inside the tool bar with name,icon,short description, and
action callback"
- Page 424
- Change "by using only the border layout and flow layout" to "by
using only border layout, flow layout, and grid layout"
- Change "than the border layout and flow layout give you." to
"than the border layout, flow layout, and grid layout give you"
- Page 425
- Change DefaultButtonUI to BasicButtonUI
- Page 426
- Change "With the grid layout that you will see shortly" to "With
the grid layout that you saw on page 346"
- Page 432
- Change contentPane.add(style,bold); to panel.add(component,constraints);
- Page 433
- Change "by setting the insets field of the GridBagLayout."
to ""by setting the insets field of the GridBagConstraints."
- Page 437
- Change "Each string value is set so that the strain of
each string" to "Each spring value is set so that the
strain of each spring"
- Change "Thus, the values of the individual strings" to
"Thus, the values of the individual springs"
- Page 443
- Change // add strings to lay out components to //
add springs to lay out components
- Page 451
- Change "5. Italic combo box" to "5.
Italic check box"
- Page 466
- In the API note of javax.swing.JDialog
- Change public JDialog(JFrame parent, String title, boolean
modal) to public JDialog(Frame parent, String title,
boolean modal)
- Page 475
- Change "an object that implements the javax.swing.filechooser.FileFilter
interface." to "an object that extends the
javax.swing.filechooser.FileFilter
abstract class."
Remove the sentence "To restrict the files shown in a dialog, you need
to create an object of a class that extends the FileFilter class."
- Change "implement the two methods of the FileFilter
interface:" to "implement the two abstract methods of the FileFilter
class:" ."
- Page 481
- Remove lines 85-92.
- Page 487
- Change
- setBackground(selected);
- to
- if (selected != null)
- setBackground(selected);
- Page 505
- Change name="calc" to name="calc">
- Page 506
- Change "In the code attribute" to "In the codetype
attribute"
- Change objecct to object
- Page 521
- Change
public InputStream getStream(String key) { return null; }}
public Iterator getStreamKeys() { return null;
to
public InputStream getStream(String key) { return null; }
public Iterator getStreamKeys() { return null; }
(i.e. move a brace)
- Page 534
- Change "Just as with applets, an unsigned applet" to "Just as
with applets, an unsigned Java Web Start application"
- Page 545
- Change "we just print the property set to the standard output."
to "we just save the property set to the file Myprog.properties."
- Page 545
- Change "Background color;" to "Text color;"
- Page 552
- Change Preferences node =
Preferences.userNodeForPackage(obj); to Preferences node =
Preferences.userNodeForPackage(obj.getClass());
- Change Preferences node =
Preferences.systemNodeForPackage(obj); to Preferences node =
Preferences.systemNodeForPackage(obj.getClass());
- Page 556
- Change the second line from the top
- void exportSubtree(OutputStream out)
- to
void exportNode(OutputStream out)
- Page 580
- Change
entering(...);
...
exiting(..., count);
to
logger.entering(...);
...
logger.exiting(..., new Integer(count));
- Page 581
- Line 5: Change throwing(...);
to logger.throwing(...);
- Page 581
- Change System.setProperty(java.util.logging.config.file,
file) to System.setProperty("java.util.logging.config.file",
file)
- Page 593
- In the API note for java.util.logging.Formatter
- Change
- . String format(LogRecord record)
- to
- . String
formatMessage(LogRecord record)
- Page 594
- Change javac -source 1.4 MyClass.class to javac
-source 1.4 MyClass.java
- Page 598
- Change java Errout java MyProgram.java > errors.txt
to java Errout java MyProgram > errors.txt
- Page 599
- Change errout java MyProgram.java > errors.txt to errout
java MyProgram > errors.txt
- Page 603
- Change "See Chapter 7 of Volume 2" to "See Chapter 8 of Volume 2"
- Change "The proxy mechanism is explained at the end of Chapter 5"
to "The proxy mechanism is explained at the end of Chapter 6"
- Change "Example 11-6 tests the event tracer." to "Example 11-7
tests the event tracer."
- Page 612
- Change the source code lines 5-6 from
- A program for counting the count of lines, words,
- and sentences in System.in
- to
- A program for counting lines, words,
- and characters in System.in
- Page 613
- Change "in a particular run of the OptionPaneTest" to
"in a particular run of the OptionDialogTest"
- Page 618
- Remove source code line 35 repaint();
- Change
- "It was supposed to call setColor(Color.yellow) and
then go the repaint command."
- to
- "It was supposed to call setBackground(Color.yellow)
and then go to the end of actionPerformed."
- Page 629
- In the API note for java.io.PushbackInputStream.unread
- Change "one character at a time" to "one byte at a time"
- Page 631
- In the API note for java.io.DataInput.readFully,
change the description of len parameter
- From "The maximum number of bytes read" to "The maximum number of
bytes to read"
- Page 632
- In the API note for java.io.DataOutput
- Change void writeByte(byte b) to void
writeByte(int b)
- Change void writeChar(char c) to void
writeChar(int c)
- Change void writeShort(short s) to void
writeShort(int s)
- Page 640
- Remove the sentence "(That is why we wrote our own Console
class for use in the beginning chapters.)"
- Page 642
- Change "in the list box at the top of the screen. If you
double-click on" to "in the combo box at the bottom of the screen. If
you select"
- Page 662
- Change "the Cloneable interface that we also discussed
in Chapter 5" to "the Cloneable interface that we also
discussed in Chapter 6"
- Page 662
- Remove the sentences "Why aren't all classes serializable by
default? We will discuss this in the section 'Security'".
- Page 662
- Replace "we give each employee...raiseSalary actions"
with "we print out each restored object. You can easily distinguish
employee and manager objects when the toString method is
applied.
- Page 664
- Change
- @param year the hire month
- @param year the hire day
- to
- @param month the hire month
- @param day the hire day
- Page 667
- Change "The java.util.Date class is externalizable" to
"The java.util.Date class
defines its own readObject/writeObject
methods"
- Page 675
- Change "the second reference to the Day class in the array of
days was coded as 71 00 7E 00 02" to
"a repeated reference to the Date class was coded as 71 00 7E 00 08".
- Page 676
- In the last line, remove "--see the next section."
- Page 677
- Change public class LabeledPoint to public class
LabeledPoint implements Serializable
- Page 678
- Change salary = s.readUTF(); to salary =
s.readDouble();
- Page 681
- Change class Employee // version 1.1 to class
Employee implements Serializable // version 1.1
- Page 692
- In the Example 12-9:
- Change Usage: java CRC filename to Usage: java
NIOCRC filename
- Page 697
- change "a byte order mark ('\uFFFE')" to "a byte order mark
('\uFEFF')"
- Page 699
- Change "Table 12-2 and 12-3" to "Table 12-4 and 12-5"
- Page 700
- Change
- \s
A whitespace character[\t\n\r
- to
- \s
A whitespace character[ \t\n\r
- Page 701
- Change the description for Ctrl to "ASCII control
character [\x00-\x1F]"
- In the description for Blank
- Change "Space or tab [\t]" to "Space or tab [ \t]"
- In the description for Space
- Change [\t\n\r to [ \t\n\r
- Page 702
- Change Pattern.CASE_UNICODE_CASE); to
Pattern.UNICODE_CASE);
Thanks to Kjell Ahlstedt, Larry Buickel, Justin Clarke, Bernard
Desruisseaux, Scott Furry, Koutroullos Marios, Kathleen O'Brien, Peter
Olsen, Robert Rollins, R.J. Rooke, Vladimir Selcan, Philip Seth, Dave
Stampf, Douglas Wind, and a number of anonymous contributors for their
bug reports!
Fifth Edition Volume 1 (JDK 1.3)
- Page xxi
- The URL http://www.horstmann.com/corejava.html should
not be hyphenated.
- Page 23
- In the tip, change docs\api\index.html to docs/api/index.html
- Page 46 Line -4
- Change "method takes zero parameters" to "method takes no
parameters"
- Page 54
- Remove the second semicolon after CM_PER_INCH = 2.54;
- Page 66
- In the API note of lastIndexOf, change "starting at
index 0 or at fromIndex" to "starting at the end of the
stringor at fromIndex"
- Page 59
- The three grey arrows in figure 3-1 are too dark. They should be
a lighter shade of grey
- Page 74
- Add the following entry after the first three entries of the java.text.NumberFormat
API entry:
- String format(double number)
Formats the given number.
- Page 77
- Remove the ; from the end of
if (condition) statement1 else statement2;
- Page 78
- Change else if {yourSales >= 1.5 * target) to else
if (yourSales >= 1.5 * target)
- Page 83 Retirement.java
- Change Your can retire in to You can retire in
- Page 87
- Change the numerator of the equation from "n × (n
- 1) × (n - 1) × . . . × (n- k)"
to "n × (n - 1) × (n - 2) × . .
. × (n - k + 1)"
- Page 90
- In the CAUTION note, change “case” to
“alternative” (3x)
- Page 96
- In the CAUTION note, change “an array
with 100 element” to “an array with 100 elements”
- Page 108
- Change "Instead, an array of five pointers is allocated" to
"Instead, an array of ten pointers is allocated"
- Page 126
- Add a semicolon after GregorianCalendar calendar = new
GregorianCalendar()
- Page 127
- Change “The variable weekday is set to 0 if the first
day of the month is a Sunday, to 1 if it is a Monday, and so on.” to
“The variable weekday is set to 1 (or Calendar.SUNDAY
) if the first day of the month is a Sunday, to 2 (or
Calendar.MONDAY ) if it is a Monday, and so on.”
- Page 127
- Change "As you can see, the GregorianCalendar class
makes it is simple..." to "As you can see, the GregorianCalendar
class makes it simple..."
- Page 131
- Change
hireDay = new GregorianCalendar(year, month - 1, day);
to
GregorianCalendar calendar
= new GregorianCalendar(year, month - 1, day);
hireDay = calendar.getTime();
- Page 135 after the second note
- Change "refererences" to "references".
- Page 140
- It turns out that the Date class is not
immutable—the setTime method can set the date to another
point in time.
1. Reword the CAUTION note as follows: (the
gray portions are unchanged.)
Be careful not to write accessor methods
that return references to mutable objects. We violated that
rule in our Employee class in which the getHireDay
method returns an object of class Date:
class Employee
{
. . .
public Date getHireDay()
{
return hireDay;
}
. . .
private Date hireDay;
}
This breaks the encapsulation! Consider
the following rogue code:
Employee Harry = . . .;
Date d = harry.getHireDay();
double tenYearsInMilliSeconds = 10 * 365.25 * 24 * 60 * 60 * 1000;
d.setTime(d.getTime() - (long)tenYearsInMilliSeconds);
The reason is subtle. Both d and
harry.hireDay refer to the same object (see figure 4-5).
Applying mutator methods to d automatically changes the
private state of the employee object!
If you need to return a reference to a mutable object, you should clone
it first. A clone is an exact copy of an object that is stored in a new
location. We will discuss cloning in detail in chapter 6. Here is the
corrected code:
class Employee
{
. . .
public Date getHireDay()
{
return (Date)hireDay.clone();
}
}
As a rule of thumb, always use clone
whenever you need to return a copy of a mutable variable.
2. In figure 4.5, changeGregorianCalendarto Date .
- Page 142
- In the TIP, change "the String and Date
classes are immutable" to "the String class is immutable"
- Page 146
- Change the last line from “with a static field count
and a static method getCount ” to “with a static field nextId
and a static method getNextId”
- Page 159
- Change "There is a actually a third mechanism" to "There
is actually a third mechanism"
- Page 160
- Add a semicolon after private double salary
- Page 163 ConstructorTest.java
- Move the last two lines of the program
private int id;
private static int nextId;
above the object initialization block, like this:
// must define before use in initialization block
private int id;
private static int nextId;
// object initialization block
{
id = nextId;
nextId++;
}
- Page 169/170
- Change /home/user/classes to /home/user/classdir
(5x) and c:\classes to c:\classdir (2x)
- Page 192
- Change "The compiler produces method tables" to "The virtual
machine produces method tables".
- Page 205:
- Change "The Java Language Specification requires..." to "The Java
Platform API Specification requires..."
- Page 205:
- The numbered list in the note uses the wrong font
- Page 223
- The spacing around the line if (n instanceof Double) Double
d = (Double)n in the second note is uneven.
- Page 230-232:
- In ReflectionTest.java, change
System.out.print(Modifier.toString(c.getModifiers()));
System.out.print(" " + name + "(");
to
System.out.print(" " + Modifier.toString(c.getModifiers()));
System.out.print(" " + name + "(");
and make the same changes to print the fields and methods.
- Page 232
- 1. Change "The getFields method returns an array
containing Field objects for the public fields."
to "The getFields method returns an array containing Field
objects for the public fields of this class or its superclasses."
2. Change "The getDeclaredField method returns an array of
Field objects for all fields." to "The getDeclaredFields
method returns an array of Field objects for all fields of
this class ."
3. Change the description of the getMethods/getDeclaredMethods
methods to: "return an array containing Method objects:
getMethods returns public methods and includes inherited
methods, getDeclaredMethods returns all methods of this
class or interface, but does not include inherited methods."
- Page 234
- Change
Field f = cl.getField("name");
to
Field f = cl.getDeclaredField("name");
- Page 235 and 237 ObjectAnalyzerTest.java
- Change
r += val.toString();
to
r += val; // calls val.toString()
(Note: The latter also works if val is null
.)
- Page 235 and 237: ObjectAnalyzerTest.java
- Change while (cl != Object.class) to while (cl !=
null)
(This change is necessary so that the introspection works for the Object
class itself).
- Page 238 ObjectAnalyzerTest.java
- Change
if (!f.get(a).equals(f.get(b)))
return false;
to
if (f.get(a) == null) { if (f.get(b) != null) return false; }
else if (!f.get(a).equals(f.get(b))) return false;
- Page 253
- Change "-1 if the first employee's salary is less than 0" to "-1
if the first employee's salary is less than the second employee's
salary"
- Page 264
- Change "belong to an immutable class, such as String
and Date" to "belong to an immutable class, such as String"
- Page 278
- Add the line
NumberFormat formatter
before the line
= NumberFormat.getCurrencyInstance();
- Page 281
- The indentation of the code in the start method is
wrong. The correct indentation is shown in lines 36 through 57 on page
283
- Page 281
- The opening brace in the 5th line of the first code example
should be bold, to match the bold closing brace in the 4th line from
the end
- Page 303 4th line from bottom
- Change “the most important methods, inherited from the base class
Frame, are the following ones”, to “the most important
methods are the following ones”
- Page 324 Lines 2 and 3
- Change g.setPaint to g2.setPaint and
g.drawString to g2.drawString
- Page 331 Line 1
- Change new URL(http to new URL("http
- Page 331 Line 6
- Change f.deriveFont(14); to f.deriveFont(14F
);
(Otherwise Font.deriveFont(int) is called, which
sets the font style!)
- Page 332
- 1. Change "The height of the rectangle is the sum of ascent and
descent" to "The height of the rectangle is the sum of ascent, descent,
and leading."
2. Change "Thus, you can obtain string width, height, ascent, and
descent as follows:" to "Thus, you can obtain string width, height, and
ascent as follows:"
3. Remove the line double descent = bounds.getHeight() +
bounds.getY();
4. Change "If you need to know the leading or total height"
to "If you need to know the descent or leading"
5. Replace the line float fontHeight = metrics.getHeight();with
float descent = metrics.getDescent();
- Page 332 13th line from bottom
- Change get-LineMetrics to getLineMetrics
- Page 335 API note for the getStringBounds method
- Change "The height of the rectangle equals the sum of ascent and
descent" to "The height of the rectangle equals the sum of ascent,
descent, and leading."
- Page 377
- Change “if (keyCode == keyEvent.VK_RIGHT &&
event.isShiftDown()) ” to “if (keyCode == KeyEvent.VK_RIGHT
&& event.isShiftDown()) ”
- Page 382
- In the description of the getModifiers method, change
CONTROL_MASK to CTRL_MASK
- Page 389 MouseTest.java
- Change the comment of the find method from
@return the index of the first square that contains p
to
@return the first square that contains p
- Page 394
- Add the lines
putValue(Action.SHORT_DESCRIPTION,
"Set panel color to " + name.toLowerCase());
below
putValue(Action.SMALL_ICON, icon);
- Page 400/401
- The Parameters section on top of page 401 should be
placed above the bullet static KeyStroke getKeyStroke(String
description) on page 400.
- Page 410
- In the Caution note, change "you can pass pass a mask of 0" to
"you can pass a mask of 0".
- Page 419
- Change "The quick brown fox jumped over the lazy dog"
to "The quick brown fox jumps over the lazy dog"
- Page 420
- Change "But if the user presses a key, then the controller may
tell the view to scroll." to "But if the user presses a cursor
key, then the controller may tell the view to scroll."
- Page 439 Paragraph 4
- Change "It not not always obvious" to "It is not
always obvious"
- Page 481
- Change menuBar.addMenu(editMenu) to menuBar.add(editMenu)
- Page 484
- Change "by default, the menu icons are placed to the right of the
menu text" to "by default, the menu item text is placed to the
right of the icon".
- Page 484
- Change
cutItem.setHorizontalTextPosition(SwingConstants.RIGHT)
to
cutItem.setHorizontalTextPosition(SwingConstants.LEFT)
- Page 484
- Change “moves the menu item text to the right of the icon” to
“moves the menu item text to the left of the icon”
- Page 511
- Change "Here are details about the box layout manager does:" to
"Here are details about what the box layout manager does:"
- Page 517
- Change “see the listing in Example 9-13” to “see the listing in
Example 9-14”
- Page 545
- Change
public AboutDialog(JFrame owner) extends JDialog
{
. . .
}
to
public class AboutDialog extends JDialog
{
public AboutDialog(JFrame owner)
{
. . .
}
}
- Page 551 - 555 DataExchangeTest.java
- 1.On page 555, remove
owner = null;
in the showDialog method after the line
if (dialog == null || dialog.getOwner() != owner)
2. On page 553, change
JButton cancelButton = new JButton("Cancel");
okButton.addActionListener(new
to
JButton cancelButton = new JButton("Cancel");
cancelButton.addActionListener(new
- Page 571 ColorChooserTest.java Line 1
- Change import java.aw1t.*; to import
java.awt.*;
- Page 589
- Change “the calculator application from Chapter 7” to “the
calculator application from Chapter 9”
- Page 602
- Change
-
http://java.sun.com/products/plugin/1.1/jinstall-11-win32.cab#Version=1,3,0,0
to
http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0
- Page 613
- Change “You can tell the browser to show the applet in another
window” to “You can tell the browser to show the document in
another window”
- Page 623 AppletFrame.java
- To make this file compile with SDK 1.4, add these two lines to
the AppletFrame class:
public void setStream(String key, InputStream stream) {}
public InputStream getStream(String key) { return null; }
- Page 626
- Change
jar cfm MyArchive.jar manifest-additions.mf
to
jar ufm MyArchive.jar manifest-additions.mf
- Page 631 ResourceTest.java Line 21
- Change
class AboutPanel extends JTextArea
to
class AboutPanel extends JPanel
- Page 664
- Change job.print(); to job.print(attributes);
- Page 655 ExceptTest
- Swap lines 157 and 158, that is, change
super.fireActionPerformed(event);
textField.setText("No exception");
to
textField.setText("No exception");
super.fireActionPerformed(event);
- Page 660
- Change "It then uses the toString method of the
Hashtable class" to "It then uses the toString
method of the Hash map class"
- Page 666 Paragraph before the C++ note
- Change "then the compiler loads the inner class" to "then the
virtual machine loads the inner class".
- Page 672 EventTracerTest.java
- Change
JFrame frame = new JFrame();
to
JFrame frame = new EventTracerFrame();
- Page 736
- Change e.writeData(in); to e.writeData(out);
- Page 736
- Change (n-1) * RECORD.SIZE to (n-1) *
RECORD_SIZE
- Page 744 ObjectFileTest.java
- Change the Manager constructor comments to
@param year the hire year
@param month the hire month
@param day the hire day
- Page 778
- Change the entry for volatile from "not used" to
"Ensure that a field is coherently accessed by multiple threads (see
Volume 2)"
- Page 778
- Add a table entry "strictfp Use strict rules for
floating-point computations" to the keyword table.
Fifth Edition Volume 2 (JDK 1.3/1.4)
- Page xxi
- Change "The book that you hold in your hands is the second volume
of the fourth edition..." to Change "The book that you hold in your
hands is the the second volume of the fifth edition..."
- Page 4
- Change "it has finished its 1,000 bounces" to "it has
finished its 1,000 moves"
- Page 7
- Change @c the component in which the ball bounces to @param
c the component in which the ball bounces
- Page 8
- Remove the paragraph "In previous sections...next" below
the API note for Thread.sleep
- Page 13
- Change "@aBall the ball to bounce to @param aBall
the ball to bounce
- Page 14
- Change @c the component in which the ball bounces to @param
c the component in which the ball bounces
- Page 18
- In the API note, java.lang.Thread
should not be italic.
- Page 33
- Change @color the color for the balls to @param
color the color for the balls
- Page 34
- Change "@aBall the ball to bounce to @param aBall
the ball to bounce
- Page 35
- Change @c the component in which the ball bounces to @param
c the component in which the ball bounces
- Change @color the color for the ball to @param
color the color for the ball
- Page 40
- Change @param priority the priority for the threads
- to
- @param selfish true if the thread is selfish
- Page 40
- Change @color the color for the balls to @param
color the color for the balls
- Page 41
- Change "@aBall the ball to bounce to @param aBall
the ball to bounce
- Change "@boolean selfishFlag true to @param
selfishFlag true
- Page 42
- Change @c the component in which the ball bounces to @param
c the component in which the ball bounces
- Change @color the color for the ball to @param
color the color for the ball
- Page 48
- Remove lines 107, 108, 116, 124
- Page 50
- Change laload to iaload
- Change lsub to iadd
- Change lastore to iastore
- Page 71
- Remove the sentence "See the SocketOpener in Chapter 3 for a
typical example."
- Page 86
- In the stop method,
change runner.interrupt();
to if (runner != null)
runner.interrupt();
- Page 88
- Change "Figure 1-4 shows six different clocks." to "Figure 1-14
shows six different clocks."
- Page 98
- Change "Use the setMillisToDecidePopup method to set"
to "Use the setMillisToDecideToPopup method to set"
- Page 102
- Change "Normally, you would convert fileIn to an InputStreamReader"
to "Normally, you would convert in to an InputStreamReader"
- Page 106
- Change "construct a horizontal slider with" to "construct
a slider with"
- Page 111
- Change @param is the output stream to @param is
the input stream"
- Page 117
- Change "Link" to "Link" in figure 2-2.
- Change "public class
AbstractCollection" to "public
abstract class
AbstractCollection"
- Page 123
- Change "(such as add and iterator )" to
"(such as size and iterator)"
- Page 123
- Change public abstract boolean add(Object obj); to public
abstract int size();
- Page 124
- In the API note for java.util.Collection,
under boolean removeAll
(Collection other)
Change
Parameters:
other
the collection holding the elements to add
to
Parameters:
other
the collection holding the elements remove
- Page 125
- Change
- Object remove()
- removes and returns the last visited object.
- to
- void remove()
- removes the last visited object.
- Page 127
- Change "The LinkedList class implements the Collection
interface." to "The LinkedList class implements the List
interface."
- Page 127
- Change "The following code example prints the first three
elements of a list, adds three elements, and then removes the third one."
to "The following code example adds three elements, prints the
first three elements of a list, and then removes the third one."
- Page 140
- In the LinkedHashSet
API, change HashSet(int initialCapacity, float loadFactor) to
LinkedHashSet(int
initialCapacity, float loadFactor)
- Page 148
- Change if (getClass() == other.getClass()) to if
(other != null && getClass() == other.getClass())
- Page 159
- In the API note for java.util.WeakHashMap, change
"construct an empty hash map" to "constructs an empty weak hash map".
In the API note for java.util.LinkedHashMap,
change "construct an empty hash map." to "constructs an empty linked
hash map.". Change "construct a hash map" to "constructs an empty
linked hash map"
- Page 159
- In the API note for the java.util.LinkedHashMap
constructor, add a parameter "accessOrder true for access order, false for insertion order"
- Page 160
- Change "There are two fundamental interfaces for containers:"
to "There are two fundamental interfaces for collections:"
- Page 160
- Change "whose capacity is the smallest power of 2 exceeding 1.5."
to "whose capacity is the smallest power of 2 exceeding 1.5 * expectedMaxSize."
- Page 161
- Change Object put(object key, object value)
to Object put(Object key, Object value)
- Page 162
- Change "to obtain views of subsets of the containers." to
"to obtain views of subsets of the collections."
- Page 163 Figure 2-11
- Change "LinkedSet" to "LinkedList
- Page 165
- Change map = Collections.synchronizedMap(hashMap); to
Map map = Collections.synchronizedMap(hashMap);
- Page 165
- Change "The Collections class contains" to "The Collections
class contains" (i.e. not bold)
- Page 173
- Change largest = v.get(i); to largest
=(Comparable)vector.get(i);
- Page 173
- Change largest = next; to largest =
(Comparable)next;
- Page 175
- Change "The sort method in the Collections class" to
"The sort method in the Collections class"
- Page 180 API for rotate
- Change "the list to reverse" to "the list to rotate"
- Page 181
- Change items.set(i,comboBox.getItemAt(i)); to items.add(i,comboBox.getItemAt(i));
- Page 183
- Change = new SequenceInputStream(Collections.enumeration(streams)
); to = new SequenceInputStream(Collections.enumeration(streams));
(i.e. remove space between parentheses)
- Page 186
- Change "Background color" to "Foreground color"
- Page 193
- Change new BitSet(n) to new BitSet(n + 1)
- Page 213
- Change "@param x the grid bax column to "@param
x the grid bag column
- Page 215
- Change String line to String line;
- Page 215
- Change while((String line = in.readLine()) != null)
to While((line = in.readLine()) != null)
- Page 217
- Change "or, with IPv6, six bytes" to "or, with IPv6, sixteen
bytes"
- Page 233
- Change
- InputStream openInputStream()
- OutputStream openOutputStream()
- to
- InputStream getInputStream()
- OutputStream getOutputStream()
- Page 239
- Change "call doOutput(true)" to "call setDoOutput(true)"
- Page 243
- Change "how to read data from" to "how to send data to"
- Page 245
- Change
weather.setFont(new Font("Courier", Font.PLAIN, 12));
to
weather.setFont(new Font("Courier", Font.PLAIN, 12));
weather.setEditable(false);
- Page 245
- Change
// Add the report button
contentPane.add(new JScrollPane(weather),BorderLayout.CENTER);
to
contentPane.add(new JScrollPane(weather),BorderLayout.CENTER);
// Add the report button
- Page 284
- Change float price = rs.getDouble("Price"); to double
price = rs.getDouble("Price");
- Page 285
- Change java.sql.Numeric to java.math.BigDecimal
- Page 285
- Change "return objects of type BLOB and CLOB"
to "return objects of type Blob and Clob"
- Page 294
- Change rs.getString(2y) to rs.getString(2)
- Page 295
- Change AND BooksAuthors.Author = Authors.Author to AND
BooksAuthors.Author_Id = Authors.Author_Id
- Page 296
- Change
- class QueryDB extends Frame
- {
- QueryDB()
- to
- class QueryDBFrame extends JFrame
- {
- public QueryDBFrame()
- Page 299
- Change
- add(new
- WindowAdapter()
- to
- addWindowListener(new
- WindowAdapter()
- Page 304
- Change "One form of the getStatement method" to "One
form of the createStatement method"
- Page 311 & 312
- Delete "command the
command to prepare"
- Page 313
- Change
- Label l = new Label (columnName);
- TextField tf = new TextField (columnWidth);
- to
- JLabel l = new Label (columnName);
- JTextField tf = new TextField (columnWidth);
- Page 316
- Change
- add(new
- WindowAdapter()
- to
- addWindowListener(new
- WindowAdapter()
- Page 317
- Delete } Line 108 in the source code listing.
- Page 321
- Change "DataBaseMetaData object." to "DatabaseMetaData
object."
- Page 340
- Change "the parameters and marshal the results of" to "the
parameters and unmarshal the results of"
- Page 349
- In the API note for lookup and unbind methods
of java.rmi.Naming
- Change "NotBound exception" to "NotBoundException"
- Page 350
- In the Caution note, change "In addition to the interface stubs"
to "In addition to the implementation stubs"
- Page 352
- Change
http://java.sun.com/products/jdk/1.2/docs/guide/rmi/codebase.html
to
http://java.sun.com/j2se/1.4/docs/guide/rmi/codebase.html
- Page 354
- Change "the client cannot return a string stub object."
to "the server cannot return a string stub object."
- Page 355
- Change "Chapter 12 of volume 1, the serialization
mechanism" to "Chapter 12 of Volume 1, the serialization
mechanism"
- Page 358
- Change "See Chapter 2 for more details on synchronized"
to "See Chapter 1 for more details on synchronized
- Page 358
- Change "prove that the clear call in" to " prove that
the reset call in"
- Page 362
- Change Each line has t the format to Each line has
the format
- Page 362
- Change 0, 200, Product.BOTH, "Computers"); to Product.BOTH,
0, 200, "Computers");
- Page 369
- Change (Product)result.elementAt(i); to (Product)result.get(i);
- Page 379
- Change new ActivationGroupDesc(prop, null); to new
ActivationGroupDesc(props, null)
- Page 384
- Delete the last line of the page:
- . ActivationGroupID
registerGroup(ActivationGroupDesc group)
- Page 385
- Change
- Register an activation group and returns
the group ID.
- to
- . ActivationGroupID
registerGroup(ActivationGroupDesc group)
- Register an activation group and
returns the group ID.
- Page 391
- Change idltojava to idlj
- Page 402
- Change idlj -fall SysProp.java to idlj -fall
SysProp.idl
- Page 410
- Change "jump over the lazy dog." to "jumps over the
lazy dog."
- Page 412
- Change String selection = (String)source.getSelectedValue();
to String value = (String)list.getSelectedValue();
- Page 420
- In the getElementAt method of the javax.swing.ListModel
API
- Change "returns an element of the model." to "returns the element
of the model at position index."
- Page 446
- Change javax.swing.DefaultTreeModel to javax.swing.tree.DefaultTreeModel
- Page 449
- Change "similar to the list cell renderers we discussed in
Chapter 9 of Volume 1." to "similar to the list cell renderers we
discussed earlier in this chapter."
- Page 455
- Change
- leaf true if the node needs to
be displayed as a tree
- to
- leaf true if the node needs to
be displayed as a leaf
- Page 461
- Change @param the class to be described to @param
c the class to be described
- Page 489
- Change "rows[i] is set to i:" to"rows[i].index
is set to i:"
- Page 490
- Change Double-click on a table column to sort it. to Double-click
on a table column header to sort it.
- Page 492
- Change @param m the table model to filter to @param
m the table model to sort
- Page 496
- Change NAME_COLUMN to PLANET_COLUMN
- Change MOON_COLUMN to MOONS_COLUMN
- Page 497
- Change "If you click on the Moons column," to "If you click on a
cell in the Moons column"
- Change "such a combo box as cell editor" to ""such a combo box as
a cell editor"
- Page 498
- Change "A TableColumnModel class manages the columns."
to "A TableColumnModel object manages the columns."
- Page 499
- Change "the same as the getTableCellRenderer method" to
"the same as the getTableCellRendererComponent method"
- Page 528
- Change javax.swing.HyperlinkEvent to javax.swing.event.HyperlinkEvent
- Page 533
- Change tabbedPane.insertTab(title, icon, component, index);
to tabbedPane.insertTab(title, icon, component, tooltip, index);
- Page 534
- Change "which pane is about to be selected." to "has been
selected."
- Page 537
- In the API note of javax.swing.JTabedPane
- Change parameter of method addTab from Component
component to Component c
- Page 537
- Change "with the given title,icon" to "with the given icon,title"
- Page 548
- Change This desktop frames contains to This
desktop frame contains
- Page 556
- The following lines should be interspersed with "boolean
isResizable()" = etc.
void setResizable(boolean b)
void setClosable(boolean b)
void setMaximizable(boolean b)
void setIconifiable(boolean b)
- Page 561
- Change "Use the setClip" to "Use the clip"
- Change "Use the setTransform"
to "Use the transform"
- Page 574
- Change Makes a line that joins two given corner points.
to Makes a rectangle that
joins two given corner points.
- Page 578
- In the documentation of startAngle,
change "in radians" to "in degrees". Change π / 4 to
45°.
- Page 587
- Change makeJoinButton("Bevel Join",
BasicStroke.JOIN_BEVEL,group2); makeJoinButton("Miter Join",
BasicStroke.JOIN_MITER,group2);
to
makeJoinButton("Miter Join", BasicStroke.JOIN_MITER, group2);
makeJoinButton("Bevel Join", BasicStroke.JOIN_BEVEL,group2);
- Page 594
- Change new BufferedImage(width,height,TYPE_INT_ARGB);
to new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);
- Page 602
- Change "it replaces any existing clipping shape" to "it
replaces any existing transformation"
- Page 611
- Change This frame contains radio buttons to This
frame contains a check box
- Page 614
- Change "The Java 2D API implements eight of these rules."
to "The Java 2D API implements all of these rules."
- Page 616
- Change "AlphaComposite,that implements the eight
Porter-Duff rules" to "AlphaComposite,that implements all
Porter-Duff rules"
- Page 617
- In figure 7-25 in SRC_ATOP, move the ellipse to the
left, like in all the other rectangles.
- Page 623
- In the parameter rulein java.awt.AlphaComposite
API, add:
- DST,DST_ATOP,SRC_ATOP,XOR
- Page 634
- Change "The IOImage class can enumerate" to "The ImageIO
class can enumerate"
- Change IOImage.getImageWritersByFormatName( format );
to ImageIO.getImageWritersByFormatName( format );
- Page 650
- In the API note for java.awt.image.Raster
- Change
- public int[] getPixel(int x, int y, int w, int h, int[]
sampleValues)
- public float[] getPixel(int x, int y,int w, int h, float[]
sampleValues)
- public double[] getPixel(int x, int y,int w, int h, double[]
sampleValues)
- to
- public int[] getPixel(int x, int y, int[] sampleValues)
- public float[] getPixel(int x, int y, float[] sampleValues)
- public double[] getPixel(int x, int y, double[] sampleValues)
- Page 651
- In the API note for java.awt.image.WritableRaster
- Change
- void setPixel(int x, int y, int w, int h, int[] sampleValues)
- void setPixel(int x, int y, int w, int h, float[]
sampleValues)
- void setPixel(int x, int y, int w, int h, double[]
sampleValues)
- to
- void setPixel(int x, int y, int[] sampleValues)
- void setPixel(int x, int y, float[] sampleValues)
void setPixel(int x, int y, double[] sampleValues)
- Page 664
- Change job.print(); to job.print(attributes);
- Page 673
- Add one method for java.awt.print.PrinterJob
- void print(PrintRequestAttributeSet attributes)
- Page 687
- The MIME type for TEXT_HTML_UTF_16BE
should be charset-utf-16be.
- Page 700
- In Figure 7-43 the arrows from Copies should point at PrintRequestAttribute and PrintJobAttribute.
- Page 719
- Change "for copying and pasting text." to " for copying and
pasting images."
- Page 738
- In the Tip box,
- Change event.acceptDrop(event.getDropEvent()); to event.acceptDrop(event.getDropAction());
- Page 753
- Change JLabel to JTable
- Page 754
- Change component.setTransferHandler("name"); to component.setTransferHandler(new
TransferHandler("name"));
- Page 766
- Change Repeat this step with the FileNameBean. to
Repeat these steps with the FileNameBean.
- Page 775
- Change setPropertyName(int i, X[] x) to setPropertyName(int
i, X x)
- Page 787
- Change "5. The to field vetoes the change."
to "5. The from field vetoes the change."
- Page 787
- In Figure 8-14, change "to < from" to "from
> to".
- Page 793
- Change lines 8 and 12 to "Parameters: listener
the object ..."
- Page 789
- Line 74 in the source code listing, change @return true of
the field to @return true if the field
- Line 83 in the source code listing, change @param to @return
- Page 793
- In the API note for javax.swing.JComponent.addVetoableChangeListener,
Change
- . Parameters: listener the
object that wants to be notified of a change in the bound property
- to
- . Parameters: listener the
object that wants to have a chance to veto the constrained property
- Page 793
- Change "oldValue the old
value" to "oldValue
the current value"
- Change "newValue the new
value" to "newValue the
proposed new value"
- Page 801
- Change "we discuss in this section has four properties:"
- to
- "we discuss in this section has five properties:"
- ". A Color property, graphColor"
- Page 801
- After "It achieves the following:", remove list item 1 and rename
the remaining list items.
- Page 803
- Change
- public void paint(Graphics g)
- {
- to
- public void paintComponent(Graphics g)
- { super.paintComponent(g);
- Page 806
- Line 162 in the source code listing, change @param c to
@return
- Page 807
- Change "such as Class.Color" to "such as Color.class"
- Page 810
- Line 14 in the source code listing, change
- return options[value];
- to
- if (0 <= value && value < options.length)
return options[value];
- return "";
- Page 851
- Change if (beanContext implements BeanContextServices)
to if (beanContext instanceof BeanContextServices)
- Page 858
- In Example 8-19 line 5, change The bean infor for the chart
bean, to The bean infor for the spin bean,
- Page 882
- Change "of the ProtectionDomain method" to "of the ProtectionDomain
class"
- Page 883
- In Method column of Table 9-1:
- Change SecurityManager to checkPermission
- Page 884 and 885
- In the API note of java.lang.Class, move the method
- Class defineClass(String name, byte[] data, int offset, int
length, ProtectionDomain domain)
- to after the API heading java.lang.ClassLoader
- Page 885
- Change
- public ProtectionDomain(CodeSource
source,PermissionCollection collections)
- to
- public ProtectionDomain(CodeSource
source,PermissionCollection permissions)
- Page 886
- Change "file java.security in the jre/lib
subdirectory" to "file java.security in the jre/lib/security
subdirectory"
- Page 886
- Add a semicolon after the closing brace of the grant clause.
- Page 887
- Add a semicolon after the closing brace of the grant
clause.
- Page 886
- Add a semicolon after the closing brace of the grant
clause. (2x)
- Page 891
- Change "${user.home}" "read,write";" to "${user.home}",
"read,write";
- Change "${user.home}${/}-" "read,write";" to
"${user.home}${/}-,
"read,write";
- Page 895
- Change
- WordCheckPermission "sex,drugs,C++", "avoid"
- implies the permission
- WordCheckPermission "sex,drugs", "avoid"
- to
- WordCheckPermission "sex,drugs", "avoid"
- implies the permission
- WordCheckPermission "sex,drugs,C++", "avoid"
- Page 896
- Change "The program in Example 9-5" to "The program
in Example
9-4"
- Page 910
- Change permission java.io.FilePermission
"<<ALL
files>>"; to permission
java.io.FilePermission "<<ALL files>>", "read";
- Page 911
- Change
- com.whizzbang.auth.module.RetinaScanModule
sufficient;
- }
- to
- com.whizzbang.auth.module.RetinaScanModule
sufficient;
- };
- Page 916
- Change static Object doAs(Subject subject, ,PrivilegedActionException
action) to static Object doAs(Subject subject, PrivilegedExceptionAction
action)
- Page 956
- Change int blockSize = cipher.blockSize();
to int
blockSize = cipher.getBlockSize();
- Change int outputSize=
cipher.outputSize(inLength); to int
outputSize= cipher.getOutputSize(inLength);
- Page 957
- Change "is appended to the input and decrypted."
to "is
appended to the input and encrypted."
- Page 958
- Change "(to generate one pad byte)" to "(to generate
one pad
block)"
- Page 961
- In the description of KeyGenerator, change
the method name initialize
to init. (2x)
- Page 962
- Change . Key
generateKey() to . SecretKey
generateKey()
- Page 968
- In the API note of java.security.Security.setProperty
- Change "gets a security property" to "sets a security
property"
- Page 974
- Change "uses the euro sign $ instead" to "uses the
euro sign €
instead"
- Page 989
- Line 109 in the source code
- Change currentDateFormat.setLenient to currentTimeFormat.setLenient
- Page 996
- Change if(aKey.compareTo(coll.getCollationKey(b)==0)
to if(aKey.compareTo(coll.getCollationKey(b))==0)
- Page 998
- In line 63 in the source code listing, the string
should be "Ångstrom".
- Page 1010
- Change MessageText to MessageFormat
- Page 1025
- Change public class MyApplet extends JApplet
implements
ActionListener to public class MyApplet extends JApplet
- Page 1040
- After line 509 in the source code, add
- super.paintComponent(g);
- Page 1050
- Change printf("Hello world!\n"); to printf("Hello,
Native World!\n");
- Page 1058
- In the description of NewString, change "chars
the null-terminated UTF string"
to "chars the null-terminated UTF16 string"
- Page 1062
- Change
- x = (*env)->GetXxxField(env, class, fieldID);
- (*env)->GetXxxField(env, class, fieldID, x);
- to
- x = (*env)->GetXxxField(env, obj_this,
fieldID);
- (*env)->SetXxxField(env, obj_this, fieldID, x);
- Page 1066
- In the description of GetStaticXxxField,
change
- cl the class object whose
static field
is being set
- to
- cl the class object whose
static field
is being returned
- Page 1069
- Change "As you saw in Chapter 1" to "As you saw in
Volume 1,
Chapter 12"
- Page 1074
- Change void CallXxxMethod to Xxx
CallXxxMethod
- Change void CallXxxMethodA to Xxx
CallXxxMethodA
- Change void CallXxxMethodV to Xxx
CallXxxMethodV
- Change void CallNonvirtualXxxMethod to Xxx
CallNonvirtualXxxMethod
- Change void CallNonvirtualXxxMethodA to Xxx
CallNonvirtualXxxMethodA
- Page 1075
- Change void CallNonvirtualXxxMethodV to Xxx
CallNonvirtualXxxMethodV
- Change void CallStaticXxxMethod to Xxx
CallStaticXxxMethod
- Change void CallStaticXxxMethodA to Xxx
CallStaticXxxMethodA
- Change void CallStaticXxxMethodV to Xxx
CallStaticXxxMethodV
- Page 1078
- Change (*env)->ReleaseDoubleArrayElements(env,
array_a,
0); to (*env)->ReleaseDoubleArrayElements(env, array_a, a,
0);
- Page 1082
- Change jbool occurred =
(*env)->ExceptionCheck(env);
to jboolean occurred = (*env)->ExceptionCheck(env);
- Page 1102
- Line 212 in the source code listing
- Change "Query value key failed" to "Set
value key
failed"
- Page 1119
- Change Text textNode
=childElement.getFirstChild(); to Text
textNode =(Text)childElement.getFirstChild();
- Page 1124
- Replace the comments in lines 122 to 126 of source
code listing by
- /**
- This tree model describes the tree
structure of
an XML document.
- */
- Page 1133
- Change <!ATTLIST font style
(plain|bold|italic|bold-italic) plain> to <!ATTLIST
font style (plain|bold|italic|bold-italic) "plain">
- Page 1147
- Change constraints.gridx =
Integer.parseInt(value); to constraints.gridy
= Integer.parseInt(value);
- Page 1153
- In the API note for org.w3c.dom.Node
- Change String getNameSpaceURI() toString
getNamespaceURI()
- Page 1164
- After line 159 in the source code listing, add
- colors.clear();
- Page 1166
- In the API note for javax.xml.transform.TransformerFactory
- Change public static Transformer newInstance()
to public
static TransformerFactory newInstance()
- Page 1171
- Change "employee records into an XML table." to
"employee records
into an HTML table."
- Page 1174
- Change InputStream stream =
source.getByteStream();1
- To InputStream stream = source.getByteStream();
Thanks to Kjell Ahlstedt, Ryan Baucom, Domenico
Bianculli, Dan
Blanks, Gary Boackle, Ditlev Brodersen, Michael Ciaccio, Mike Cardosa,
Bruce J Cathey, Stuart Chaulk, Jason Cisneros, Gill Cleeren, Philip B.
Copp III, Mike Cordes, Victor Cosby, Andrew Crites, Jonathan Crowther,
Jacob Davenport, William Dietrich, Gerwin Dijken, Paul Dyer, Mike
Doolittle, Jiro Ejobe, Charles Evans, Don Gaze, Matthew Gillman, Yuri
Gordienko, Fred Graf, Alexander Gülich , Steighton Haley, Mazhar
Islam, Vito P. Jokubaitis, Arnold Juster, Christopher Keller,
Jeff Kerr, Jane Kipina, Rolf Kjøller, Mark Lawrence, Al Layton,
Dong Lee, Fox Louie, Ryan Lowe, Howard Lum, Dan Manning, Charles
MacLeod, Sudershan Mehta, Marlene Miller, Jeff Morgan,
Joseph Ng, John Nguyen, Seamus O'Keefe, Douglas Parent, Matt Payne,
Hao Pham, György Pongor, Boris Pulatov, John C. Roberts, Joe
Rudy,
Dave Sandilands, Brian S. Scott, David Sheth, Adrian Shum, Sean A.
Smith, Bill
Sorensen, Jack Stover, Christopher Steele, Mark Stratman, Christopher
Tan, Jeff Tash, Andreas Thomassen, Leonardo Topa, Thierry Tung, Russell
Van Bert, Gerwin van Dijken, Heikki Virkkunen, Robert G. Walker, David
Welsh, Norman Witkin, Baihao Yuan and a number of anonymous
contributors for their bug reports!
Please report any remaining bugs in this edition on the bug report form.