You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by nd...@apache.org on 2006/07/26 05:19:18 UTC
svn commit: r425591 -
/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/
Author: ndbeyer
Date: Tue Jul 25 20:19:17 2006
New Revision: 425591
URL: http://svn.apache.org/viewvc?rev=425591&view=rev
Log:
Fix various spelling errors.
Modified:
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/ErrorManager.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/FileHandler.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Filter.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Level.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LoggingPermission.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SimpleFormatter.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SocketHandler.java
incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/StreamHandler.java
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/ErrorManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/ErrorManager.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/ErrorManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/ErrorManager.java Tue Jul 25 20:19:17 2006
@@ -21,7 +21,7 @@
* <code>ErrorManager</code> instance attached to them when they encounter any
* exceptions or errors.
* <p>
- * Callers of a logger are unlikely to be interested in the exceptions occured
+ * Callers of a logger are unlikely to be interested in the exceptions occurred
* during logging. Use an <code>ErrorManager</code> object to report these
* exceptions.
* </p>
@@ -42,7 +42,7 @@
public static final int GENERIC_FAILURE = 0;
/**
- * The error code indicating a failure when writting to an output stream.
+ * The error code indicating a failure when writing to an output stream.
*/
public static final int WRITE_FAILURE = 1;
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/FileHandler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/FileHandler.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/FileHandler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/FileHandler.java Tue Jul 25 20:19:17 2006
@@ -45,7 +45,7 @@
* </p>
* <p>
* <code>MemoryHandler</code> will read following <code>LogManager</code>
- * properties for initialization, if given propeties are not defined or has
+ * properties for initialization, if given properties are not defined or has
* invalid values, default value will be used.
* <ul>
* <li>java.util.logging.FileHandler.level specifies the level for this
@@ -83,17 +83,17 @@
* </p>
* Normally, the generation numbers are not larger than given file count and
* follow the sequence 0, 1, 2.... If the file count is larger than one, but the
- * generation field("%g") has not been specifed in the pattern, then the
+ * generation field("%g") has not been specified in the pattern, then the
* generation number after a dot will be added to the end of the file name,
* </p>
* <p>
* The "%u" unique field is used to avoid conflicts and set to 0 at first. If
* one <code>FileHandler</code> tries to open the filename which is currently
- * in use by another process, it will repeatly increment the unique number field
+ * in use by another process, it will repeatedly increment the unique number field
* and try again. If the "%u" component has not been included in the file name
* pattern and some contention on a file does occur then a unique numerical
* value will be added to the end of the filename in question immediately to the
- * right of a dot. The unique ids to avoid conflicts is only guaranteed to work
+ * right of a dot. The unique IDs for avoiding conflicts is only guaranteed to work
* reliably when using a local disk file system.
* </p>
*
@@ -210,9 +210,11 @@
//invalid path name, throw exception
throw e;
}
- //if lock is unsupported and IOException throwed, just let the
- //IOException throws out and exit
- //otherwise it will go into an undead cycle
+ /*
+ * if lock is unsupported and IOException thrown, just let the
+ * IOException throws out and exit otherwise it will go into an
+ * undead cycle
+ */
lock = channel.tryLock();
if (null == lock) {
continue;
@@ -314,7 +316,7 @@
break;
case 't':
/*
- * we should probably try to do somethig cute here like
+ * we should probably try to do something cute here like
* lookahead for adjacent '/'
*/
sb.append(value, cur, next - cur - 1).append(tempPath);
@@ -459,7 +461,7 @@
* @param pattern
* the name pattern of output file
* @param limit
- * the data amount limit in bytes of one ouput file, cannot less
+ * the data amount limit in bytes of one output file, cannot less
* than one
* @param count
* the maximum number of files can be used, cannot less than one
@@ -480,7 +482,7 @@
}
if (limit < 0 || count < 1) {
throw new IllegalArgumentException(
- "The limit and count property must larger than 0 and 1, respctively"); //$NON-NLS-1$
+ "The limit and count property must larger than 0 and 1, respectively"); //$NON-NLS-1$
}
init(pattern, null, new Integer(limit), new Integer(count));
}
@@ -499,7 +501,7 @@
* @param pattern
* the name pattern of output file
* @param limit
- * the data amount limit in bytes of one ouput file, cannot less
+ * the data amount limit in bytes of one output file, cannot less
* than one
* @param count
* the maximum number of files can be used, cannot less than one
@@ -576,7 +578,7 @@
}
}
- /*
+ /**
* This output stream use decorator pattern to add measure feature to OutputStream
* which can detect the total size(in bytes) of output, the initial size can be set
*/
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Filter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Filter.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Filter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Filter.java Tue Jul 25 20:19:17 2006
@@ -17,7 +17,7 @@
package java.util.logging;
/**
- * <code>Filter</code> objects are used to filter loggings that are not
+ * <code>Filter</code> objects are used to filter log records that are not
* desired. <code>Handler</code> or <code>Logger</code> objects can be
* attached with a filter to get finer grain control over what should be logged.
*
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Level.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Level.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Level.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Level.java Tue Jul 25 20:19:17 2006
@@ -37,7 +37,7 @@
public class Level implements Serializable {
- //for serialization compability
+ //for serialization compatibility
private static final long serialVersionUID = -8176160795706313070L;
/*
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogManager.java Tue Jul 25 20:19:17 2006
@@ -187,7 +187,7 @@
} catch (Exception e) {
e.printStackTrace();
}
- // if global logger has been inited, set root as its parent
+ // if global logger has been initialized, set root as its parent
if (null != Logger.global) {
Logger.global.setParent(manager.root);
}
@@ -328,7 +328,7 @@
name + '.'))) {
child.setParent(logger);
if (null != oldParent) {
- //-- remove from old parent childs as the parent has been changed
+ //-- remove from old parent as the parent has been changed
oldParent.removeChild(child);
}
}
@@ -376,7 +376,7 @@
}
/**
- * Reinitialize the properties and configuration. The initialization process
+ * Re-initialize the properties and configuration. The initialization process
* is same as the <code>LogManager</code> instantiation.
* <p>
* A <code>PropertyChangeEvent</code> must be fired.
@@ -527,7 +527,7 @@
}
/**
- * Reinitialize the properties and configuration from the given
+ * Re-initialize the properties and configuration from the given
* <code>InputStream</code>
* <p>
* A <code>PropertyChangeEvent</code> must be fired.
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LogRecord.java Tue Jul 25 20:19:17 2006
@@ -30,7 +30,7 @@
* been passed into the logging framework.
* <p>
* The <code>LogRecord</code> class will infer the source method name and
- * source class name the first time they are accessed if the client applicaiton
+ * source class name the first time they are accessed if the client application
* didn't specify them explicitly. This automatic inference is based on the
* analysis of the call stack and is not guaranteed to be precise. Client
* applications should force the initialization of these two fields by calling
@@ -120,7 +120,7 @@
private int threadID;
/**
- * The time that the event occured, in milliseconds since 1970.
+ * The time that the event occurred, in milliseconds since 1970.
*
* @serial
*/
@@ -153,7 +153,7 @@
// The parameters.
private transient Object[] parameters;
- // If the source method and source class has been inited
+ // If the source method and source class has been initialized
private transient boolean sourceInited = false;
/*
@@ -269,19 +269,19 @@
}
/**
- * Gets the time that the event occured, in milliseconds since 1970.
+ * Gets the time that the event occurred, in milliseconds since 1970.
*
- * @return the time that the event occured, in milliseconds since 1970
+ * @return the time that the event occurred, in milliseconds since 1970
*/
public long getMillis() {
return millis;
}
/**
- * Sets the time that the event occured, in milliseconds since 1970.
+ * Sets the time that the event occurred, in milliseconds since 1970.
*
* @param millis
- * the time that the event occured, in milliseconds since 1970
+ * the time that the event occurred, in milliseconds since 1970
*/
public void setMillis(long millis) {
this.millis = millis;
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/Logger.java Tue Jul 25 20:19:17 2006
@@ -324,7 +324,7 @@
/*
* Check whether the same resource bundle has been specified.
- * Synchronize to ensure the consistency between resouece bundle
+ * Synchronize to ensure the consistency between resource bundle
* and its name.
*/
private static void updateResourceBundle(Logger l, String resourceBundleName) {
@@ -361,7 +361,7 @@
String resourceBundleName, boolean hasResourceName) {
LogManager man = LogManager.getLogManager();
synchronized (man) {
- // Try to find an existing logger with the specifed name
+ // Try to find an existing logger with the specified name
Logger l = man.getLogger(name);
// If no existing logger with the same name, create a new one
if (null == l) {
@@ -417,7 +417,7 @@
if (null == handler) {
throw new NullPointerException("null"); //$NON-NLS-1$
}
- // anonymouse loggers can always add handlers
+ // Anonymous loggers can always add handlers
if (this.isNamed) {
LogManager.getLogManager().checkAccess();
}
@@ -425,9 +425,9 @@
}
/**
- * Gets all the hanlders associated with this logger.
+ * Gets all the handlers associated with this logger.
*
- * @return an array of all the hanlders associated with this logger
+ * @return an array of all the handlers associated with this logger
*/
public synchronized Handler[] getHandlers() {
return handlers.toArray(new Handler[handlers.size()]);
@@ -444,7 +444,7 @@
* have the required permission.
*/
public synchronized void removeHandler(Handler handler) {
- // anonymouse loggers can always remove handlers
+ // Anonymous loggers can always remove handlers
if (this.isNamed) {
LogManager.getLogManager().checkAccess();
}
@@ -473,7 +473,7 @@
* have the required permission.
*/
public synchronized void setFilter(Filter newFilter) {
- // anonymouse loggers can always set the filter
+ // Anonymous loggers can always set the filter
if (this.isNamed) {
LogManager.getLogManager().checkAccess();
}
@@ -490,7 +490,7 @@
}
/**
- * Sets the loggine level for this logger. A <code>null</code> level
+ * Sets the logging level for this logger. A <code>null</code> level
* indicates this logger will inherit its parent's level.
*
* @param newLevel
@@ -500,7 +500,7 @@
* have the required permission.
*/
public void setLevel(Level newLevel) {
- // anonymouse loggers can always set the level
+ // Anonymous loggers can always set the level
if (this.isNamed) {
LogManager.getLogManager().checkAccess();
}
@@ -533,7 +533,7 @@
* have the required permission.
*/
public synchronized void setUseParentHandlers(boolean notifyParentHandlers) {
- // anonymouse loggers can always set the useParentHandlers flag
+ // Anonymous loggers can always set the useParentHandlers flag
if (this.isNamed) {
LogManager.getLogManager().checkAccess();
}
@@ -625,10 +625,10 @@
return this.resBundleName;
}
- /*
- * This method is for compability. Tests written to the reference
+ /**
+ * This method is for compatibility. Tests written to the reference
* implementation API imply that the isLoggable() method is not called
- * directly. This behaviour is important because subclass may override
+ * directly. This behavior is important because subclass may override
* isLoggable() method, so that affect the result of log methods.
*/
private boolean internalIsLoggable(Level l) {
@@ -659,7 +659,7 @@
* Sets the resource bundle and its name for a supplied LogRecord object.
* This method first tries to use this logger's resource bundle if any,
* otherwise try to inherit from this logger's parent, recursively up the
- * namespace. Synchronize to ensure the consistency between resouece bundle
+ * namespace. Synchronize to ensure the consistency between resource bundle
* and its name.
*/
private synchronized void setResourceBundle(LogRecord record) {
@@ -670,7 +670,7 @@
Logger anyParent = this.parent;
while (null != anyParent) {
/*
- * Synchronize to ensure the consistency between resouece bundle
+ * Synchronize to ensure the consistency between resource bundle
* and its name.
*/
synchronized (anyParent) {
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LoggingPermission.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LoggingPermission.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LoggingPermission.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/LoggingPermission.java Tue Jul 25 20:19:17 2006
@@ -28,7 +28,7 @@
public final class LoggingPermission extends BasicPermission implements Guard,
Serializable {
- //for serialization compability with J2SE 1.4.2
+ //for serialization compatibility with J2SE 1.4.2
private static final long serialVersionUID =63564341580231582L;
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SimpleFormatter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SimpleFormatter.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SimpleFormatter.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SimpleFormatter.java Tue Jul 25 20:19:17 2006
@@ -57,7 +57,7 @@
sb.append(r.getSourceMethodName()).append(": "); //$NON-NLS-1$
sb.append(formatMessage(r)).append(LogManager.getSystemLineSeparator());
if (null != r.getThrown()) {
- sb.append("Throwable occured: "); //$NON-NLS-1$
+ sb.append("Throwable occurred: "); //$NON-NLS-1$
Throwable t = r.getThrown();
PrintWriter pw = null;
try {
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SocketHandler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SocketHandler.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SocketHandler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/SocketHandler.java Tue Jul 25 20:19:17 2006
@@ -21,7 +21,7 @@
import java.io.IOException;
/**
- * A handler that writes log messages to a sockect connection.
+ * A handler that writes log messages to a socket connection.
* <p>
* This handler reads the following properties from the log manager to
* initialize itself:
Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/StreamHandler.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/StreamHandler.java?rev=425591&r1=425590&r2=425591&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/StreamHandler.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/main/java/java/util/logging/StreamHandler.java Tue Jul 25 20:19:17 2006
@@ -133,7 +133,7 @@
* -------------------------------------------------------------------
*/
- // initialize the writter
+ // initialize the writer
private void initializeWritter() {
this.writerNotInitialized = false;
if (null == getEncoding()) {
@@ -157,7 +157,7 @@
this.writer.write(s);
} catch (Exception e) {
getErrorManager().error(
- "Exception occured when writing to the output stream.", e, //$NON-NLS-1$
+ "Exception occurred when writing to the output stream.", e, //$NON-NLS-1$
ErrorManager.WRITE_FAILURE);
}
}
@@ -251,7 +251,7 @@
}
} catch (Exception e) {
getErrorManager().error(
- "Exception occured when closing the output stream.", e, //$NON-NLS-1$
+ "Exception occurred when closing the output stream.", e, //$NON-NLS-1$
ErrorManager.CLOSE_FAILURE);
}
}
@@ -285,7 +285,7 @@
}
} catch (Exception e) {
getErrorManager().error(
- "Exception occured when flushing the output stream.", //$NON-NLS-1$
+ "Exception occurred while flushing the output stream.", //$NON-NLS-1$
e, ErrorManager.FLUSH_FAILURE);
}
}
@@ -320,14 +320,14 @@
} catch (Exception e) {
getErrorManager()
.error(
- "Exception occured when formatting the log record.", //$NON-NLS-1$
+ "Exception occurred while formatting the log record.", //$NON-NLS-1$
e, ErrorManager.FORMAT_FAILURE);
}
write(msg);
}
} catch (Exception e) {
getErrorManager().error(
- "Exception occured when logging the record.", e, //$NON-NLS-1$
+ "Exception occurred while logging the record.", e, //$NON-NLS-1$
ErrorManager.GENERIC_FAILURE);
}
}