Skip to content

Commit

Permalink
#108 qulice polished
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 27, 2020
1 parent ef67f7a commit 7f9695f
Show file tree
Hide file tree
Showing 59 changed files with 105 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
* be run with maven-invoker-plugin because they set the system property
* com.jcabi.log.coloring, which interferes with other tests (tests are run
* by multiple threads at once)
* @author Mihai Andronache (amihaiemil@gmail.com)
* @version $Id$
* @since 0.1
*/
public final class MulticolorLayoutIntegration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,5 @@

/**
* Integration tests.
* @author Mihai Andronache (amihaiemil@gmail.com)
* @version $Id$
*/
package com.jcabi.log;
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@
* be run with maven-invoker-plugin because they set the system property
* com.jcabi.log.coloring, which interferes with other tests (tests are run
* by multiple threads at once)
* @author Mihai Andronache (amihaiemil@gmail.com)
* @version $Id$
* @since 0.1
*/
public final class MulticolorLayoutIntegrationTest {
/**
* Conversation pattern for test case.
*/
private static final String CONV_PATTERN = "[%color{%p}] %color{%m}";

/**
* Property that dictates wheter the text should be coloured or not.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,5 @@

/**
* Integration tests.
* @author Mihai Andronache (amihaiemil@gmail.com)
* @version $Id$
*/
package com.jcabi.log.test;
package com.jcabi.log;
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/ColorfullyFormatted.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

/**
* Formats a log event using ANSI color codes.
* @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)
* @version $Id$
* @since 0.18
*/
class ColorfullyFormatted implements Formatted {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/Colors.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@

/**
* Store human readable color data.
* @author Igor Piddubnyi (igor.piddubnyi@gmail.com)
* @version $Id$
* @since 0.18
*/
public class Colors {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

/**
* Replaces string format with a Control Sequence Indicator.
* @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)
* @version $Id$
* @since 0.18
*/
public class ControlSequenceIndicatorFormatted implements Formatted {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/ConversionPattern.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@

/**
* Generates the conversion pattern.
* @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)
* @version $Id$
* @since 0.18
*/
class ConversionPattern {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/DecorException.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
/**
* Exception if some problem with decor.
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/jcabi/log/DecorsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
/**
* Manager of all decors.
*
* @author Marina Kosenko (marina.kosenko@gmail.com)
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/DomDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
/**
* Decorates XML Document.
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/DullyFormatted.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

/**
* Formats a log event without using ANSI color codes.
* @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)
* @version $Id$
* @since 0.18
*/
class DullyFormatted implements Formatted {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/ExceptionDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
* }
* </pre>
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/Formatted.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

/**
* Contract for a class that know how to format something.
* @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)
* @version $Id$
* @since 0.18
*/
interface Formatted {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/ListDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@

/**
* Format list.
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@
* preparing of the arguments. By default, such a call is made inside every
* method of {@link Logger} class.
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/MsDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
* Logger.debug("completed in %[ms]s", System.currentTimeMillis() - start);
* </pre>
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/MulticolorLayout.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@
* &lt;groupId&gt;com.jcabi&lt;/groupId&gt;
* &lt;artifactId&gt;jcabi-log&lt;/artifactId&gt;
* &lt;/dependency&gt;</pre>
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1.10
* @see <a href="http://en.wikipedia.org/wiki/ANSI_escape_code">ANSI escape code</a>
* @see <a href="http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html">PatternLayout from LOG4J</a>
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/jcabi/log/NanoDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@
* Logger.debug("completed in %[nano]s", System.nanoTime() - start);
* </pre>
*
* @author Marina Kosenko (marina.kosenko@gmail.com)
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
14 changes: 5 additions & 9 deletions src/main/java/com/jcabi/log/ObjectDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@

/**
* Format internal structure of an object.
* @author Marina Kosenko (marina.kosenko@gmail.com)
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down Expand Up @@ -85,8 +82,8 @@ public void formatTo(final Formatter formatter, final int flags,

/**
* {@link PrivilegedAction} for obtaining array contents.
* @author Aleksey Popov (alopen@yandex.ru)
* @version $Id$
*
* @since 0.1
*/
private static final class ArrayFormatAction
implements PrivilegedAction<String> {
Expand Down Expand Up @@ -120,9 +117,8 @@ public String run() {

/**
* {@link PrivilegedAction} for obtaining object contents.
* @author Marina Kosenko (marina.kosenko@gmail.com)
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
*
* @since 0.1
*/
private static final class ObjectContentsFormatAction
implements PrivilegedAction<String> {
Expand Down Expand Up @@ -161,6 +157,6 @@ public String run() {
}
builder.replace(builder.length() - 2, builder.length(), "}");
return builder.toString();
};
}
}
}
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/ParseableInformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
/**
* Converts items inside a string like K1:V1,K2:V2 - where K is for key and V
* is for value - to a {@code Map} of string key and string value.
* @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)
* @version $Id$
* @since 0.18
*/
class ParseableInformation {
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/ParseableLevelInformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
/**
* Parse information like {@code ParseInformation} does, but increments with
* some extra checks for {@code Level}s.
* @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)
* @version $Id$
* @since 0.18
*/
class ParseableLevelInformation {
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/jcabi/log/PreFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
* Processor of formatting string and arguments, before sending it to
* {@link String#format(String,Object[])}.
*
* @author Marina Kosenko (marina.kosenko@gmail.com)
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/jcabi/log/SecretDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@

/**
* Decorator of a secret text.
* @author Marina Kosenko (marina.kosenko@gmail.com)
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/jcabi/log/SizeDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@

/**
* Size decorator.
* @author Marina Kosenko (marina.kosenko@gmail.com)
* @author Yegor Bugayenko (yegor256@gmail.com)
* @author Carlos Miranda (miranda.cma@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/Supplier.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
* or method references. <b>Can be used for method referencing when the method
* signature respects the following: returns something and takes no arguments.
* </b>
* @author Mihai Andronache (amihaiemil@gmail.com)
* @version $Id$
* @param <T> The type of results supplied by this supplier
* @since 0.18
*/
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/SupplierLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
/**
* Logging methods which take {@link Supplier} arguments.
* Used with Java 8 method referencing.
* @author Mihai Andronache (amihaiemil@gmail.com)
* @version $Id$
* @since 0.18
* @checkstyle HideUtilityClassConstructorCheck (500 lines)
*/
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/TextDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
* Logger.debug("Long input '%[text]s' provided", input);
* }</pre>
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1.5
*/
@ToString
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/jcabi/log/TypeDecor.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
* }
* </pre>
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/jcabi/log/VerboseCallable.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
*
* <p>This class is thread-safe.
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.16
* @param <T> Type of result
* @see VerboseThreads
Expand Down Expand Up @@ -122,6 +120,7 @@ public T call() throws Exception {
runnable.run();
return null;
}

@Override
public String toString() {
return runnable.toString();
Expand Down
11 changes: 9 additions & 2 deletions src/main/java/com/jcabi/log/VerboseProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
*
* <p>The class is thread-safe.
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.5
*/
@ToString
Expand Down Expand Up @@ -405,24 +403,30 @@ private static void close(final Closeable res) {

/**
* Stream monitor.
*
* @since 0.1
*/
private static final class Monitor implements Callable<Void> {
/**
* Stream to read.
*/
private final transient InputStream input;

/**
* Latch to count down when done.
*/
private final transient CountDownLatch done;

/**
* Buffer to save output.
*/
private final transient OutputStream output;

/**
* Log level.
*/
private final transient Level level;

/**
* Ctor.
* @param inp Stream to monitor
Expand All @@ -438,6 +442,7 @@ private static final class Monitor implements Callable<Void> {
this.output = out;
this.level = lvl;
}

@Override
public Void call() throws Exception {
final BufferedReader reader = new BufferedReader(
Expand Down Expand Up @@ -495,6 +500,8 @@ public Void call() throws Exception {

/**
* Class representing the result of a process.
*
* @since 0.1
*/
public static final class Result {

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/com/jcabi/log/VerboseRunnable.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
*
* <p>This class is thread-safe.
*
* @author Yegor Bugayenko (yegor256@gmail.com)
* @version $Id$
* @since 0.1.3
* @see VerboseThreads
* @link <a href="http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html">Java theory and practice: Dealing with InterruptedException</a>
Expand Down Expand Up @@ -138,6 +136,7 @@ public void run() {
throw new IllegalStateException(ex);
}
}

@Override
public String toString() {
return callable.toString();
Expand Down
Loading

0 comments on commit 7f9695f

Please sign in to comment.