logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psm...@apache.org
Subject cvs commit: jakarta-log4j/src/java/org/apache/log4j/chainsaw/layout LayoutEditorPane.java
Date Tue, 23 Sep 2003 23:28:06 GMT
psmith      2003/09/23 16:28:06

  Modified:    src/java/org/apache/log4j/chainsaw
                        ChainsawToolBarAndMenus.java LogUI.java
               tests/src/java/org/apache/log4j/rolling
                        TimeBasedRollingTest.java
               src/java/org/apache/log4j/chainsaw/rule RuleTest.java
               src/java/org/apache/log4j/chainsaw/layout
                        LayoutEditorPane.java
  Log:
  Applied patch contributed by Tim Emiola to keep
  the code base compatable with at least JDK 1.3.1. (a
  few 1.4 methods had sneaked in).
  
  Revision  Changes    Path
  1.16      +1 -1      jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java
  
  Index: ChainsawToolBarAndMenus.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ChainsawToolBarAndMenus.java	22 Sep 2003 06:58:45 -0000	1.15
  +++ ChainsawToolBarAndMenus.java	23 Sep 2003 23:28:06 -0000	1.16
  @@ -221,7 +221,7 @@
                     ((JCheckBoxMenuItem) panelMenuMap.get(entry.getKey())).getModel()
                      .setEnabled(newEnabled);
                     panelEnabledMap.put(
  -                    entry.getKey(), Boolean.valueOf(newEnabled));
  +                    entry.getKey(), new Boolean(newEnabled));
                   }
                 }
               }
  
  
  
  1.36      +1 -1      jakarta-log4j/src/java/org/apache/log4j/chainsaw/LogUI.java
  
  Index: LogUI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/LogUI.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- LogUI.java	23 Sep 2003 23:13:14 -0000	1.35
  +++ LogUI.java	23 Sep 2003 23:28:06 -0000	1.36
  @@ -929,7 +929,7 @@
         Map.Entry entry = (Map.Entry) iter.next();
         m.put(
           entry.getKey(),
  -        Boolean.valueOf(((DockablePanel) entry.getValue()).isDocked()));
  +        new Boolean(((DockablePanel) entry.getValue()).isDocked()));
       }
   
       return m;
  
  
  
  1.4       +5 -4      jakarta-log4j/tests/src/java/org/apache/log4j/rolling/TimeBasedRollingTest.java
  
  Index: TimeBasedRollingTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/tests/src/java/org/apache/log4j/rolling/TimeBasedRollingTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TimeBasedRollingTest.java	17 Sep 2003 18:03:16 -0000	1.3
  +++ TimeBasedRollingTest.java	23 Sep 2003 23:28:06 -0000	1.4
  @@ -62,6 +62,7 @@
   import java.text.SimpleDateFormat;
   
   import java.util.Calendar;
  +import java.util.Date;
   
   
   /**
  @@ -359,12 +360,12 @@
     void delayUntilNextSecond(int millis) {
       long now = System.currentTimeMillis();
       Calendar cal = Calendar.getInstance();
  -    cal.setTimeInMillis(now);
  +	cal.setTime(new Date(now));
   
       cal.set(Calendar.MILLISECOND, millis);
       cal.add(Calendar.SECOND, 1);
   
  -    long next = cal.getTimeInMillis();
  +    long next = cal.getTime().getTime();
   
       try {
         Thread.sleep(next - now);
  @@ -375,12 +376,12 @@
     void delayUntilNextMinute(int seconds) {
       long now = System.currentTimeMillis();
       Calendar cal = Calendar.getInstance();
  -    cal.setTimeInMillis(now);
  +	cal.setTime(new Date(now));
   
       cal.set(Calendar.SECOND, seconds);
       cal.add(Calendar.MINUTE, 1);
   
  -    long next = cal.getTimeInMillis();
  +	long next = cal.getTime().getTime();
   
       try {
         Thread.sleep(next - now);
  
  
  
  1.6       +3 -3      jakarta-log4j/src/java/org/apache/log4j/chainsaw/rule/RuleTest.java
  
  Index: RuleTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/rule/RuleTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RuleTest.java	19 Sep 2003 06:53:05 -0000	1.5
  +++ RuleTest.java	23 Sep 2003 23:28:06 -0000	1.6
  @@ -91,7 +91,7 @@
      *
      */
     public RuleTest(String booleanPostFixExpression, String inFixExpression) {
  -    setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  +    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
       getContentPane().setLayout(new BorderLayout());
   
   	final LoggingEventFieldResolver resolver = LoggingEventFieldResolver.getInstance();
  @@ -272,10 +272,10 @@
           if (booleanOperatorMap.containsKey(nextToken)) {
             BooleanOperator op = (BooleanOperator) booleanOperatorMap.get(nextToken);
   		  //the operator is responsible for popping the stack
  -          stack.push(Boolean.valueOf(op.evaluate(stack)));
  +          stack.push(new Boolean(op.evaluate(stack)));
           } else if (eventOperatorMap.containsKey(nextToken)) {
   			EventOperator op = (EventOperator)eventOperatorMap.get(nextToken);
  -			stack.push(Boolean.valueOf(op.evaluate(stack, event)));
  +			stack.push(new Boolean(op.evaluate(stack, event)));
   		} else { 
             //variables or constants are pushed onto the stack
             stack.push(nextToken);
  
  
  
  1.2       +1 -1      jakarta-log4j/src/java/org/apache/log4j/chainsaw/layout/LayoutEditorPane.java
  
  Index: LayoutEditorPane.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/layout/LayoutEditorPane.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LayoutEditorPane.java	4 Sep 2003 05:45:16 -0000	1.1
  +++ LayoutEditorPane.java	23 Sep 2003 23:28:06 -0000	1.2
  @@ -286,7 +286,7 @@
       JDialog dialog = new JDialog((Frame) null, "Pattern Editor");
       dialog.getContentPane().add(new LayoutEditorPane());
       dialog.setResizable(true);
  -    dialog.setDefaultCloseOperation(JDialog.EXIT_ON_CLOSE);
  +    dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
   
       //    dialog.pack();
       dialog.setSize(new Dimension(640, 480));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Mime
View raw message