diff options
author | lana <none@none> | 2013-11-25 09:40:25 -0800 |
---|---|---|
committer | lana <none@none> | 2013-11-25 09:40:25 -0800 |
commit | 6401566baedeef589cd0af970fe4bee5bf66cf88 (patch) | |
tree | 6a8d7a321188184230474b98fe15baf212777c5c /src | |
parent | 9dc60c74706a6ebac0f18c67bcd8356f7cb807f9 (diff) | |
parent | 57ed2bf3f94d85c4f927c885997e8bbb0609f64d (diff) |
Merge
--HG--
rename : makefiles/CompileDemos.gmk => make/CompileDemos.gmk
rename : makefiles/SignJars.gmk => make/SignJars.gmk
Diffstat (limited to 'src')
49 files changed, 139 insertions, 126 deletions
diff --git a/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java b/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java index be4b5b72a..5669d10b1 100644 --- a/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java +++ b/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java @@ -227,7 +227,7 @@ public class AquaFileChooserUI extends FileChooserUI { // Exist in basic.properties (though we might want to override) fileDescriptionText = UIManager.getString("FileChooser.fileDescriptionText"); directoryDescriptionText = UIManager.getString("FileChooser.directoryDescriptionText"); - newFolderErrorText = getString("FileChooser.newFolderErrorText", "Error occured during folder creation"); + newFolderErrorText = getString("FileChooser.newFolderErrorText", "Error occurred during folder creation"); saveButtonText = UIManager.getString("FileChooser.saveButtonText"); openButtonText = UIManager.getString("FileChooser.openButtonText"); diff --git a/src/macosx/classes/com/apple/laf/resources/aqua.properties b/src/macosx/classes/com/apple/laf/resources/aqua.properties index 17f7a9458..ac147020c 100644 --- a/src/macosx/classes/com/apple/laf/resources/aqua.properties +++ b/src/macosx/classes/com/apple/laf/resources/aqua.properties @@ -38,7 +38,7 @@ ############ FILE CHOOSER STRINGS ############# FileChooser.fileDescription.textAndMnemonic=Generic File FileChooser.directoryDescription.textAndMnemonic=Directory -FileChooser.newFolderError.textAndMnemonic=Error occured during folder creation +FileChooser.newFolderError.textAndMnemonic=Error occurred during folder creation FileChooser.newFolderErrorSeparator= : FileChooser.acceptAllFileFilter.textAndMnemonic=All Files FileChooser.cancelButton.textAndMnemonic=Cancel diff --git a/src/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java b/src/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java index 96f099cf2..00bf1ee32 100644 --- a/src/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java +++ b/src/share/classes/com/sun/imageio/plugins/common/StandardMetadataFormatResources.java @@ -123,7 +123,7 @@ public class StandardMetadataFormatResources extends ListResourceBundle { "The vertical position, in millimeters, where the image should be rendered on media " }, { "HorizontalPixelOffset", - "The horizonal position, in pixels, where the image should be rendered onto a raster display" }, + "The horizontal position, in pixels, where the image should be rendered onto a raster display" }, { "VerticalPixelOffset", "The vertical position, in pixels, where the image should be rendered onto a raster display" }, diff --git a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.java b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.java index 6dc479f24..aa3495264 100644 --- a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.java +++ b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubBulkRequestHandler.java @@ -111,7 +111,7 @@ class SnmpSubBulkRequestHandler extends SnmpSubRequestHandler { if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(), "run", "[" + Thread.currentThread() + - "]:an Snmp error occured during the operation", x); + "]:an Snmp error occurred during the operation", x); } } catch(Exception x) { @@ -119,7 +119,7 @@ class SnmpSubBulkRequestHandler extends SnmpSubRequestHandler { if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(), "run", "[" + Thread.currentThread() + - "]:a generic error occured during the operation", x); + "]:a generic error occurred during the operation", x); } } if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) { diff --git a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.java b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.java index 3ff95f6a0..99eebaa8c 100644 --- a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.java +++ b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubNextRequestHandler.java @@ -127,7 +127,7 @@ class SnmpSubNextRequestHandler extends SnmpSubRequestHandler { if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(), "run", "[" + Thread.currentThread() + - "]:an Snmp error occured during the operation", x); + "]:an Snmp error occurred during the operation", x); } } catch(Exception x) { @@ -135,7 +135,7 @@ class SnmpSubNextRequestHandler extends SnmpSubRequestHandler { if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(), "run", "[" + Thread.currentThread() + - "]:a generic error occured during the operation", x); + "]:a generic error occurred during the operation", x); } } if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) { diff --git a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.java b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.java index 0b9813113..391d528f8 100644 --- a/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.java +++ b/src/share/classes/com/sun/jmx/snmp/daemon/SnmpSubRequestHandler.java @@ -231,7 +231,7 @@ class SnmpSubRequestHandler implements SnmpDefinitions, Runnable { if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(), "run", "[" + Thread.currentThread() + - "]:an Snmp error occured during the operation", x); + "]:an Snmp error occurred during the operation", x); } } catch(Exception x) { @@ -239,7 +239,7 @@ class SnmpSubRequestHandler implements SnmpDefinitions, Runnable { if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, SnmpSubRequestHandler.class.getName(), "run", "[" + Thread.currentThread() + - "]:a generic error occured during the operation", x); + "]:a generic error occurred during the operation", x); } } if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) { diff --git a/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java b/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java index b0494c282..1b164209c 100644 --- a/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java +++ b/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java @@ -377,7 +377,7 @@ public class CommandInterpreter { env.failure("Attempt to launch main class \"" + clname + "\" failed."); } } else { - env.failure("No main class specifed and no current default defined."); + env.failure("No main class specified and no current default defined."); } } else { clname = t.nextToken(); @@ -428,7 +428,7 @@ public class CommandInterpreter { env.failure("Attempt to attach to port \"" + portName + "\" failed."); } } else { - env.failure("No port specifed and no current default defined."); + env.failure("No port specified and no current default defined."); } } else { portName = t.nextToken(); diff --git a/src/share/classes/com/sun/tools/script/shell/init.js b/src/share/classes/com/sun/tools/script/shell/init.js index ae2cdc42d..ced3ba063 100644 --- a/src/share/classes/com/sun/tools/script/shell/init.js +++ b/src/share/classes/com/sun/tools/script/shell/init.js @@ -806,7 +806,7 @@ function XSLTransform(inp, style, out) { out = arguments[2]; break; default: - println("XSL tranform requires 2 or 3 arguments"); + println("XSL transform requires 2 or 3 arguments"); return; } diff --git a/src/share/classes/com/sun/tools/script/shell/messages.properties b/src/share/classes/com/sun/tools/script/shell/messages.properties index 9caf20efd..4494f73b7 100644 --- a/src/share/classes/com/sun/tools/script/shell/messages.properties +++ b/src/share/classes/com/sun/tools/script/shell/messages.properties @@ -36,7 +36,7 @@ engine.not.found=\ script engine for language {0} can not be found engine.info=\ - Language {0} {1} implemention "{2}" {3} + Language {0} {1} implementation "{2}" {3} encoding.unsupported=\ encoding {0} is not supported diff --git a/src/share/classes/java/awt/GraphicsDevice.java b/src/share/classes/java/awt/GraphicsDevice.java index 3c9d4178b..d55ccedca 100644 --- a/src/share/classes/java/awt/GraphicsDevice.java +++ b/src/share/classes/java/awt/GraphicsDevice.java @@ -341,12 +341,11 @@ public abstract class GraphicsDevice { } /** - * Returns the {@code Window} object representing the + * Returns the <code>Window</code> object representing the * full-screen window if the device is in full-screen mode. * - * @return the full-screen window, or {@code null} if the device is - * not in full-screen mode. The {@code Window} object can differ - * from the object previously set by {@code setFullScreenWindow}. + * @return the full-screen window, or <code>null</code> if the device is + * not in full-screen mode. * @see #setFullScreenWindow(Window) * @since 1.4 */ diff --git a/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java b/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java index 1258881c1..86713ad3c 100644 --- a/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java +++ b/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java @@ -40,7 +40,6 @@ import java.net.MalformedURLException; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; @@ -1321,16 +1320,16 @@ public final class SystemFlavorMap implements FlavorMap, FlavorTable { } private List<String> getAllNativesForType(String type) { - List<String> retval = null; + Set<String> retval = null; for (DataFlavor dataFlavor : convertMimeTypeToDataFlavors(type)) { List<String> natives = getFlavorToNative().get(dataFlavor); if (natives != null && !natives.isEmpty()) { if (retval == null) { - retval = new ArrayList<>(); + retval = new LinkedHashSet<>(); } retval.addAll(natives); } } - return retval; + return retval == null ? null : new ArrayList<>(retval); } } diff --git a/src/share/classes/java/beans/IndexedPropertyDescriptor.java b/src/share/classes/java/beans/IndexedPropertyDescriptor.java index 866d35ba5..f38c35774 100644 --- a/src/share/classes/java/beans/IndexedPropertyDescriptor.java +++ b/src/share/classes/java/beans/IndexedPropertyDescriptor.java @@ -373,12 +373,13 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor { if (params[0] != Integer.TYPE) { throw new IntrospectionException("non int index to indexed write method"); } - if (indexedPropertyType != null && indexedPropertyType != params[1]) { + if (indexedPropertyType == null || params[1].isAssignableFrom(indexedPropertyType)) { + indexedPropertyType = params[1]; + } else if (!indexedPropertyType.isAssignableFrom(params[1])) { throw new IntrospectionException( "type mismatch between indexed read and indexed write methods: " + getName()); } - indexedPropertyType = params[1]; } Class<?> propertyType = getPropertyType(); if (propertyType != null && (!propertyType.isArray() || diff --git a/src/share/classes/java/beans/Introspector.java b/src/share/classes/java/beans/Introspector.java index fc8b21856..61745dd9e 100644 --- a/src/share/classes/java/beans/Introspector.java +++ b/src/share/classes/java/beans/Introspector.java @@ -684,8 +684,7 @@ public class Introspector { ipd = (IndexedPropertyDescriptor)pd; if (ipd.getIndexedWriteMethod() != null) { if (igpd != null) { - if (igpd.getIndexedPropertyType() - == ipd.getIndexedPropertyType()) { + if (isAssignable(igpd.getIndexedPropertyType(), ipd.getIndexedPropertyType())) { if (ispd != null) { ispd = new IndexedPropertyDescriptor(ispd, ipd); } else { @@ -703,7 +702,7 @@ public class Introspector { } else { if (pd.getWriteMethod() != null) { if (gpd != null) { - if (gpd.getPropertyType() == pd.getPropertyType()) { + if (isAssignable(gpd.getPropertyType(), pd.getPropertyType())) { if (spd != null) { spd = new PropertyDescriptor(spd, pd); } else { @@ -806,6 +805,10 @@ public class Introspector { } } + private static boolean isAssignable(Class<?> current, Class<?> candidate) { + return current == null ? candidate == null : current.isAssignableFrom(candidate); + } + /** * Adds the property descriptor to the indexedproperty descriptor only if the * types are the same. diff --git a/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java b/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java index e82f9401e..d19aa48fd 100644 --- a/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java +++ b/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java @@ -360,7 +360,7 @@ public class RequiredModelMBean MODELMBEAN_LOGGER.logp(Level.FINER, RequiredModelMBean.class.getName(), "setManagedResource(Object,String)", - "Managed Resouce Type is not supported: " + mr_type); + "Managed Resource Type is not supported: " + mr_type); } throw new InvalidTargetObjectTypeException(mr_type); } @@ -369,7 +369,7 @@ public class RequiredModelMBean MODELMBEAN_LOGGER.logp(Level.FINER, RequiredModelMBean.class.getName(), "setManagedResource(Object,String)", - "Managed Resouce is valid"); + "Managed Resource is valid"); } managedResource = mr; diff --git a/src/share/classes/javax/swing/AbstractButton.java b/src/share/classes/javax/swing/AbstractButton.java index 5157b16ee..6f75be948 100644 --- a/src/share/classes/javax/swing/AbstractButton.java +++ b/src/share/classes/javax/swing/AbstractButton.java @@ -1381,7 +1381,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * If <code>true</code> and the button has a border, * the border is painted. The default value for the * <code>borderPainted</code> property is <code>true</code>. - * <p/> + * <p> * Some look and feels might not support * the <code>borderPainted</code> property, * in which case they ignore this. @@ -1476,7 +1476,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * This function may cause the component's opaque property to change. * <p> * The exact behavior of calling this function varies on a - * component-by-component and L&F-by-L&F basis. + * component-by-component and L&F-by-L&F basis. * * @param b if true, the content should be filled; if false * the content area is not filled @@ -1702,7 +1702,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * @see #getMultiClickThreshhold * @param threshhold the amount of time required between mouse * press events to generate corresponding action events - * @exception IllegalArgumentException if threshhold < 0 + * @exception IllegalArgumentException if threshhold < 0 * @since 1.4 */ public void setMultiClickThreshhold(long threshhold) { @@ -1787,7 +1787,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl /** - * Returns the L&F object that renders this component. + * Returns the L&F object that renders this component. * @return the ButtonUI object * @see #setUI */ @@ -1797,8 +1797,8 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl /** - * Sets the L&F object that renders this component. - * @param ui the <code>ButtonUI</code> L&F object + * Sets the L&F object that renders this component. + * @param ui the <code>ButtonUI</code> L&F object * @see #getUI * @beaninfo * bound: true @@ -2722,7 +2722,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * * @param part the AccessibleText.CHARACTER, AccessibleText.WORD, * or AccessibleText.SENTENCE to retrieve - * @param index an index within the text >= 0 + * @param index an index within the text >= 0 * @return the letter, word, or sentence, * null for an invalid index or part * @since 1.3 @@ -2769,7 +2769,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * * @param part the AccessibleText.CHARACTER, AccessibleText.WORD, * or AccessibleText.SENTENCE to retrieve - * @param index an index within the text >= 0 + * @param index an index within the text >= 0 * @return the letter, word, or sentence, null for an invalid * index or part * @since 1.3 @@ -2833,7 +2833,7 @@ public abstract class AbstractButton extends JComponent implements ItemSelectabl * * @param part the AccessibleText.CHARACTER, AccessibleText.WORD, * or AccessibleText.SENTENCE to retrieve - * @param index an index within the text >= 0 + * @param index an index within the text >= 0 * @return the letter, word, or sentence, null for an invalid index * or part * @since 1.3 diff --git a/src/share/classes/javax/swing/Action.java b/src/share/classes/javax/swing/Action.java index 307f40a74..7223d8196 100644 --- a/src/share/classes/javax/swing/Action.java +++ b/src/share/classes/javax/swing/Action.java @@ -69,7 +69,7 @@ import java.beans.*; * are desired, and use simple <code>ActionListener</code>s elsewhere. * <p> * - * <h4><a name="buttonActions"></a>Swing Components Supporting <code>Action</code></h4> + * <h3><a name="buttonActions"></a>Swing Components Supporting <code>Action</code></h3> * <p> * Many of Swing's components have an <code>Action</code> property. When * an <code>Action</code> is set on a component, the following things @@ -95,8 +95,7 @@ import java.beans.*; * button's corresponding property being set to <code>null</code>. * <p> * <table border="1" cellpadding="1" cellspacing="0" - * summary="Supported Action properties" - * valign="top" > + * summary="Supported Action properties"> * <tr valign="top" align="left"> * <th style="background-color:#CCCCFF" align="left">Component Property * <th style="background-color:#CCCCFF" align="left">Components diff --git a/src/share/classes/javax/swing/Box.java b/src/share/classes/javax/swing/Box.java index 2f4c6e4c7..1a3ace741 100644 --- a/src/share/classes/javax/swing/Box.java +++ b/src/share/classes/javax/swing/Box.java @@ -155,7 +155,7 @@ public class Box extends JComponent implements Accessible { * in which case it takes its share of available space, * just like any other component that has no maximum height. * - * @param width the width of the invisible component, in pixels >= 0 + * @param width the width of the invisible component, in pixels >= 0 * @return the component * @see #createVerticalStrut * @see #createGlue @@ -179,7 +179,7 @@ public class Box extends JComponent implements Accessible { * in which case it takes its share of available space, * just like any other component that has no maximum width. * - * @param height the height of the invisible component, in pixels >= 0 + * @param height the height of the invisible component, in pixels >= 0 * @return the component * @see #createHorizontalStrut * @see #createGlue diff --git a/src/share/classes/javax/swing/BoxLayout.java b/src/share/classes/javax/swing/BoxLayout.java index f51055306..09968fb0b 100644 --- a/src/share/classes/javax/swing/BoxLayout.java +++ b/src/share/classes/javax/swing/BoxLayout.java @@ -287,7 +287,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * in the specified target container. * * @param target the container that needs to be laid out - * @return the dimensions >= 0 && <= Integer.MAX_VALUE + * @return the dimensions >= 0 && <= Integer.MAX_VALUE * @exception AWTError if the target isn't the container specified to the * BoxLayout constructor * @see Container @@ -313,7 +313,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * contained in the specified target container. * * @param target the container that needs to be laid out - * @return the dimensions >= 0 && <= Integer.MAX_VALUE + * @return the dimensions >= 0 && <= Integer.MAX_VALUE * @exception AWTError if the target isn't the container specified to the * BoxLayout constructor * @see #preferredLayoutSize @@ -338,7 +338,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * to lay out the components it contains. * * @param target the container that needs to be laid out - * @return the dimensions >= 0 && <= Integer.MAX_VALUE + * @return the dimensions >= 0 && <= Integer.MAX_VALUE * @exception AWTError if the target isn't the container specified to the * BoxLayout constructor * @see #preferredLayoutSize @@ -365,7 +365,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * to place the children along the X axis will be returned. * * @param target the container - * @return the alignment >= 0.0f && <= 1.0f + * @return the alignment >= 0.0f && <= 1.0f * @exception AWTError if the target isn't the container specified to the * BoxLayout constructor */ @@ -382,7 +382,7 @@ public class BoxLayout implements LayoutManager2, Serializable { * to place the children along the Y axis will be returned. * * @param target the container - * @return the alignment >= 0.0f && <= 1.0f + * @return the alignment >= 0.0f && <= 1.0f * @exception AWTError if the target isn't the container specified to the * BoxLayout constructor */ diff --git a/src/share/classes/javax/swing/CellRendererPane.java b/src/share/classes/javax/swing/CellRendererPane.java index 6a9f17b05..3e43b80d9 100644 --- a/src/share/classes/javax/swing/CellRendererPane.java +++ b/src/share/classes/javax/swing/CellRendererPane.java @@ -96,7 +96,7 @@ public class CellRendererPane extends Container implements Accessible /** * If the specified component is already a child of this then we don't * bother doing anything - stacking order doesn't matter for cell - * renderer components (CellRendererPane doesn't paint anyway).< + * renderer components (CellRendererPane doesn't paint anyway). */ protected void addImpl(Component x, Object constraints, int index) { if (x.getParent() == this) { diff --git a/src/share/classes/javax/swing/DefaultListSelectionModel.java b/src/share/classes/javax/swing/DefaultListSelectionModel.java index 26f06c63a..388a5a59a 100644 --- a/src/share/classes/javax/swing/DefaultListSelectionModel.java +++ b/src/share/classes/javax/swing/DefaultListSelectionModel.java @@ -637,7 +637,7 @@ public class DefaultListSelectionModel implements ListSelectionModel, Cloneable, * Remove the indices in the interval index0,index1 (inclusive) from * the selection model. This is typically called to sync the selection * model width a corresponding change in the data model. Note - * that (as always) index0 need not be <= index1. + * that (as always) index0 need not be <= index1. */ public void removeIndexInterval(int index0, int index1) { diff --git a/src/share/classes/javax/swing/DesktopManager.java b/src/share/classes/javax/swing/DesktopManager.java index 2f141e493..e0a2a434a 100644 --- a/src/share/classes/javax/swing/DesktopManager.java +++ b/src/share/classes/javax/swing/DesktopManager.java @@ -26,13 +26,13 @@ package javax.swing; /** DesktopManager objects are owned by a JDesktopPane object. They are responsible - * for implementing L&F specific behaviors for the JDesktopPane. JInternalFrame + * for implementing L&F specific behaviors for the JDesktopPane. JInternalFrame * implementations should delegate specific behaviors to the DesktopManager. For * instance, if a JInternalFrame was asked to iconify, it should try: * <PRE> * getDesktopPane().getDesktopManager().iconifyFrame(frame); * </PRE> - * This delegation allows each L&F to provide custom behaviors for desktop-specific + * This delegation allows each L&F to provide custom behaviors for desktop-specific * actions. (For example, how and where the internal frame's icon would appear.) * <p>This class provides a policy for the various JInternalFrame methods, it is not * meant to be called directly rather the various JInternalFrame methods will call diff --git a/src/share/classes/javax/swing/GroupLayout.java b/src/share/classes/javax/swing/GroupLayout.java index 9b0d4df48..e3be1ddfd 100644 --- a/src/share/classes/javax/swing/GroupLayout.java +++ b/src/share/classes/javax/swing/GroupLayout.java @@ -80,7 +80,7 @@ import static javax.swing.SwingConstants.VERTICAL; * axis. The sequential group contains three components. A parallel group * was used along the vertical axis. * <p style="text-align:center"> - * <img src="doc-files/groupLayout.1.gif"> + * <img src="doc-files/groupLayout.1.gif" alt="Sequential group along the horizontal axis in three components"> * <p> * To reinforce that each axis is treated independently the diagram shows * the range of each group and element along each axis. The @@ -102,7 +102,7 @@ import static javax.swing.SwingConstants.VERTICAL; * the vertical axis. * <p> * <p style="text-align:center"> - * <img src="doc-files/groupLayout.2.gif"> + * <img src="doc-files/groupLayout.2.gif" alt="Sequential group along the vertical axis in three components"> * <p> * As {@code c1} is the largest of the three components, the parallel * group is sized to {@code c1}. As {@code c2} and {@code c3} are smaller @@ -116,7 +116,7 @@ import static javax.swing.SwingConstants.VERTICAL; * The following diagram shows a sequential group along both the horizontal * and vertical axis. * <p style="text-align:center"> - * <img src="doc-files/groupLayout.3.gif"> + * <img src="doc-files/groupLayout.3.gif" alt="Sequential group along both the horizontal and vertical axis in three components"> * <p> * {@code GroupLayout} provides the ability to insert gaps between * {@code Component}s. The size of the gap is determined by an @@ -173,7 +173,7 @@ import static javax.swing.SwingConstants.VERTICAL; * <p> * When run the following is produced. * <p style="text-align:center"> - * <img src="doc-files/groupLayout.example.png"> + * <img src="doc-files/groupLayout.example.png" alt="Produced horizontal/vertical form"> * <p> * This layout consists of the following. * <ul><li>The horizontal axis consists of a sequential group containing two diff --git a/src/share/classes/javax/swing/JComponent.java b/src/share/classes/javax/swing/JComponent.java index 598916da4..3f4d3f256 100644 --- a/src/share/classes/javax/swing/JComponent.java +++ b/src/share/classes/javax/swing/JComponent.java @@ -4906,12 +4906,12 @@ public abstract class JComponent extends Container implements Serializable, /** * Returns {@code true} if a paint triggered on a child component should cause * painting to originate from this Component, or one of its ancestors. - * <p/> + * <p> * Calling {@link #repaint} or {@link #paintImmediately(int, int, int, int)} * on a Swing component will result in calling * the {@link JComponent#paintImmediately(int, int, int, int)} method of * the first ancestor which {@code isPaintingOrigin()} returns {@code true}, if there are any. - * <p/> + * <p> * {@code JComponent} subclasses that need to be painted when any of their * children are repainted should override this method to return {@code true}. * diff --git a/src/share/classes/javax/swing/JEditorPane.java b/src/share/classes/javax/swing/JEditorPane.java index f4c589306..a104d1c08 100644 --- a/src/share/classes/javax/swing/JEditorPane.java +++ b/src/share/classes/javax/swing/JEditorPane.java @@ -103,7 +103,7 @@ import javax.accessibility.*; * fragment is a possible hyperlink listener implementation, that treats * HTML frame events specially, and simply displays any other activated * hyperlinks. - * <code><pre> + * <pre> class Hyperactive implements HyperlinkListener { @@ -125,7 +125,7 @@ import javax.accessibility.*; } } - * </pre></code> + * </pre> * <p> * For information on customizing how <b>text/html</b> is rendered please see * {@link #W3C_LENGTH_UNITS} and {@link #HONOR_DISPLAY_PROPERTIES} diff --git a/src/share/classes/javax/swing/JFileChooser.java b/src/share/classes/javax/swing/JFileChooser.java index 218f6ae73..012c67533 100644 --- a/src/share/classes/javax/swing/JFileChooser.java +++ b/src/share/classes/javax/swing/JFileChooser.java @@ -67,7 +67,7 @@ import java.lang.ref.WeakReference; * <pre> * JFileChooser chooser = new JFileChooser(); * FileNameExtensionFilter filter = new FileNameExtensionFilter( - * "JPG & GIF Images", "jpg", "gif"); + * "JPG & GIF Images", "jpg", "gif"); * chooser.setFileFilter(filter); * int returnVal = chooser.showOpenDialog(parent); * if(returnVal == JFileChooser.APPROVE_OPTION) { @@ -634,7 +634,7 @@ public class JFileChooser extends JComponent implements Accessible { /** * Pops up an "Open File" file chooser dialog. Note that the * text that appears in the approve button is determined by - * the L&F. + * the L&F. * * @param parent the parent component of the dialog, * can be <code>null</code>; @@ -659,7 +659,7 @@ public class JFileChooser extends JComponent implements Accessible { /** * Pops up a "Save File" file chooser dialog. Note that the * text that appears in the approve button is determined by - * the L&F. + * the L&F. * * @param parent the parent component of the dialog, * can be <code>null</code>; @@ -861,7 +861,7 @@ public class JFileChooser extends JComponent implements Accessible { * @beaninfo * preferred: true * bound: true - * description: Sets whether the approve & cancel buttons are shown. + * description: Sets whether the approve & cancel buttons are shown. * * @see #getControlButtonsAreShown * @see #CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY @@ -1841,7 +1841,7 @@ public class JFileChooser extends JComponent implements Accessible { } /** - * Returns a string that specifies the name of the L&F class + * Returns a string that specifies the name of the L&F class * that renders this component. * * @return the string "FileChooserUI" @@ -1849,16 +1849,16 @@ public class JFileChooser extends JComponent implements Accessible { * @see UIDefaults#getUI * @beaninfo * expert: true - * description: A string that specifies the name of the L&F class. + * description: A string that specifies the name of the L&F class. */ public String getUIClassID() { return uiClassID; } /** - * Gets the UI object which implements the L&F for this component. + * Gets the UI object which implements the L&F for this component. * - * @return the FileChooserUI object that implements the FileChooserUI L&F + * @return the FileChooserUI object that implements the FileChooserUI L&F */ public FileChooserUI getUI() { return (FileChooserUI) ui; diff --git a/src/share/classes/javax/swing/JLabel.java b/src/share/classes/javax/swing/JLabel.java index be900a469..c6e28d92e 100644 --- a/src/share/classes/javax/swing/JLabel.java +++ b/src/share/classes/javax/swing/JLabel.java @@ -237,7 +237,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible /** - * Returns the L&F object that renders this component. + * Returns the L&F object that renders this component. * * @return LabelUI object */ @@ -247,9 +247,9 @@ public class JLabel extends JComponent implements SwingConstants, Accessible /** - * Sets the L&F object that renders this component. + * Sets the L&F object that renders this component. * - * @param ui the LabelUI L&F object + * @param ui the LabelUI L&F object * @see UIDefaults#getUI * @beaninfo * bound: true @@ -277,7 +277,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible /** - * Returns a string that specifies the name of the l&f class + * Returns a string that specifies the name of the l&f class * that renders this component. * * @return String "LabelUI" @@ -545,8 +545,8 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * * @since 1.4 * @param index Index into the String to underline - * @exception IllegalArgumentException will be thrown if <code>index</code - * is >= length of the text, or < -1 + * @exception IllegalArgumentException will be thrown if <code>index</code> + * is >= length of the text, or < -1 * * @beaninfo * bound: true @@ -1251,7 +1251,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * * @param part the AccessibleText.CHARACTER, AccessibleText.WORD, * or AccessibleText.SENTENCE to retrieve - * @param index an index within the text >= 0 + * @param index an index within the text >= 0 * @return the letter, word, or sentence, * null for an invalid index or part * @since 1.3 @@ -1298,7 +1298,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * * @param part the AccessibleText.CHARACTER, AccessibleText.WORD, * or AccessibleText.SENTENCE to retrieve - * @param index an index within the text >= 0 + * @param index an index within the text >= 0 * @return the letter, word, or sentence, null for an invalid * index or part * @since 1.3 @@ -1362,7 +1362,7 @@ public class JLabel extends JComponent implements SwingConstants, Accessible * * @param part the AccessibleText.CHARACTER, AccessibleText.WORD, * or AccessibleText.SENTENCE to retrieve - * @param index an index within the text >= 0 + * @param index an index within the text >= 0 * @return the letter, word, or sentence, null for an invalid index * or part * @since 1.3 diff --git a/src/share/classes/javax/swing/JList.java b/src/share/classes/javax/swing/JList.java index 9b016251a..e62bc8013 100644 --- a/src/share/classes/javax/swing/JList.java +++ b/src/share/classes/javax/swing/JList.java @@ -146,7 +146,7 @@ import static sun.swing.SwingUtilities2.Section.*; * Responsibility for listening to selection changes in order to keep the list's * visual representation up to date lies with the list's {@code ListUI}. * <p> - * <a name="renderer"> + * <a name="renderer"></a> * Painting of cells in a {@code JList} is handled by a delegate called a * cell renderer, installed on the list as the {@code cellRenderer} property. * The renderer provides a {@code java.awt.Component} that is used @@ -202,7 +202,7 @@ import static sun.swing.SwingUtilities2.Section.*; * To avoid these calculations, you can set a {@code fixedCellWidth} and * {@code fixedCellHeight} on the list, or have these values calculated * automatically based on a single prototype value: - * <a name="prototype_example"> + * <a name="prototype_example"></a> * <pre> * {@code * JList<String> bigDataList = new JList<String>(bigData); @@ -1512,7 +1512,7 @@ public class JList<E> extends JComponent implements Scrollable, Accessible * tooltip text on the cell level, by using {@code setToolTipText} on your * cell renderer component. * <p> - * <bold>Note:</bold> For <code>JList</code> to properly display the + * <strong>Note:</strong> For <code>JList</code> to properly display the * tooltips of its renderers in this manner, <code>JList</code> must be a * registered component with the <code>ToolTipManager</code>. This registration * is done automatically in the constructor. However, if at a later point diff --git a/src/share/classes/javax/swing/JMenu.java b/src/share/classes/javax/swing/JMenu.java index 60aa661ff..7493ede1a 100644 --- a/src/share/classes/javax/swing/JMenu.java +++ b/src/share/classes/javax/swing/JMenu.java @@ -225,7 +225,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement /** - * Returns the name of the L&F class that renders this component. + * Returns the name of the L&F class that renders this component. * * @return the string "MenuUI" * @see JComponent#getUIClassID @@ -490,7 +490,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement /** * Returns the suggested delay, in milliseconds, before submenus * are popped up or down. - * Each look and feel (L&F) may determine its own policy for + * Each look and feel (L&F) may determine its own policy for * observing the <code>delay</code> property. * In most cases, the delay is not observed for top level menus * or while dragging. The default for <code>delay</code> is 0. @@ -506,7 +506,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement /** * Sets the suggested delay before the menu's <code>PopupMenu</code> - * is popped up or down. Each look and feel (L&F) may determine + * is popped up or down. Each look and feel (L&F) may determine * it's own policy for observing the delay property. In most cases, * the delay is not observed for top level menus or while dragging. * This method is a property of the look and feel code and is used @@ -676,7 +676,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * @param pos an integer specifying the position at which to add the * new menu item * @exception IllegalArgumentException when the value of - * <code>pos</code> < 0 + * <code>pos</code> < 0 */ public void insert(String s, int pos) { if (pos < 0) { @@ -695,7 +695,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * new <code>JMenuitem</code> * @return the new menu item * @exception IllegalArgumentException if the value of - * <code>pos</code> < 0 + * <code>pos</code> < 0 */ public JMenuItem insert(JMenuItem mi, int pos) { if (pos < 0) { @@ -714,7 +714,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * @param pos an integer specifying the position at which to add the * new menu item * @exception IllegalArgumentException if the value of - * <code>pos</code> < 0 + * <code>pos</code> < 0 */ public JMenuItem insert(Action a, int pos) { if (pos < 0) { @@ -735,7 +735,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * @param index an integer specifying the position at which to * insert the menu separator * @exception IllegalArgumentException if the value of - * <code>index</code> < 0 + * <code>index</code> < 0 */ public void insertSeparator(int index) { if (index < 0) { @@ -754,7 +754,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * * @param pos an integer specifying the position * @exception IllegalArgumentException if the value of - * <code>pos</code> < 0 + * <code>pos</code> < 0 * @return the menu item at the specified position; or <code>null</code> * if the item as the specified position is not a menu item */ @@ -811,7 +811,7 @@ public class JMenu extends JMenuItem implements Accessible,MenuElement * * @param pos the position of the item to be removed * @exception IllegalArgumentException if the value of - * <code>pos</code> < 0, or if <code>pos</code> + * <code>pos</code> < 0, or if <code>pos</code> * is greater than the number of menu items */ public void remove(int pos) { diff --git a/src/share/classes/javax/swing/JMenuBar.java b/src/share/classes/javax/swing/JMenuBar.java index 8e6683d6f..f00d42074 100644 --- a/src/share/classes/javax/swing/JMenuBar.java +++ b/src/share/classes/javax/swing/JMenuBar.java @@ -130,9 +130,9 @@ public class JMenuBar extends JComponent implements Accessible,MenuElement } /** - * Sets the L&F object that renders this component. + * Sets the L&F object that renders this component. * - * @param ui the new MenuBarUI L&F object + * @param ui the new MenuBarUI L&F object * @see UIDefaults#getUI * @beaninfo * bound: true @@ -155,7 +155,7 @@ public class JMenuBar extends JComponent implements Accessible,MenuElement /** - * Returns the name of the L&F class that renders this component. + * Returns the name of the L&F class that renders this component. * * @return the string "MenuBarUI" * @see JComponent#getUIClassID diff --git a/src/share/classes/javax/swing/JTextField.java b/src/share/classes/javax/swing/JTextField.java index 0e5e9aa49..d4bc1aa0f 100644 --- a/src/share/classes/javax/swing/JTextField.java +++ b/src/share/classes/javax/swing/JTextField.java @@ -367,7 +367,7 @@ public class JTextField extends JTextComponent implements SwingConstants { /** * Returns the number of columns in this <code>TextField</code>. * - * @return the number of columns >= 0 + * @return the number of columns >= 0 */ public int getColumns() { return columns; @@ -377,7 +377,7 @@ public class JTextField extends JTextComponent implements SwingConstants { * Sets the number of columns in this <code>TextField</code>, * and then invalidate the layout. * - * @param columns the number of columns >= 0 + * @param columns the number of columns >= 0 * @exception IllegalArgumentException if <code>columns</code> * is less than 0 * @beaninfo @@ -402,7 +402,7 @@ public class JTextField extends JTextComponent implements SwingConstants { * character <em>m</em> for the font used. This method can be * redefined to be some alternative amount * - * @return the column width >= 1 + * @return the column width >= 1 */ protected int getColumnWidth() { if (columnWidth == 0) { @@ -744,7 +744,7 @@ public class JTextField extends JTextComponent implements SwingConstants { /** * Gets the scroll offset, in pixels. * - * @return the offset >= 0 + * @return the offset >= 0 */ public int getScrollOffset() { return visibility.getValue(); @@ -753,7 +753,7 @@ public class JTextField extends JTextComponent implements SwingConstants { /** * Sets the scroll offset, in pixels. * - * @param scrollOffset the offset >= 0 + * @param scrollOffset the offset >= 0 */ public void setScrollOffset(int scrollOffset) { visibility.setValue(scrollOffset); diff --git a/src/share/classes/javax/swing/KeyboardManager.java b/src/share/classes/javax/swing/KeyboardManager.java index 3ce79226a..afbd93e73 100644 --- a/src/share/classes/javax/swing/KeyboardManager.java +++ b/src/share/classes/javax/swing/KeyboardManager.java @@ -208,7 +208,7 @@ class KeyboardManager { public boolean fireKeyboardAction(KeyEvent e, boolean pressed, Container topAncestor) { if (e.isConsumed()) { - System.out.println("Aquired pre-used event!"); + System.out.println("Acquired pre-used event!"); Thread.dumpStack(); } diff --git a/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java b/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java index cbdfc015a..45b3766c3 100644 --- a/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java +++ b/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java @@ -116,7 +116,7 @@ public class SortingFocusTraversalPolicy index = Collections.binarySearch(cycle, aComponent, comparator); } catch (ClassCastException e) { if (log.isLoggable(PlatformLogger.Level.FINE)) { - log.fine("### During the binary search for " + aComponent + " the exception occured: ", e); + log.fine("### During the binary search for " + aComponent + " the exception occurred: ", e); } return -1; } diff --git a/src/share/classes/javax/swing/text/AbstractDocument.java b/src/share/classes/javax/swing/text/AbstractDocument.java index 5ccd80d95..71e9d5d8c 100644 --- a/src/share/classes/javax/swing/text/AbstractDocument.java +++ b/src/share/classes/javax/swing/text/AbstractDocument.java @@ -1367,7 +1367,7 @@ public abstract class AbstractDocument implements Document, Serializable { currWriter = Thread.currentThread(); numWriters = 1; } catch (InterruptedException e) { - throw new Error("Interrupted attempt to aquire write lock"); + throw new Error("Interrupted attempt to acquire write lock"); } } @@ -1409,7 +1409,7 @@ public abstract class AbstractDocument implements Document, Serializable { } numReaders += 1; } catch (InterruptedException e) { - throw new Error("Interrupted attempt to aquire read lock"); + throw new Error("Interrupted attempt to acquire read lock"); } } diff --git a/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java b/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java index 5e776a0cd..178404260 100644 --- a/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java +++ b/src/share/classes/javax/swing/tree/DefaultMutableTreeNode.java @@ -26,6 +26,7 @@ package javax.swing.tree; // ISSUE: this class depends on nothing in AWT -- move to java.util? +import java.beans.Transient; import java.io.*; import java.util.*; @@ -215,6 +216,7 @@ public class DefaultMutableTreeNode implements Cloneable, * * @param newParent this node's new parent */ + @Transient public void setParent(MutableTreeNode newParent) { parent = newParent; } diff --git a/src/share/classes/sun/awt/AppContext.java b/src/share/classes/sun/awt/AppContext.java index 79574de84..fbd4b21d9 100644 --- a/src/share/classes/sun/awt/AppContext.java +++ b/src/share/classes/sun/awt/AppContext.java @@ -430,7 +430,7 @@ public final class AppContext { try { w.dispose(); } catch (Throwable t) { - log.finer("exception occured while disposing app context", t); + log.finer("exception occurred while disposing app context", t); } } AccessController.doPrivileged(new PrivilegedAction<Void>() { diff --git a/src/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java b/src/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java index 37837b24d..3a70921c1 100644 --- a/src/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java +++ b/src/share/classes/sun/management/snmp/jvminstr/JVM_MANAGEMENT_MIB_IMPL.java @@ -188,7 +188,7 @@ public class JVM_MANAGEMENT_MIB_IMPL extends JVM_MANAGEMENT_MIB { sendTrap(trap, list); }catch(Exception e) { log.error("handleNotification", - "Exception occured : " + e); + "Exception occurred : " + e); } } } @@ -243,7 +243,7 @@ public class JVM_MANAGEMENT_MIB_IMPL extends JVM_MANAGEMENT_MIB { adaptor.snmpV2Trap(peer, trap, list, null); }catch(Exception e) { log.error("sendTrap", - "Exception occured while sending trap to [" + + "Exception occurred while sending trap to [" + target + "]. Exception : " + e); log.debug("sendTrap",e); } diff --git a/src/share/classes/sun/misc/ExtensionDependency.java b/src/share/classes/sun/misc/ExtensionDependency.java index 86f4308c9..f09b3ac11 100644 --- a/src/share/classes/sun/misc/ExtensionDependency.java +++ b/src/share/classes/sun/misc/ExtensionDependency.java @@ -265,7 +265,7 @@ public class ExtensionDependency { * the jar file. * </p> * - * @param extensionName key in the attibute list + * @param extensionName key in the attribute list * @param attr manifest file attributes * @param file installed extension jar file to compare the requested * extension against. diff --git a/src/share/classes/sun/rmi/rmic/RMIGenerator.java b/src/share/classes/sun/rmi/rmic/RMIGenerator.java index a9649c7fc..6b997e426 100644 --- a/src/share/classes/sun/rmi/rmic/RMIGenerator.java +++ b/src/share/classes/sun/rmi/rmic/RMIGenerator.java @@ -1132,7 +1132,7 @@ public class RMIGenerator implements RMIConstants, Generator { throws IOException { if (types.length != names.length) { - throw new Error("paramter type and name arrays different sizes"); + throw new Error("parameter type and name arrays different sizes"); } for (int i = 0; i < types.length; i++) { @@ -1213,7 +1213,7 @@ public class RMIGenerator implements RMIConstants, Generator { throws IOException { if (types.length != names.length) { - throw new Error("paramter type and name arrays different sizes"); + throw new Error("parameter type and name arrays different sizes"); } boolean readObject = false; diff --git a/src/share/classes/sun/security/jgss/krb5/InitialToken.java b/src/share/classes/sun/security/jgss/krb5/InitialToken.java index c15ddd235..7b34ff839 100644 --- a/src/share/classes/sun/security/jgss/krb5/InitialToken.java +++ b/src/share/classes/sun/security/jgss/krb5/InitialToken.java @@ -192,7 +192,7 @@ abstract class InitialToken extends Krb5Token { if (krbCredMessage.length > 0x0000ffff) throw new GSSException(GSSException.FAILURE, -1, - "Incorrect messsage length"); + "Incorrect message length"); writeLittleEndian(krbCredMessage.length, temp); checksumBytes[pos++] = temp[0]; diff --git a/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java b/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java index 0312a1fbf..1acc3a9a0 100644 --- a/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java +++ b/src/share/classes/sun/security/jgss/spnego/SpNegoContext.java @@ -360,7 +360,7 @@ public class SpNegoContext implements GSSContextSpi { if (internal_mech == null) { // return wth failure throw new GSSException(errorCode, -1, - "supported mechansim from server is null"); + "supported mechanism from server is null"); } // get the negotiated result @@ -911,7 +911,7 @@ public class SpNegoContext implements GSSContextSpi { return mechContext.isEstablished(); } else { if (DEBUG) { - System.out.println("The underlying mechansim context has " + + System.out.println("The underlying mechanism context has " + "not been initialized"); } return false; @@ -1024,7 +1024,7 @@ public class SpNegoContext implements GSSContextSpi { return peerName; } else { if (DEBUG) { - System.out.println("The underlying mechansim context has " + + System.out.println("The underlying mechanism context has " + "not been initialized"); } return null; @@ -1040,7 +1040,7 @@ public class SpNegoContext implements GSSContextSpi { return myName; } else { if (DEBUG) { - System.out.println("The underlying mechansim context has " + + System.out.println("The underlying mechanism context has " + "not been initialized"); } return null; diff --git a/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java b/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java index e492e09e0..24c5533f9 100644 --- a/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java +++ b/src/share/demo/jfc/FileChooserDemo/FileChooserDemo.java @@ -450,9 +450,9 @@ public class FileChooserDemo extends JPanel implements ActionListener { "User cancelled operation. No file was chosen."); } else if (retval == ERROR_OPTION) { JOptionPane.showMessageDialog(frame, - "An error occured. No file was chosen."); + "An error occurred. No file was chosen."); } else { - JOptionPane.showMessageDialog(frame, "Unknown operation occured."); + JOptionPane.showMessageDialog(frame, "Unknown operation occurred."); } } diff --git a/src/share/native/sun/java2d/cmm/lcms/cmsio0.c b/src/share/native/sun/java2d/cmm/lcms/cmsio0.c index 82b9a6e6d..801041454 100644 --- a/src/share/native/sun/java2d/cmm/lcms/cmsio0.c +++ b/src/share/native/sun/java2d/cmm/lcms/cmsio0.c @@ -1077,7 +1077,13 @@ cmsHPROFILE CMSEXPORT cmsOpenProfileFromMem(const void* MemPtr, cmsUInt32Number static cmsBool SanityCheck(_cmsICCPROFILE* profile) { - cmsIOHANDLER* io = profile->IOhandler; + cmsIOHANDLER* io; + + if (!profile) { + return FALSE; + } + + io = profile->IOhandler; if (!io) { return FALSE; } @@ -1108,8 +1114,6 @@ cmsBool SaveTags(_cmsICCPROFILE* Icc, _cmsICCPROFILE* FileOrig) cmsTagTypeSignature TypeBase; cmsTagTypeHandler* TypeHandler; - if (!SanityCheck(FileOrig)) return FALSE; - for (i=0; i < Icc -> TagCount; i++) { @@ -1126,7 +1130,7 @@ cmsBool SaveTags(_cmsICCPROFILE* Icc, _cmsICCPROFILE* FileOrig) // Reach here if we are copying a tag from a disk-based ICC profile which has not been modified by user. // In this case a blind copy of the block data is performed - if (FileOrig != NULL && Icc -> TagOffsets[i]) { + if (SanityCheck(FileOrig) && Icc -> TagOffsets[i]) { cmsUInt32Number TagSize = FileOrig -> TagSizes[i]; cmsUInt32Number TagOffset = FileOrig -> TagOffsets[i]; diff --git a/src/share/native/sun/security/pkcs11/wrapper/p11_util.c b/src/share/native/sun/security/pkcs11/wrapper/p11_util.c index 8889f740d..79d525039 100644 --- a/src/share/native/sun/security/pkcs11/wrapper/p11_util.c +++ b/src/share/native/sun/security/pkcs11/wrapper/p11_util.c @@ -598,16 +598,16 @@ void jAttributeArrayToCKAttributeArray(JNIEnv *env, jobjectArray jArray, CK_ATTR throwOutOfMemoryError(env, 0); return; } - TRACE1(", converting %d attibutes", jLength); + TRACE1(", converting %d attributes", jLength); for (i=0; i<(*ckpLength); i++) { - TRACE1(", getting %d. attibute", i); + TRACE1(", getting %d. attribute", i); jAttribute = (*env)->GetObjectArrayElement(env, jArray, i); if ((*env)->ExceptionCheck(env)) { freeCKAttributeArray(*ckpArray, i); return; } TRACE1(", jAttribute = %d", jAttribute); - TRACE1(", converting %d. attibute", i); + TRACE1(", converting %d. attribute", i); (*ckpArray)[i] = jAttributeToCKAttribute(env, jAttribute); if ((*env)->ExceptionCheck(env)) { freeCKAttributeArray(*ckpArray, i); diff --git a/src/share/sample/nio/chatserver/ClientReader.java b/src/share/sample/nio/chatserver/ClientReader.java index de7f639e8..822125a94 100644 --- a/src/share/sample/nio/chatserver/ClientReader.java +++ b/src/share/sample/nio/chatserver/ClientReader.java @@ -58,7 +58,7 @@ class ClientReader { } /** - * Runs a cycle of doing a beforeRead action and then inquiring a new + * Runs a cycle of doing a beforeRead action and then enqueuing a new * read on the client. Handles closed channels and errors while reading. * If the client is still connected a new round of actions are called. */ diff --git a/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java b/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java index e61273dc4..912a951f3 100644 --- a/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java +++ b/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java @@ -1173,7 +1173,7 @@ abstract class XDecoratedPeer extends XWindowPeer { } if (target == activeWindow && target != focusedWindow) { // Happens when an owned window is currently focused - focusLog.fine("Focus is on child window - transfering it back to the owner"); + focusLog.fine("Focus is on child window - transferring it back to the owner"); handleWindowFocusInSync(-1); return true; } diff --git a/src/solaris/native/java/lang/java_props_macosx.c b/src/solaris/native/java/lang/java_props_macosx.c index 1f0248ee5..cd427c465 100644 --- a/src/solaris/native/java/lang/java_props_macosx.c +++ b/src/solaris/native/java/lang/java_props_macosx.c @@ -106,6 +106,12 @@ char *setupMacOSXLocale(int cat) { } int isInAquaSession() { + // environment variable to bypass the aqua session check + char *ev = getenv("AWT_FORCE_HEADFUL"); + if (ev && (strncasecmp(ev, "true", 4) == 0)) { + // if "true" then tell the caller we're in an Aqua session without actually checking + return 1; + } // Is the WindowServer available? SecuritySessionId session_id; SessionAttributeBits session_info; diff --git a/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java b/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java index 725e66f8b..d84712ba9 100644 --- a/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java +++ b/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java @@ -266,7 +266,7 @@ final class WindowsSelectorImpl extends SelectorImpl { private void checkForException() throws IOException { if (exception == null) return; - StringBuffer message = new StringBuffer("An exception occured" + + StringBuffer message = new StringBuffer("An exception occurred" + " during the execution of select(): \n"); message.append(exception); message.append('\n'); diff --git a/src/windows/classes/sun/security/krb5/internal/tools/Klist.java b/src/windows/classes/sun/security/krb5/internal/tools/Klist.java index ce0e3e7fb..566b0bee1 100644 --- a/src/windows/classes/sun/security/krb5/internal/tools/Klist.java +++ b/src/windows/classes/sun/security/krb5/internal/tools/Klist.java @@ -336,7 +336,7 @@ public class Klist { System.out.println(" name\t name of credentials cache or " + " keytab with the prefix. File-based cache or " + "keytab's prefix is FILE:."); - System.out.println(" -c specifes that credential cache is to be " + + System.out.println(" -c specifies that credential cache is to be " + "listed"); System.out.println(" -k specifies that key tab is to be listed"); System.out.println(" options for credentials caches:"); diff --git a/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java b/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java index eeeb848e6..bf0901613 100644 --- a/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java +++ b/src/windows/classes/sun/security/krb5/internal/tools/Ktab.java @@ -381,12 +381,12 @@ public class Ktab { } } } catch (KrbException e) { - System.err.println("Error occured while deleting the entry. "+ + System.err.println("Error occurred while deleting the entry. "+ "Deletion failed."); e.printStackTrace(); System.exit(-1); } catch (IOException e) { - System.err.println("Error occured while deleting the entry. "+ + System.err.println("Error occurred while deleting the entry. "+ " Deletion failed."); e.printStackTrace(); System.exit(-1); |