mirror of https://github.com/qos-ch/slf4j
fix typos in documentations
Fix typos in javadoc, comments and README. Signed-off-by: Marc Wrobel <marc.wrobel@gmail.com>
This commit is contained in:
parent
05c0b0a881
commit
24788ac731
|
|
@ -40,14 +40,14 @@ for your work if appropriate. It usually is.
|
||||||
4. All commits must have signed off by the contributor attesting to
|
4. All commits must have signed off by the contributor attesting to
|
||||||
[Developer Certificate of Origin
|
[Developer Certificate of Origin
|
||||||
(DCO)](https://developercertificate.org/). Commits without sign off
|
(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.
|
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
|
your master! If you do it will make it harder to submit new changes
|
||||||
later.
|
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
|
7. Did we mention that you will be asked to link your pull request
|
||||||
with a Jira ticket?
|
with a Jira ticket?
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- for some reason if mvn is invoked from the parent directory, junit gets
|
<!-- 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}" -->
|
fork="yes" dir="${basedir}" -->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -107,4 +107,4 @@
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -173,12 +173,10 @@ public class SLF4JLogFactory extends LogFactory {
|
||||||
public void release() {
|
public void release() {
|
||||||
// This method is never called by jcl-over-slf4j classes. However,
|
// This method is never called by jcl-over-slf4j classes. However,
|
||||||
// in certain deployment scenarios, in particular if jcl-over-slf4j.jar
|
// in certain deployment scenarios, in particular if jcl-over-slf4j.jar
|
||||||
// is
|
// is in the web-app class loader and the official commons-logging.jar
|
||||||
// in the the web-app class loader and the official commons-logging.jar is
|
// is deployed in some parent class loader (e.g. commons/lib), then it
|
||||||
// deployed in some parent class loader (e.g. commons/lib), then it is
|
// is possible for the parent class loader to mask the classes shipping
|
||||||
// possible
|
// in jcl-over-slf4j.jar.
|
||||||
// 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: 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.println("WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.");
|
||||||
System.out.flush();
|
System.out.flush();
|
||||||
|
|
@ -216,4 +214,4 @@ public class SLF4JLogFactory extends LogFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ replacement for the original JCL version 1.0.4.
|
||||||
<p>As the original JCL version 1.0.4, the present version supports
|
<p>As the original JCL version 1.0.4, the present version supports
|
||||||
various logging APIs. It differs from the original in implementation
|
various logging APIs. It differs from the original in implementation
|
||||||
but not the public API. This implementation uses SLF4J under the
|
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.
|
e.g. NOP, Simple, JDK14, nlog4j are supported by this version of JCL.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,12 @@ import org.slf4j.spi.LocationAwareLogger;
|
||||||
* SLF4J translation can seriously increase the cost of disabled logging
|
* 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 (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,
|
* 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>.
|
* 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>
|
* <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>
|
* <ol>
|
||||||
* <li>few j.u.l. logging statements are in play</li>
|
* <li>few j.u.l. logging statements are in play</li>
|
||||||
* <li>LevelChangePropagator has been installed</li>
|
* <li>LevelChangePropagator has been installed</li>
|
||||||
|
|
@ -93,7 +93,7 @@ import org.slf4j.spi.LocationAwareLogger;
|
||||||
* <h2>As a Java 9/Jigsaw module</h2>
|
* <h2>As a Java 9/Jigsaw module</h2>
|
||||||
*
|
*
|
||||||
* <p>Given that <b>to</b> is a reserved keyword under Java 9 within module productions,
|
* <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
|
* 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>
|
* statement in your <em>module-info.java</em> needs to be <b>jul_to_slf4j</b>
|
||||||
* (note the two underscores).
|
* (note the two underscores).
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<!-- ================================================================= -->
|
<!-- ================================================================= -->
|
||||||
<target name="usage">
|
<target name="usage">
|
||||||
<echo>
|
<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
|
all - run all available tests
|
||||||
refresh - copy required jar files to the lib directory
|
refresh - copy required jar files to the lib directory
|
||||||
|
|
|
||||||
|
|
@ -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
|
In the same directory is a build.xml file that uses ant to
|
||||||
compile the test cases with the corresponding log4j version,
|
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.
|
logback jars instead.
|
||||||
|
|
||||||
To run the tests, one must have ant installed. Issuing the following command,
|
To run the tests, one must have ant installed. Issuing the following command,
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ public interface Appender {
|
||||||
* Configurators call this method to determine if the appender
|
* Configurators call this method to determine if the appender
|
||||||
* requires a layout. If this method returns <code>true</code>,
|
* requires a layout. If this method returns <code>true</code>,
|
||||||
* meaning that layout is required, then the configurator will
|
* 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
|
* disposal. If this method returns <code>false</code>, meaning that
|
||||||
* a layout is not required, then layout configuration will be
|
* a layout is not required, then layout configuration will be
|
||||||
* skipped even if there is available layout configuration
|
* skipped even if there is available layout configuration
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ public class Priority {
|
||||||
*
|
*
|
||||||
* @param val an integer value
|
* @param val an integer value
|
||||||
* @param defaultPriority a default priority value
|
* @param defaultPriority a default priority value
|
||||||
* @return correspoding Priority value
|
* @return corresponding Priority value
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static Priority toPriority(int val, Priority defaultPriority) {
|
public static Priority toPriority(int val, Priority defaultPriority) {
|
||||||
|
|
@ -204,4 +204,4 @@ public class Priority {
|
||||||
public static Priority toPriority(String sArg, Priority defaultPriority) {
|
public static Priority toPriority(String sArg, Priority defaultPriority) {
|
||||||
return Level.toLevel(sArg, (Level) defaultPriority);
|
return Level.toLevel(sArg, (Level) defaultPriority);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ import org.apache.log4j.spi.Configurator;
|
||||||
import org.apache.log4j.spi.LoggerRepository;
|
import org.apache.log4j.spi.LoggerRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An nop implementation of PropertyConfigurator.
|
* A no-op implementation of PropertyConfigurator.
|
||||||
*/
|
*/
|
||||||
public class PropertyConfigurator implements Configurator {
|
public class PropertyConfigurator implements Configurator {
|
||||||
public static void configure(Properties properties) {
|
public static void configure(Properties properties) {
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ package org.apache.log4j.helpers;
|
||||||
<b>log4j.configDebug</b> variable.
|
<b>log4j.configDebug</b> variable.
|
||||||
|
|
||||||
<p>All log4j internal debug calls go to <code>System.out</code>
|
<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
|
<code>System.err</code>. All internal messages are prepended with
|
||||||
the string "log4j: ".
|
the string "log4j: ".
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ public class LogLog {
|
||||||
|
|
||||||
<p> The value of this string is <b>log4j.debug</b>.
|
<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";
|
public static final String DEBUG_KEY = "log4j.debug";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -49,7 +49,7 @@ public class LogLog {
|
||||||
|
|
||||||
<p> The value of this string is <b>log4j.configDebug</b>.
|
<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.
|
@deprecated Use {@link #DEBUG_KEY} instead.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import org.apache.log4j.Logger;
|
||||||
/**
|
/**
|
||||||
|
|
||||||
Implement this interface to create new instances of Logger or
|
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.
|
<p>See <code>examples/subclass/MyLogger.java</code> for an example.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ import org.slf4j.spi.NOPLoggingEventBuilder;
|
||||||
public interface Logger {
|
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
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
|
|
@ -510,7 +510,8 @@ public interface Logger {
|
||||||
* data is also taken into consideration.
|
* data is also taken into consideration.
|
||||||
*
|
*
|
||||||
* @param marker The marker data to take 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);
|
public boolean isInfoEnabled(Marker marker);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,7 @@ public final class LoggerFactory {
|
||||||
* using the statically bound {@link ILoggerFactory} instance.
|
* using the statically bound {@link ILoggerFactory} instance.
|
||||||
*
|
*
|
||||||
* <p>
|
* <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
|
* caller as computed internally by SLF4J, a logger name mismatch warning
|
||||||
* will be printed but only if the
|
* will be printed but only if the
|
||||||
* <code>slf4j.detectLoggerNameMismatch</code> system property is set to
|
* <code>slf4j.detectLoggerNameMismatch</code> system property is set to
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ package org.slf4j;
|
||||||
/**
|
/**
|
||||||
* All methods in this class are reserved for internal use, for testing purposes.
|
* 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.
|
* <p>You are strongly discouraged calling any of the methods of this class.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public class BasicMDCAdapter implements MDCAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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) {
|
public void remove(String key) {
|
||||||
Map<String, String> map = inheritableThreadLocalMap.get();
|
Map<String, String> map = inheritableThreadLocalMap.get();
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ import java.util.Map;
|
||||||
* will return the string "File name is C:\file.zip".
|
* will return the string "File name is C:\file.zip".
|
||||||
*
|
*
|
||||||
* <p>
|
* <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
|
* 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}.
|
* SLF4J's implementation is 10 times faster than that of {@link MessageFormat}.
|
||||||
* This local performance difference is both measurable and significant in the
|
* This local performance difference is both measurable and significant in the
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import org.slf4j.ILoggerFactory;
|
||||||
import org.slf4j.Logger;
|
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
|
* ILoggerFactory} which always returns the unique instance of
|
||||||
* NOPLogger.
|
* NOPLogger.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package org.slf4j.helpers;
|
||||||
import org.slf4j.event.LoggingEvent;
|
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.
|
* Includes utility methods such as {@link #normalize(String, Object[], Throwable)} to help the normalization of parameters.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public interface MDCAdapter {
|
||||||
public String get(String key);
|
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.
|
* The <code>key</code> parameter cannot be null.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,11 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
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
|
* @author ceki
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class StringPrintStream extends PrintStream {
|
public class StringPrintStream extends PrintStream {
|
||||||
|
|
||||||
|
|
@ -73,4 +71,4 @@ public class StringPrintStream extends PrintStream {
|
||||||
other.println(o);
|
other.println(o);
|
||||||
stringList.add(o.toString());
|
stringList.add(o.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ import org.slf4j.event.EventRecordingLogger;
|
||||||
*/
|
*/
|
||||||
public class SubstitutableLoggerTest {
|
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().
|
// 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
|
// WARNING: if you need to add an excluded method to have tests pass, ask yourself whether you
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ public class JavassistHelper {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a javassist source snippet which either is empty (for anything
|
* 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.
|
* javassist return value variable.
|
||||||
*
|
*
|
||||||
* @param method
|
* @param method
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<body>
|
<body>
|
||||||
<p>Java instrumentation routines for SLF4J.</p>
|
<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
|
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
|
codes are retrieved and the class object is constructed by the class
|
||||||
loader. Currently this depends on the javassist library from JBoss
|
loader. Currently this depends on the javassist library from JBoss
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ class SLF4JPlatformLogger implements System.Logger {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Single point of processing taking all possible paramets.
|
* Single point of processing taking all possible parameters.
|
||||||
*
|
*
|
||||||
* @param jplLevel
|
* @param jplLevel
|
||||||
* @param bundle
|
* @param bundle
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class Abbreviator {
|
||||||
|
|
||||||
int firstIndex = filename.indexOf(folderSeparator, invariantPrefixLength);
|
int firstIndex = filename.indexOf(folderSeparator, invariantPrefixLength);
|
||||||
if (firstIndex == -1) {
|
if (firstIndex == -1) {
|
||||||
// we cant't process this string
|
// we can't process this string
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
StringBuilder buf = new StringBuilder(desiredLength);
|
StringBuilder buf = new StringBuilder(desiredLength);
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ public class MigratorFrame extends JFrame implements ActionListener {
|
||||||
*/
|
*/
|
||||||
private void constrainAll() {
|
private void constrainAll() {
|
||||||
|
|
||||||
// contrain migration label
|
// constraints migration label
|
||||||
layoutManager.putConstraint(SpringLayout.WEST, migrationLabel, BASIC_PADDING, SpringLayout.EAST, this);
|
layoutManager.putConstraint(SpringLayout.WEST, migrationLabel, BASIC_PADDING, SpringLayout.EAST, this);
|
||||||
|
|
||||||
layoutManager.putConstraint(SpringLayout.NORTH, migrationLabel, BASIC_PADDING, SpringLayout.NORTH, this);
|
layoutManager.putConstraint(SpringLayout.NORTH, migrationLabel, BASIC_PADDING, SpringLayout.NORTH, this);
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ import junit.framework.TestCase;
|
||||||
public class AternativeApproach extends TestCase {
|
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
|
* conversion
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -41,15 +41,15 @@ class TrivialMatcher implements RuleSet {
|
||||||
// simple rule no capturing group is defined, we use default capturing group which is group zero
|
// 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");
|
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)"));
|
MultiGroupConversionRule cr1 = new MultiGroupConversionRule(Pattern.compile("(first group)( second group)( third group)( 4th group)"));
|
||||||
// group zero is ignored during treatment
|
// group zero is ignored during treatment
|
||||||
// replacement for the first
|
// replacement for the first
|
||||||
cr1.addReplacement(1, "1st group");
|
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
|
// empty string for the third group it will be deleted
|
||||||
cr1.addReplacement(3, "");
|
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 = new ArrayList<>();
|
||||||
conversionRuleList.add(cr);
|
conversionRuleList.add(cr);
|
||||||
|
|
@ -60,4 +60,4 @@ class TrivialMatcher implements RuleSet {
|
||||||
return conversionRuleList.iterator();
|
return conversionRuleList.iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
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
|
* See also https://jira.qos.ch/browse/SLF4J-515
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue