You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/11/26 20:08:28 UTC

(commons-logging) branch master updated (1290cec -> 087b3cb)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-logging.git


    from 1290cec  Deprecate org.apache.commons.logging.impl.Jdk13LumberjackLogger.dummyLevel without replacement
     new 1a30b65  Use Checkstyle ParenPad
     new fa2dd91  Javadoc
     new 087b3cb  Use Checkstyle ParenPad

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checkstyle.xml                                      | 16 ++++++++--------
 .../commons/logging/impl/Jdk13LumberjackLogger.java | 21 ++++++++++-----------
 .../org/apache/commons/logging/impl/SimpleLog.java  |  9 +++++----
 .../logging/security/SecurityForbiddenTestCase.java |  2 +-
 4 files changed, 24 insertions(+), 24 deletions(-)


(commons-logging) 02/03: Javadoc

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-logging.git

commit fa2dd91b6dc057809990ebc21151232932374810
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 26 15:07:16 2023 -0500

    Javadoc
---
 src/main/java/org/apache/commons/logging/impl/SimpleLog.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
index b3a845f..2b4c1e4 100644
--- a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
+++ b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
@@ -84,9 +84,10 @@ public class SimpleLog implements Log, Serializable {
     /** Include the instance name in the log message? */
     static volatile protected boolean showLogName;
 
-    /** Include the short name ( last component ) of the logger in the log
-     *  message. Defaults to true - otherwise we'll be lost in a flood of
-     *  messages without knowing who sends them.
+    /**
+     * Include the short name (last component) of the logger in the log
+     * message. Defaults to true - otherwise we'll be lost in a flood of
+     * messages without knowing who sends them.
      */
     static volatile protected boolean showShortName = true;
 
@@ -238,7 +239,7 @@ public class SimpleLog implements Log, Serializable {
 
         // Set initial log level
         // Used to be: set default log level to ERROR
-        // IMHO it should be lower, but at least info ( costin ).
+        // IMHO it should be lower, but at least info (costin).
         setLevel(SimpleLog.LOG_LEVEL_INFO);
 
         // Set log level from properties


(commons-logging) 03/03: Use Checkstyle ParenPad

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-logging.git

commit 087b3cba9333d5127227b86ca2bb5d97f9130141
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 26 15:07:37 2023 -0500

    Use Checkstyle ParenPad
---
 .../org/apache/commons/logging/security/SecurityForbiddenTestCase.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java b/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java
index 055b980..cdf50ca 100644
--- a/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java
+++ b/src/test/java/org/apache/commons/logging/security/SecurityForbiddenTestCase.java
@@ -84,7 +84,7 @@ public class SecurityForbiddenTestCase extends TestCase {
             final Class clazz = classLoader.loadClass(name);
             final Object obj = clazz.getConstructor().newInstance();
             return obj;
-        } catch ( final Exception e ) {
+        } catch (final Exception e) {
             final StringWriter sw = new StringWriter();
             final PrintWriter pw = new PrintWriter(sw);
             e.printStackTrace(pw);


(commons-logging) 01/03: Use Checkstyle ParenPad

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-logging.git

commit 1a30b658bd45a06da4eb01271931decc9b7f2754
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 26 15:06:34 2023 -0500

    Use Checkstyle ParenPad
---
 checkstyle.xml                                      | 16 ++++++++--------
 .../commons/logging/impl/Jdk13LumberjackLogger.java | 21 ++++++++++-----------
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/checkstyle.xml b/checkstyle.xml
index 0b20a08..163b762 100644
--- a/checkstyle.xml
+++ b/checkstyle.xml
@@ -15,7 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
 -->
-
 <!DOCTYPE module PUBLIC
     "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
     "https://checkstyle.org/dtds/configuration_1_3.dtd">
@@ -23,7 +22,7 @@ limitations under the License.
 <!-- commons logging customization of default Checkstyle behavior -->
 <module name="Checker">
   <property name="localeLanguage" value="en" />
-  <property name="severity" value="warning"/>
+  <property name="severity" value="warning" />
 
   <!-- Checks whether files end with a new line. -->
   <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
@@ -57,7 +56,7 @@ limitations under the License.
   </module>
 
   <module name="LineLength">
-    <property name="max" value="160"/>
+    <property name="max" value="160" />
   </module>
 
   <module name="TreeWalker">
@@ -65,12 +64,13 @@ limitations under the License.
       <property name="option" value="eol" />
     </module>
     <module name="ImportOrder">
-      <property name="option" value="top"/>
-      <property name="groups" value="java,javax,org"/>
-      <property name="ordered" value="true"/>
-      <property name="separated" value="true"/>
-      <property name="sortStaticImportsAlphabetically" value="true"/>
+      <property name="option" value="top" />
+      <property name="groups" value="java,javax,org" />
+      <property name="ordered" value="true" />
+      <property name="separated" value="true" />
+      <property name="sortStaticImportsAlphabetically" value="true" />
     </module>
     <module name="WhitespaceAfter" />
+    <module name="ParenPad" />
   </module>
 </module>
diff --git a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
index ce66e4b..19c9978 100644
--- a/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
+++ b/src/main/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
@@ -159,11 +159,10 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
             final Throwable throwable = new Throwable();
             throwable.fillInStackTrace();
             final StringWriter stringWriter = new StringWriter();
-            final PrintWriter printWriter = new PrintWriter( stringWriter );
-            throwable.printStackTrace( printWriter );
+            final PrintWriter printWriter = new PrintWriter(stringWriter);
+            throwable.printStackTrace(printWriter);
             final String traceString = stringWriter.getBuffer().toString();
-            final StringTokenizer tokenizer =
-                new StringTokenizer( traceString, "\n" );
+            final StringTokenizer tokenizer = new StringTokenizer(traceString, "\n");
             tokenizer.nextToken();
             String line = tokenizer.nextToken();
             while (!line.contains(this.getClass().getName())) {
@@ -172,13 +171,13 @@ public class Jdk13LumberjackLogger implements Log, Serializable {
             while (line.contains(this.getClass().getName())) {
                 line = tokenizer.nextToken();
             }
-            final int start = line.indexOf( "at " ) + 3;
-            final int end = line.indexOf( '(' );
-            final String temp = line.substring( start, end );
-            final int lastPeriod = temp.lastIndexOf( '.' );
-            sourceClassName = temp.substring( 0, lastPeriod );
-            sourceMethodName = temp.substring( lastPeriod + 1 );
-        } catch ( final Exception ex ) {
+            final int start = line.indexOf("at ") + 3;
+            final int end = line.indexOf('(');
+            final String temp = line.substring(start, end);
+            final int lastPeriod = temp.lastIndexOf('.');
+            sourceClassName = temp.substring(0, lastPeriod);
+            sourceMethodName = temp.substring(lastPeriod + 1);
+        } catch (final Exception ex) {
             // ignore - leave class and methodname unknown
         }
         classAndMethodFound = true;