Skip to content

Commit

Permalink
fix typos in documentations
Browse files Browse the repository at this point in the history
Fix typos in javadoc, comments and README.

Signed-off-by: Marc Wrobel <marc.wrobel@gmail.com>
  • Loading branch information
marcwrobel committed Aug 25, 2022
1 parent 05c0b0a commit 24788ac
Show file tree
Hide file tree
Showing 30 changed files with 49 additions and 52 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ for your work if appropriate. It usually is.
4. All commits must have signed off by the contributor attesting to
[Developer Certificate of Origin
(DCO)](https://developercertificate.org/). Commits without sign off
will be automatically rejected by the [DCO github
will be automatically rejected by the [DCO GitHub
check](https://probot.github.io/apps/dco/) application.

5. Push your changes to your fork/branch in github. Don't push it to
5. Push your changes to your fork/branch in GitHub. Don't push it to
your master! If you do it will make it harder to submit new changes
later.

6. Submit a pull request to SLF4J from your commit page on github.
6. Submit a pull request to SLF4J from your commit page on GitHub.

7. Did we mention that you will be asked to link your pull request
with a Jira ticket?
4 changes: 2 additions & 2 deletions integration/osgi-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@


<!-- for some reason if mvn is invoked from the parent directory, junit gets
invoked from the parent dir, which messes up theses tests. Hence, the
invoked from the parent dir, which messes up these tests. Hence, the
fork="yes" dir="${basedir}" -->

<!--
Expand Down Expand Up @@ -107,4 +107,4 @@
</junit>
</target>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,10 @@ public Log getInstance(String name) throws LogConfigurationException {
public void release() {
// This method is never called by jcl-over-slf4j classes. However,
// in certain deployment scenarios, in particular if jcl-over-slf4j.jar
// is
// in the the web-app class loader and the official commons-logging.jar is
// deployed in some parent class loader (e.g. commons/lib), then it is
// possible
// for the parent class loader to mask the classes shipping in
// jcl-over-slf4j.jar.
// is in the web-app class loader and the official commons-logging.jar
// is deployed in some parent class loader (e.g. commons/lib), then it
// is possible for the parent class loader to mask the classes shipping
// in jcl-over-slf4j.jar.
System.out.println("WARN: The method " + SLF4JLogFactory.class + "#release() was invoked.");
System.out.println("WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.");
System.out.flush();
Expand Down Expand Up @@ -216,4 +214,4 @@ public void setAttribute(String name, Object value) {
}

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3>Overview</h3>
<p>As the original JCL version 1.0.4, the present version supports
various logging APIs. It differs from the original in implementation
but not the public API. This implementation uses SLF4J under the
covers. As as such, all the logging systems that SLF4J supports,
covers. As such, all the logging systems that SLF4J supports,
e.g. NOP, Simple, JDK14, nlog4j are supported by this version of JCL.
</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@
* SLF4J translation can seriously increase the cost of disabled logging
* statements (60 fold or 6000% increase) and measurably impact the performance of enabled log
* statements (20% overall increase).</b> Please note that as of logback-version 0.9.25,
* it is possible to completely eliminate the 60 fold translation overhead for disabled
* it is possible to completely eliminate the 60-fold translation overhead for disabled
* log statements with the help of <a href="http://logback.qos.ch/manual/configuration.html#LevelChangePropagator">LevelChangePropagator</a>.
*
*
* <p>If you are concerned about application performance, then use of <code>SLF4JBridgeHandler</code>
* is appropriate only if any one the following two conditions is true:
* is appropriate only if any of the following conditions is true:
* <ol>
* <li>few j.u.l. logging statements are in play</li>
* <li>LevelChangePropagator has been installed</li>
Expand All @@ -93,7 +93,7 @@
* <h2>As a Java 9/Jigsaw module</h2>
*
* <p>Given that <b>to</b> is a reserved keyword under Java 9 within module productions,
* the MAFIFEST.MF file in <em>jul-to-slf4j.jar</em> declares <b>jul_to_slf4j</b> as
* the MANIFEST.MF file in <em>jul-to-slf4j.jar</em> declares <b>jul_to_slf4j</b> as
* its Automatic Module Name. Thus, if your application is Jigsaw modularized, the requires
* statement in your <em>module-info.java</em> needs to be <b>jul_to_slf4j</b>
* (note the two underscores).
Expand Down
2 changes: 1 addition & 1 deletion log4j-over-slf4j/compatibility/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<!-- ================================================================= -->
<target name="usage">
<echo>
These are some of the targets supported by this ANT build scpript:
These are some of the targets supported by this ANT build script:

all - run all available tests
refresh - copy required jar files to the lib directory
Expand Down
2 changes: 1 addition & 1 deletion log4j-over-slf4j/compatibility/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ that uses either log4j 1.2.x, or log4j 1.3.x.

In the same directory is a build.xml file that uses ant to
compile the test cases with the corresponding log4j version,
and to runs these tests without log4j in the classpath but with
and to run these tests without log4j in the classpath but with
logback jars instead.

To run the tests, one must have ant installed. Issuing the following command,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public interface Appender {
* Configurators call this method to determine if the appender
* requires a layout. If this method returns <code>true</code>,
* meaning that layout is required, then the configurator will
* configure an layout using the configuration information at its
* configure a layout using the configuration information at its
* disposal. If this method returns <code>false</code>, meaning that
* a layout is not required, then layout configuration will be
* skipped even if there is available layout configuration
Expand Down
4 changes: 2 additions & 2 deletions log4j-over-slf4j/src/main/java/org/apache/log4j/Priority.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public static Priority toPriority(int val) {
*
* @param val an integer value
* @param defaultPriority a default priority value
* @return correspoding Priority value
* @return corresponding Priority value
*/
@Deprecated
public static Priority toPriority(int val, Priority defaultPriority) {
Expand All @@ -204,4 +204,4 @@ public static Priority toPriority(int val, Priority defaultPriority) {
public static Priority toPriority(String sArg, Priority defaultPriority) {
return Level.toLevel(sArg, (Level) defaultPriority);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.log4j.spi.LoggerRepository;

/**
* An nop implementation of PropertyConfigurator.
* A no-op implementation of PropertyConfigurator.
*/
public class PropertyConfigurator implements Configurator {
public static void configure(Properties properties) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<b>log4j.configDebug</b> variable.
<p>All log4j internal debug calls go to <code>System.out</code>
where as internal error messages are sent to
whereas internal error messages are sent to
<code>System.err</code>. All internal messages are prepended with
the string "log4j: ".
Expand All @@ -40,7 +40,7 @@ public class LogLog {
<p> The value of this string is <b>log4j.debug</b>.
<p>Note that the search for all option names is case sensitive. */
<p>Note that the search for all option names is case-sensitive. */
public static final String DEBUG_KEY = "log4j.debug";

/**
Expand All @@ -49,7 +49,7 @@ public class LogLog {
<p> The value of this string is <b>log4j.configDebug</b>.
<p>Note that the search for all option names is case sensitive.
<p>Note that the search for all option names is case-sensitive.
@deprecated Use {@link #DEBUG_KEY} instead.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
Implement this interface to create new instances of Logger or
a sub-class of Logger.
a subclass of Logger.
<p>See <code>examples/subclass/MyLogger.java</code> for an example.
Expand Down
5 changes: 3 additions & 2 deletions slf4j-api/src/main/java/org/slf4j/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
public interface Logger {

/**
* Case insensitive String constant used to retrieve the name of the root logger.
* Case-insensitive String constant used to retrieve the name of the root logger.
*
* @since 1.3
*/
Expand Down Expand Up @@ -510,7 +510,8 @@ default public LoggingEventBuilder atDebug() {
* data is also taken into consideration.
*
* @param marker The marker data to take into consideration
* @return true if this logger is warn enabled, false otherwise
* @return true if this Logger is enabled for the INFO level,
* false otherwise.
*/
public boolean isInfoEnabled(Marker marker);

Expand Down
2 changes: 1 addition & 1 deletion slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public static Logger getLogger(String name) {
* using the statically bound {@link ILoggerFactory} instance.
*
* <p>
* In case the the <code>clazz</code> parameter differs from the name of the
* In case the <code>clazz</code> parameter differs from the name of the
* caller as computed internally by SLF4J, a logger name mismatch warning
* will be printed but only if the
* <code>slf4j.detectLoggerNameMismatch</code> system property is set to
Expand Down
2 changes: 1 addition & 1 deletion slf4j-api/src/main/java/org/slf4j/LoggerFactoryFriend.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* All methods in this class are reserved for internal use, for testing purposes.
*
* <p>They can can be modified, renamed or removed at any time without notice.
* <p>They can be modified, renamed or removed at any time without notice.
*
* <p>You are strongly discouraged calling any of the methods of this class.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public String get(String key) {
}

/**
* Remove the the context identified by the <code>key</code> parameter.
* Remove the context identified by the <code>key</code> parameter.
*/
public void remove(String key) {
Map<String, String> map = inheritableThreadLocalMap.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
* will return the string "File name is C:\file.zip".
*
* <p>
* The formatting conventions are different than those of {@link MessageFormat}
* The formatting conventions are different from those of {@link MessageFormat}
* which ships with the Java platform. This is justified by the fact that
* SLF4J's implementation is 10 times faster than that of {@link MessageFormat}.
* This local performance difference is both measurable and significant in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.slf4j.Logger;

/**
* NOPLoggerFactory is an trivial implementation of {@link
* NOPLoggerFactory is a trivial implementation of {@link
* ILoggerFactory} which always returns the unique instance of
* NOPLogger.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.slf4j.event.LoggingEvent;

/**
* Holds normalized calling call parameters.
* Holds normalized call parameters.
*
* Includes utility methods such as {@link #normalize(String, Object[], Throwable)} to help the normalization of parameters.
*
Expand Down
2 changes: 1 addition & 1 deletion slf4j-api/src/main/java/org/slf4j/spi/MDCAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public interface MDCAdapter {
public String get(String key);

/**
* Remove the the context identified by the <code>key</code> parameter.
* Remove the context identified by the <code>key</code> parameter.
* The <code>key</code> parameter cannot be null.
*
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@
import java.util.List;

/**
*
* Copied from org.slfj.helpers.
* Copied from org.slfj.helpers.
*
* Currently it is not possible to use test-jar from tests running on the module-path.
* Currently it is not possible to use test-jar from tests running on the module-path.
*
* @author ceki
*
*/
public class StringPrintStream extends PrintStream {

Expand Down Expand Up @@ -73,4 +71,4 @@ public void println(Object o) {
other.println(o);
stringList.add(o.toString());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*/
public class SubstitutableLoggerTest {

// NOTE: previous implementations of this class performed a hand crafted conversion of
// NOTE: previous implementations of this class performed a handcrafted conversion of
// a method to a string. In this implementation we just invoke method.toString().

// WARNING: if you need to add an excluded method to have tests pass, ask yourself whether you
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class JavassistHelper {

/**
* Create a javassist source snippet which either is empty (for anything
* which does not return a value) or a explanatory text around the $_
* which does not return a value) or an explanatory text around the $_
* javassist return value variable.
*
* @param method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>
<p>Java instrumentation routines for SLF4J.</p>

<p>Byte code instrumentation is an way to change behaviour of java
<p>Byte code instrumentation is a way to change behaviour of java
classes at <i>load time</i>. This is done in-between the original byte
codes are retrieved and the class object is constructed by the class
loader. Currently this depends on the javassist library from JBoss
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void log(Level jplLevel, ResourceBundle bundle, String format, Object...
}

/**
* Single point of processing taking all possible paramets.
* Single point of processing taking all possible parameters.
*
* @param jplLevel
* @param bundle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public String abbreviate(String filename) {

int firstIndex = filename.indexOf(folderSeparator, invariantPrefixLength);
if (firstIndex == -1) {
// we cant't process this string
// we can't process this string
return filename;
}
StringBuilder buf = new StringBuilder(desiredLength);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void createComponents() {
*/
private void constrainAll() {

// contrain migration label
// constraints migration label
layoutManager.putConstraint(SpringLayout.WEST, migrationLabel, BASIC_PADDING, SpringLayout.EAST, this);

layoutManager.putConstraint(SpringLayout.NORTH, migrationLabel, BASIC_PADDING, SpringLayout.NORTH, this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public class AternativeApproach extends TestCase {

/**
* In this test we see that we cans use more simple Pattern to do the
* In this test we see that we can use more simple Pattern to do the
* conversion
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ public TrivialMatcher() {
// simple rule no capturing group is defined, we use default capturing group which is group zero
SingleConversionRule cr = new SingleConversionRule(Pattern.compile("import org.slf4j.converter"), "simple replacement with an unique capturing group");

// we define 4 differents capturing groups
// we define 4 different capturing groups
MultiGroupConversionRule cr1 = new MultiGroupConversionRule(Pattern.compile("(first group)( second group)( third group)( 4th group)"));
// group zero is ignored during treatment
// replacement for the first
cr1.addReplacement(1, "1st group");
// no replacement for the second group it will remains the same
// no replacement for the second group it will remain the same
// empty string for the third group it will be deleted
cr1.addReplacement(3, "");
// no replacement for the third group it will remains the same
// no replacement for the third group it will remain the same

conversionRuleList = new ArrayList<>();
conversionRuleList.add(cr);
Expand All @@ -60,4 +60,4 @@ public Iterator<ConversionRule> iterator() {
return conversionRuleList.iterator();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.slf4j.LoggerFactory;

/**
* Tests that output in multi-threaded environments is not mingled.
* Tests that output in multithreaded environments is not mingled.
*
* See also https://jira.qos.ch/browse/SLF4J-515
*/
Expand Down

0 comments on commit 24788ac

Please sign in to comment.