Christian Grobmeier | 3 Aug 17:29 2011
Picon

Site deploy

Hello all,

i svn co'ed the logging site and wanted to add some branding stuff.
But then I saw its already included, just not online. Are there any
reasons why the site hasn't been deployed yet?

i will try to deploy it the next time, because its building fine for
me and we should correct our branding soonish

I've made two additions, one is a formatting typo in the landing page
of companions, the second one is that log4j 2 should be visible in the
main navigation.

Cheers,
Christian

sdeboy | 17 Aug 09:13 2011
Picon

svn commit: r1158546 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogFilePatternLayoutBuilder.java LogUI.java vfs/VFSLogFilePatternReceiver.java

Author: sdeboy
Date: Wed Aug 17 07:13:43 2011
New Revision: 1158546

URL: http://svn.apache.org/viewvc?rev=1158546&view=rev
Log:
Fix case sensitivity in configuration parsing
Fix VFS tailing, particularly with sftp (the filesystem needed to be closed)

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java?rev=1158546&r1=1158545&r2=1158546&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java (original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java
Wed Aug 17 07:13:43 2011
 <at>  <at>  -32,6 +32,7  <at>  <at>  import javax.xml.parsers.DocumentBuilder
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;

+import org.apache.log4j.chainsaw.messages.MessageCenter;
 import org.apache.log4j.helpers.OptionConverter;
 import org.apache.log4j.pattern.ClassNamePatternConverter;
 import org.apache.log4j.pattern.DatePatternConverter;
(Continue reading)

Stefan Bodewig | 17 Aug 09:26 2011
Picon

Re: svn commit: r1158546 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogFilePatternLayoutBuilder.java LogUI.java vfs/VFSLogFilePatternReceiver.java

Hi Scott,

I don't know why commit mails go to the general list, but this one
caught my eye:

On 2011-08-17, <sdeboy <at> apache.org> wrote:

>                  Node fileNameNode = appenderChild.getAttributes().getNamedItem("name");
> -                if (fileNameNode != null && fileNameNode.getNodeValue().equals("file")) {
> +                If (fileNameNode != null && fileNameNode.getNodeValue().toLowerCase().equals("file")) {

this is a locale sensitive comparison which is likely to cause problems
in the famous Turkish/Azeri locale case ("I".toLowerCase() != "i"
there).

You may want to use fileNameNode.getNodeValue().equalsIgnoreCase("file")
instead, which is safe.

Stefan

Christian Grobmeier | 17 Aug 09:36 2011
Picon

Commit mailinglists (was: Re: svn commit: r1158546 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogFilePatternLayoutBuilder.java LogUI.java vfs/VFSLogFilePatternReceiver.java)

On Wed, Aug 17, 2011 at 9:26 AM, Stefan Bodewig <bodewig <at> apache.org> wrote:
> I don't know why commit mails go to the general list, but this one
> caught my eye:

It should go to log4j-cvs <at> logging.apache.org to my knowledge
But looking at the headers they all go to general <at> logging.apache.org

Looking at the website, there is no commit mailinglist mentioned at all.

Instead we should create log4j-commits <at> logging.apache.org for svn
commits and issues
Same is true for log4php, log4net and log4cxx

Or are there any other reasons for sending commits to general?

Scott Deboy | 17 Aug 09:44 2011
Picon

Re: svn commit: r1158546 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogFilePatternLayoutBuilder.java LogUI.java vfs/VFSLogFilePatternReceiver.java

Thanks Stefan, I'll take care of it..

On Wed, Aug 17, 2011 at 12:26 AM, Stefan Bodewig <bodewig <at> apache.org> wrote:
Hi Scott,

I don't know why commit mails go to the general list, but this one
caught my eye:

On 2011-08-17, <sdeboy <at> apache.org> wrote:

>                  Node fileNameNode = appenderChild.getAttributes().getNamedItem("name");
> -                if (fileNameNode != null && fileNameNode.getNodeValue().equals("file")) {
> +                If (fileNameNode != null && fileNameNode.getNodeValue().toLowerCase().equals("file")) {

this is a locale sensitive comparison which is likely to cause problems
in the famous Turkish/Azeri locale case ("I".toLowerCase() != "i"
there).

You may want to use fileNameNode.getNodeValue().equalsIgnoreCase("file")
instead, which is safe.

Stefan

Stefan Bodewig | 17 Aug 09:48 2011
Picon

Re: Commit mailinglists

On 2011-08-17, Christian Grobmeier wrote:

> On Wed, Aug 17, 2011 at 9:26 AM, Stefan Bodewig <bodewig <at> apache.org> wrote:
>> I don't know why commit mails go to the general list, but this one
>> caught my eye:

> It should go to log4j-cvs <at> logging.apache.org to my knowledge
> But looking at the headers they all go to general <at> logging.apache.org

> Looking at the website, there is no commit mailinglist mentioned at all.

> Instead we should create log4j-commits <at> logging.apache.org for svn
> commits and issues
> Same is true for log4php, log4net and log4cxx

log4net has log4net-cvs <at> logging which is used - but neither advertised
on the site nor visible at the mail archive.  I have already opened an
INFRA ticket for an archive of log4net-cvs about an hour ago 8-)

If the lists exists, PMC chairmen and infrastructure volunteers can make
sure they get used.  We only need help from the infra team if the lists
don't exist in the first place.

Stefan

Scott Deboy | 17 Aug 09:54 2011
Picon

Re: svn commit: r1158546 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogFilePatternLayoutBuilder.java LogUI.java vfs/VFSLogFilePatternReceiver.java

Any suggestions for where startsWith, endsWith or contains are used?

On Wed, Aug 17, 2011 at 12:44 AM, Scott Deboy <scott.deboy <at> gmail.com> wrote:
Thanks Stefan, I'll take care of it..


On Wed, Aug 17, 2011 at 12:26 AM, Stefan Bodewig <bodewig <at> apache.org> wrote:
Hi Scott,

I don't know why commit mails go to the general list, but this one
caught my eye:

On 2011-08-17, <sdeboy <at> apache.org> wrote:

>                  Node fileNameNode = appenderChild.getAttributes().getNamedItem("name");
> -                if (fileNameNode != null && fileNameNode.getNodeValue().equals("file")) {
> +                If (fileNameNode != null && fileNameNode.getNodeValue().toLowerCase().equals("file")) {

this is a locale sensitive comparison which is likely to cause problems
in the famous Turkish/Azeri locale case ("I".toLowerCase() != "i"
there).

You may want to use fileNameNode.getNodeValue().equalsIgnoreCase("file")
instead, which is safe.

Stefan


Stefan Bodewig | 17 Aug 09:58 2011
Picon

Re: svn commit: r1158546 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogFilePatternLayoutBuilder.java LogUI.java vfs/VFSLogFilePatternReceiver.java

On 2011-08-17, Scott Deboy wrote:

> Any suggestions for where startsWith, endsWith or contains are used?

In Ant we explicitly use toLowerCase(Locale.ENGLISH) in this case.

Stefan

Stefan Bodewig | 17 Aug 10:12 2011
Picon

Re: Commit mailinglists

On 2011-08-17, Christian Grobmeier wrote:

> On Wed, Aug 17, 2011 at 9:26 AM, Stefan Bodewig <bodewig <at> apache.org> wrote:
>> I don't know why commit mails go to the general list, but this one
>> caught my eye:

> It should go to log4j-cvs <at> logging.apache.org to my knowledge
> But looking at the headers they all go to general <at> logging.apache.org

This is the current configuration

,----
| # Logging
| [/logging]
| for_paths = logging/
| to_addr = general <at> logging.apache.org
| 
| [/logging/sandbox]
| for_paths = logging/sandbox/
| to_addr = log4j-cvs <at> logging.apache.org
| 
| [/logging/log4j]
| for_paths = logging/log4j/
| to_addr = log4j-cvs <at> logging.apache.org
| 
| [/logging/log4cxx]
| for_paths = logging/log4cxx/
| to_addr = log4cxx-cvs <at> logging.apache.org
| 
| [/logging/log4net]
| for_paths = logging/log4net/
| to_addr = log4net-cvs <at> logging.apache.org
| 
| [/logging/log4php]
| for_paths = logging/log4php/
| to_addr = log4php-cvs <at> logging.apache.org
`----

So this looks OK for most sub-projects.  chainsaw lives directly under
logging so the fallback is the only one that matches.  Should it go to a
different list instead?

Shall I expand INFRA-3858 (make the mbox archive of log4net-cvs public)
to include the other *-cvs lists in addition as well?

Stefan

sdeboy | 17 Aug 10:18 2011
Picon

svn commit: r1158566 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: ./ helper/ receivers/

Author: sdeboy
Date: Wed Aug 17 08:18:24 2011
New Revision: 1158566

URL: http://svn.apache.org/viewvc?rev=1158566&view=rev
Log:
Update string comparisons to be case insensitive or explicitly use the English locale where needed in
Chainsaw and extras companion

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/SwingHelper.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/PluginPropertyEditorPanel.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java (original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
Wed Aug 17 08:18:24 2011
 <at>  <at>  -30,6 +30,7  <at>  <at>  import java.util.Dictionary;
 import java.util.Enumeration;
 import java.util.Hashtable;

+import java.util.Locale;
 import javax.swing.BorderFactory;
 import javax.swing.Box;
 import javax.swing.BoxLayout;
 <at>  <at>  -187,7 +188,7  <at>  <at>  public static void main(String[] args) {
       boolean useNewLookAndFeels = false;
       int j = 0;
       for (int i=0;i<lookAndFeels.length;i++) {
-        if (lookAndFeels[i].getClassName().toLowerCase().contains("nimbus")) {
+        if (lookAndFeels[i].getClassName().toLowerCase(Locale.ENGLISH).contains("nimbus")) {
             useNewLookAndFeels = true;
         } else {
             newLookAndFeels[j++] = lookAndFeels[i];
 <at>  <at>  -549,7 +550,7  <at>  <at>  public static void main(String[] args) {
                       defaultPath = currentConfigurationPath.getPath();
                       //FileDialog will not navigate to this location unless we remove the prefixing protocol and slash
                       //at least on winxp
-                      if (defaultPath.toLowerCase().startsWith("file:\\")) {
+                      if (defaultPath.toLowerCase(Locale.ENGLISH).startsWith("file:\\")) {
                           defaultPath = defaultPath.substring("file:\\".length());
                       }
                   }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java (original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
Wed Aug 17 08:18:24 2011
 <at>  <at>  -27,6 +27,7  <at>  <at>  import java.util.Date;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;

 <at>  <at>  -601,11 +602,11  <at>  <at>  class ChainsawCyclicBufferTableModel ext
         //case may not match..try case sensitive and fall back to case-insensitive
         String result = event.getProperty(columnNames.get(columnIndex).toString());
         if (result == null) {
-            String lowerColName = columnNames.get(columnIndex).toString().toLowerCase();
+            String lowerColName = columnNames.get(columnIndex).toString().toLowerCase(Locale.ENGLISH);
             Set entrySet = event.getProperties().entrySet();
             for (Iterator iter = entrySet.iterator();iter.hasNext();) {
                 Map.Entry thisEntry = (Map.Entry) iter.next();
-                if (thisEntry.getKey().toString().toLowerCase().equals(lowerColName)) {
+                if (thisEntry.getKey().toString().equalsIgnoreCase(lowerColName)) {
                     result = thisEntry.getValue().toString();
                 }
             }
 <at>  <at>  -785,7 +786,7  <at>  <at>  class ChainsawCyclicBufferTableModel ext
    *  <at> see javax.swing.table.TableModel#isCellEditable(int, int)
    */
   public boolean isCellEditable(int rowIndex, int columnIndex) {
-    if
(getColumnName(columnIndex).toLowerCase().equals(ChainsawConstants.LOG4J_MARKER_COL_NAME_LOWERCASE)) {
+    if
(getColumnName(columnIndex).equalsIgnoreCase(ChainsawConstants.LOG4J_MARKER_COL_NAME_LOWERCASE)) {
       return true;
     }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileSaveAction.java Wed
Aug 17 08:18:24 2011
 <at>  <at>  -30,6 +30,7  <at>  <at>  import java.io.OutputStreamWriter;
 import java.io.Writer;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;

 <at>  <at>  -103,7 +104,7  <at>  <at>  class FileSaveAction extends AbstractAct

     XMLLayout layout = new XMLLayout();
     layout.setProperties(true);
-    boolean saveAsZip = selectedFile.getName().toLowerCase().endsWith(".zip");
+    boolean saveAsZip = selectedFile.getName().toLowerCase(Locale.ENGLISH).endsWith(".zip");
     Writer writer = null;
     try {
       if (saveAsZip) {

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java (original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogFilePatternLayoutBuilder.java
Wed Aug 17 08:18:24 2011
 <at>  <at>  -25,6 +25,7  <at>  <at>  import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Properties;

 <at>  <at>  -191,7 +192,7  <at>  <at>  public class LogFilePatternLayoutBuilder
         Map.Entry appenderEntry = (Map.Entry)iter.next();
         String appenderName = appenderEntry.getKey().toString();
         String appenderClassName = appenderEntry.getValue().toString();
-        if (appenderClassName.toLowerCase().endsWith("fileappender")) {
+        if (appenderClassName.toLowerCase(Locale.ENGLISH).endsWith("fileappender")) {
           String layout = props.getProperty(appenderPrefix + "." + appenderName + ".layout");
           if (layout != null && layout.trim().equals("org.apache.log4j.PatternLayout")) {
             String conversion = props.getProperty(appenderPrefix + "." + appenderName + ".layout.ConversionPattern");
 <at>  <at>  -247,7 +248,7  <at>  <at>  public class LogFilePatternLayoutBuilder
         if (appenderAttributes.getNamedItem("name") != null && appenderClass != null &&
appenderClass.getNodeValue() != null) {
           //all log4j fileappenders end in fileappender..if a custom fileappender also ends in fileappender and
uses the same dom nodes to be loaded,
           //try to parse the nodes as well
-          if (appenderClass.getNodeValue().toLowerCase().endsWith("fileappender")) {
+          if (appenderClass.getNodeValue().toLowerCase(Locale.ENGLISH).endsWith("fileappender")) {
             String appenderName = appenderAttributes.getNamedItem("name").getNodeValue();
             //subclass of FileAppender - add it
             Map entry = new HashMap();
 <at>  <at>  -256,23 +257,23  <at>  <at>  public class LogFilePatternLayoutBuilder
               Node appenderChild = appenderChildren.item(j);
               if (appenderChild.getNodeName().equals("param") && appenderChild.hasAttributes()) {
                 Node fileNameNode = appenderChild.getAttributes().getNamedItem("name");
-                if (fileNameNode != null && fileNameNode.getNodeValue().toLowerCase().equals("file")) {
+                if (fileNameNode != null && fileNameNode.getNodeValue().equalsIgnoreCase("file")) {
                   Node fileValueNode = appenderChild.getAttributes().getNamedItem("value");
                   if (fileValueNode != null) {
                     entry.put("file", fileValueNode.getNodeValue());
                   }
                 }
               }
-              if (appenderChild.getNodeName().toLowerCase().equals("layout") &&
appenderChild.hasAttributes()) {
+              if (appenderChild.getNodeName().equalsIgnoreCase("layout") && appenderChild.hasAttributes()) {
                 NamedNodeMap layoutAttributes = appenderChild.getAttributes();
                 Node layoutNode = layoutAttributes.getNamedItem("class");
-                if (layoutNode != null && layoutNode.getNodeValue() != null &&
layoutNode.getNodeValue().equals("org.apache.log4j.PatternLayout")) {
+                if (layoutNode != null && layoutNode.getNodeValue() != null &&
layoutNode.getNodeValue().equalsIgnoreCase("org.apache.log4j.PatternLayout")) {
                   NodeList layoutChildren = appenderChild.getChildNodes();
                   for (int k = 0; k < layoutChildren.getLength(); k++) {
                     Node layoutChild = layoutChildren.item(k);
                     if (layoutChild.getNodeName().equals("param") && layoutChild.hasAttributes()) {
                       Node layoutName = layoutChild.getAttributes().getNamedItem("name");
-                      if (layoutName != null && layoutName.getNodeValue() != null &&
layoutName.getNodeValue().toLowerCase().equals("conversionpattern")) {
+                      if (layoutName != null && layoutName.getNodeValue() != null &&
layoutName.getNodeValue().equalsIgnoreCase("conversionpattern")) {
                         Node conversionValue = layoutChild.getAttributes().getNamedItem("value");
                         if (conversionValue != null) {
                           entry.put("conversion", conversionValue.getNodeValue());

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java Wed Aug 17
08:18:24 2011
 <at>  <at>  -67,6 +67,7  <at>  <at>  import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 import java.util.StringTokenizer;
 <at>  <at>  -532,7 +533,7  <at>  <at>  public class LogPanel extends DockablePa
         		}
             for (Iterator iter = preferenceModel.getVisibleColumnOrder().iterator();iter.hasNext();) {
               TableColumn c = (TableColumn)iter.next();
-              if (c.getHeaderValue().toString().toLowerCase().equals(ChainsawConstants.LOG4J_MARKER_COL_NAME_LOWERCASE))
+              if (c.getHeaderValue().toString().equalsIgnoreCase(ChainsawConstants.LOG4J_MARKER_COL_NAME_LOWERCASE))
               {
                 c.setCellEditor(markerCellEditor);
               }
 <at>  <at>  -4321,7 +4322,7  <at>  <at>  public class LogPanel extends DockablePa
                 List entriesCopy = new ArrayList(allEntries);
                 for (Iterator iter = entriesCopy.iterator();iter.hasNext();) {
                     String thisEntry = iter.next().toString();
-                    if (thisEntry.toLowerCase().contains(textToMatch.toLowerCase())) {
+                    if (thisEntry.toLowerCase(Locale.ENGLISH).contains(textToMatch.toLowerCase())) {
                         model.addElement(thisEntry);
                     }
                 }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java Wed Aug 17
08:18:24 2011
 <at>  <at>  -52,6 +52,7  <at>  <at>  import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;

 <at>  <at>  -290,12 +291,12  <at>  <at>  public class LogUI extends JFrame implem
           String lookAndFeelClassName = model.getLookAndFeelClassName();
           if (lookAndFeelClassName == null || lookAndFeelClassName.trim().equals("")) {
               String osName = System.getProperty("os.name");
-              if (osName.toLowerCase().startsWith("mac")) {
+              if (osName.toLowerCase(Locale.ENGLISH).startsWith("mac")) {
                   //no need to assign look and feel
-              } else if (osName.toLowerCase().startsWith("windows")) {
+              } else if (osName.toLowerCase(Locale.ENGLISH).startsWith("windows")) {
                   lookAndFeelClassName = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
                   model.setLookAndFeelClassName(lookAndFeelClassName);
-              } else if (osName.toLowerCase().startsWith("linux")) {
+              } else if (osName.toLowerCase(Locale.ENGLISH).startsWith("linux")) {
                   lookAndFeelClassName = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
                   model.setLookAndFeelClassName(lookAndFeelClassName);
               }
 <at>  <at>  -1453,7 +1454,7  <at>  <at>  public class LogUI extends JFrame implem
             for (Iterator iter = plugins.iterator();iter.hasNext();) {
                 Plugin plugin = (Plugin)iter.next();
                 //don't stop ZeroConfPlugin if it is registered
-                if (!plugin.getName().toLowerCase().contains("zeroconf")) {
+                if (!plugin.getName().toLowerCase(Locale.ENGLISH).contains("zeroconf")) {
                   pluginRegistry.stopPlugin(plugin.getName());
                 }
             }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java (original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ReceiverConfigurationPanel.java
Wed Aug 17 08:18:24 2011
 <at>  <at>  -34,6 +34,7  <at>  <at>  import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.List;

+import java.util.Locale;
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
 import javax.swing.ButtonGroup;
 <at>  <at>  -809,7 +810,7  <at>  <at>  class ReceiverConfigurationPanel extends

         boolean isPatternLayoutLogFormat() {
             Object item = logFileFormatTypeComboBox.getSelectedItem();
-            return item != null && item.toString().toLowerCase().contains("patternlayout");
+            return item != null && item.toString().toLowerCase(Locale.ENGLISH).contains("patternlayout");
         }

         String getLogFormatTimestampFormat() {

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java (original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/TableColorizingRenderer.java
Wed Aug 17 08:18:24 2011
 <at>  <at>  -400,7 +400,7  <at>  <at>  public class TableColorizingRenderer ext
         //find the property in the property set...case-sensitive
         for (Iterator iter = propertySet.iterator();iter.hasNext();) {
             String entry = iter.next().toString();
-            if (entry.toLowerCase().equals(headerName)) {
+            if (entry.equalsIgnoreCase(headerName)) {
                 thisProp = entry;
                 break;
             }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/SwingHelper.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/SwingHelper.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/SwingHelper.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/helper/SwingHelper.java
Wed Aug 17 08:18:24 2011
 <at>  <at>  -30,6 +30,7  <at>  <at>  import java.io.File;
 import java.util.ArrayList;
 import java.util.List;

+import java.util.Locale;
 import javax.swing.AbstractAction;
 import javax.swing.Action;
 import javax.swing.InputMap;
 <at>  <at>  -92,7 +93,7  <at>  <at>  public final class SwingHelper {
   }

   public static boolean isMacOSX() {
-    return System.getProperty("os.name").toLowerCase().startsWith("mac os x");
+    return System.getProperty("os.name").toLowerCase(Locale.ENGLISH).startsWith("mac os x");
   }

   public static List orderOKCancelButtons(JButton okButton, JButton cancelButton) {

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/PluginPropertyEditorPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/PluginPropertyEditorPanel.java?rev=1158566&r1=1158565&r2=1158566&view=diff
==============================================================================
---
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/PluginPropertyEditorPanel.java (original)
+++
logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/PluginPropertyEditorPanel.java
Wed Aug 17 08:18:24 2011
 <at>  <at>  -349,7 +349,7  <at>  <at>  public class PluginPropertyEditorPanel e

             if (columnIndex == 1) {
                 //ensure name is set
-                if (descriptors[rowIndex].getName().toLowerCase().equals("name") && (aValue == null ||
aValue.toString().trim().equals(""))) {
+                if (descriptors[rowIndex].getName().equalsIgnoreCase("name") && (aValue == null ||
aValue.toString().trim().equals(""))) {
                     logger.error("Name required");
                     return;
                 }


Gmane