commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r397390 - in /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser: ASTAssignment.java ASTBitwiseAndNode.java ASTBitwiseComplNode.java ASTBitwiseOrNode.java ASTBitwiseXorNode.java ASTBlock.java ASTDivNode.java
Date Thu, 27 Apr 2006 04:25:10 GMT
Author: dion
Date: Wed Apr 26 21:25:06 2006
New Revision: 397390

URL: http://svn.apache.org/viewcvs?rev=397390&view=rev
Log:
More checkstyle

Modified:
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAssignment.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseAndNode.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseComplNode.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseOrNode.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseXorNode.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBlock.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTDivNode.java

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAssignment.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAssignment.java?rev=397390&r1=397389&r2=397390&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAssignment.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAssignment.java
Wed Apr 26 21:25:06 2006
@@ -1,4 +1,18 @@
-/* Generated By:JJTree: Do not edit this line. ASTAssignment.java */
+/*
+ * Copyright 2002-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
 
 package org.apache.commons.jexl.parser;
 
@@ -6,41 +20,41 @@
 
 /**
  * x = y, assigns a value to a variable in the context.
+ * 
  * @author Dion Gillard
- *
+ * 
  */
 public class ASTAssignment extends SimpleNode {
-  public ASTAssignment(int id) {
-    super(id);
-  }
-
-  public ASTAssignment(Parser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(ParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-
-  /**
-   * Handle assignment ( left = right ) 
-   */
-  public Object value(JexlContext context) throws Exception
-  {
-      // left should be the variable (reference) to assign to
-      SimpleNode left = (SimpleNode)jjtGetChild(0);
-      // right should be the expression to evaluate
-      Object right = ((SimpleNode) jjtGetChild(1)).value(context);
-      if (left instanceof ASTReference) {
-          ASTReference reference = (ASTReference)left;
-          left = (SimpleNode)reference.jjtGetChild(0);
-          if (left instanceof ASTIdentifier) {
-              String identifier = ((ASTIdentifier)left).getIdentifierString();
-              context.getVars().put(identifier,right);
-          }
-      }
-      return right;
-  }
+    public ASTAssignment(int id) {
+        super(id);
+    }
+
+    public ASTAssignment(Parser p, int id) {
+        super(p, id);
+    }
+
+    /** Accept the visitor. * */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+
+    /**
+     * Handle assignment ( left = right )
+     */
+    public Object value(JexlContext context) throws Exception {
+        // left should be the variable (reference) to assign to
+        SimpleNode left = (SimpleNode) jjtGetChild(0);
+        // right should be the expression to evaluate
+        Object right = ((SimpleNode) jjtGetChild(1)).value(context);
+        if (left instanceof ASTReference) {
+            ASTReference reference = (ASTReference) left;
+            left = (SimpleNode) reference.jjtGetChild(0);
+            if (left instanceof ASTIdentifier) {
+                String identifier = ((ASTIdentifier) left)
+                        .getIdentifierString();
+                context.getVars().put(identifier, right);
+            }
+        }
+        return right;
+    }
 }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseAndNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseAndNode.java?rev=397390&r1=397389&r2=397390&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseAndNode.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseAndNode.java
Wed Apr 26 21:25:06 2006
@@ -1,4 +1,18 @@
-/* Generated By:JJTree: Do not edit this line. ASTBitwiseAndNode.java */
+/*
+ * Copyright 2002-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
 
 package org.apache.commons.jexl.parser;
 
@@ -6,37 +20,34 @@
 import org.apache.commons.jexl.util.Coercion;
 
 /**
- * Bitwise And. Syntax:
- *      a & b
- * Result is a Long
+ * Bitwise And. Syntax: a & b Result is a Long
+ * 
  * @author Dion Gillard
  * @since 1.1
  */
 public class ASTBitwiseAndNode extends SimpleNode {
-  public ASTBitwiseAndNode(int id) {
-    super(id);
-  }
-
-  public ASTBitwiseAndNode(Parser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(ParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-  
-  /**
-   * @return a {@link Long} which is the bitwise and of the two operands.
-   */
-  public Object value(JexlContext context) throws Exception
-  {
-      Object left = ((SimpleNode) jjtGetChild(0)).value(context);
-      Object right = ((SimpleNode) jjtGetChild(1)).value(context);
-    
-      Long l = left == null ? new Long(0) : Coercion.coerceLong(left);
-      Long r = right == null ? new Long(0) : Coercion.coerceLong(right);
-      return new Long(l.longValue() & r.longValue());
-  }
+    public ASTBitwiseAndNode(int id) {
+        super(id);
+    }
+
+    public ASTBitwiseAndNode(Parser p, int id) {
+        super(p, id);
+    }
+
+    /** Accept the visitor. * */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+
+    /**
+     * @return a {@link Long} which is the bitwise and of the two operands.
+     */
+    public Object value(JexlContext context) throws Exception {
+        Object left = ((SimpleNode) jjtGetChild(0)).value(context);
+        Object right = ((SimpleNode) jjtGetChild(1)).value(context);
+
+        Long l = left == null ? new Long(0) : Coercion.coerceLong(left);
+        Long r = right == null ? new Long(0) : Coercion.coerceLong(right);
+        return new Long(l.longValue() & r.longValue());
+    }
 }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseComplNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseComplNode.java?rev=397390&r1=397389&r2=397390&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseComplNode.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseComplNode.java
Wed Apr 26 21:25:06 2006
@@ -1,4 +1,18 @@
-/* Generated By:JJTree: Do not edit this line. ASTBitwiseComplNode.java */
+/*
+ * Copyright 2002-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
 
 package org.apache.commons.jexl.parser;
 
@@ -6,36 +20,33 @@
 import org.apache.commons.jexl.util.Coercion;
 
 /**
- * Bitwise Complement. Syntax:
- *      ~a
- * Result is a Long
+ * Bitwise Complement. Syntax: ~a Result is a Long
+ * 
  * @author Dion Gillard
  * @since 1.1
  */
 public class ASTBitwiseComplNode extends SimpleNode {
-  public ASTBitwiseComplNode(int id) {
-    super(id);
-  }
-
-  public ASTBitwiseComplNode(Parser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(ParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-  
-  /**
-   * @return a {@link Long} which is the bitwise complement of the operand.
-   */
-  public Object value(JexlContext context) throws Exception
-  {
-      Object left = ((SimpleNode) jjtGetChild(0)).value(context);
-    
-      Long l = left == null ? new Long(0) : Coercion.coerceLong(left);
-      return new Long(~l.longValue());
-  }
+    public ASTBitwiseComplNode(int id) {
+        super(id);
+    }
+
+    public ASTBitwiseComplNode(Parser p, int id) {
+        super(p, id);
+    }
+
+    /** Accept the visitor. * */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+
+    /**
+     * @return a {@link Long} which is the bitwise complement of the operand.
+     */
+    public Object value(JexlContext context) throws Exception {
+        Object left = ((SimpleNode) jjtGetChild(0)).value(context);
+
+        Long l = left == null ? new Long(0) : Coercion.coerceLong(left);
+        return new Long(~l.longValue());
+    }
 
 }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseOrNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseOrNode.java?rev=397390&r1=397389&r2=397390&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseOrNode.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseOrNode.java
Wed Apr 26 21:25:06 2006
@@ -1,4 +1,18 @@
-/* Generated By:JJTree: Do not edit this line. ASTBitwiseOrNode.java */
+/*
+ * Copyright 2002-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
 
 package org.apache.commons.jexl.parser;
 
@@ -6,38 +20,35 @@
 import org.apache.commons.jexl.util.Coercion;
 
 /**
- * Bitwise Or. Syntax:
- *      a | b
- * Result is a Long
+ * Bitwise Or. Syntax: a | b Result is a Long
+ * 
  * @author Dion Gillard
  * @since 1.1
  */
 
 public class ASTBitwiseOrNode extends SimpleNode {
-  public ASTBitwiseOrNode(int id) {
-    super(id);
-  }
-
-  public ASTBitwiseOrNode(Parser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(ParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-
-  /**
-   * @return a {@link Long} which is the bitwise or of the two operands.
-   */
-  public Object value(JexlContext context) throws Exception
-  {
-      Object left = ((SimpleNode) jjtGetChild(0)).value(context);
-      Object right = ((SimpleNode) jjtGetChild(1)).value(context);
-    
-      Long l = left == null ? new Long(0) : Coercion.coerceLong(left);
-      Long r = right == null ? new Long(0) : Coercion.coerceLong(right);
-      return new Long(l.longValue() | r.longValue());
-  }
+    public ASTBitwiseOrNode(int id) {
+        super(id);
+    }
+
+    public ASTBitwiseOrNode(Parser p, int id) {
+        super(p, id);
+    }
+
+    /** Accept the visitor. * */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+
+    /**
+     * @return a {@link Long} which is the bitwise or of the two operands.
+     */
+    public Object value(JexlContext context) throws Exception {
+        Object left = ((SimpleNode) jjtGetChild(0)).value(context);
+        Object right = ((SimpleNode) jjtGetChild(1)).value(context);
+
+        Long l = left == null ? new Long(0) : Coercion.coerceLong(left);
+        Long r = right == null ? new Long(0) : Coercion.coerceLong(right);
+        return new Long(l.longValue() | r.longValue());
+    }
 }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseXorNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseXorNode.java?rev=397390&r1=397389&r2=397390&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseXorNode.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBitwiseXorNode.java
Wed Apr 26 21:25:06 2006
@@ -1,4 +1,18 @@
-/* Generated By:JJTree: Do not edit this line. ASTBitwiseXorNode.java */
+/*
+ * Copyright 2002-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
 
 package org.apache.commons.jexl.parser;
 
@@ -6,36 +20,34 @@
 import org.apache.commons.jexl.util.Coercion;
 
 /**
- * Bitwise Or. Syntax:
- *      a ^ b
- * Result is a Long
+ * Bitwise Or. Syntax: a ^ b Result is a Long
+ * 
  * @author Dion Gillard
  * @since 1.1
  */
 public class ASTBitwiseXorNode extends SimpleNode {
-  public ASTBitwiseXorNode(int id) {
-    super(id);
-  }
-
-  public ASTBitwiseXorNode(Parser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(ParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-  /**
-   * @return a {@link Long} which is the bitwise xor of the two operands.
-   */
-  public Object value(JexlContext context) throws Exception
-  {
-      Object left = ((SimpleNode) jjtGetChild(0)).value(context);
-      Object right = ((SimpleNode) jjtGetChild(1)).value(context);
-    
-      Long l = left == null ? new Long(0) : Coercion.coerceLong(left);
-      Long r = right == null ? new Long(0) : Coercion.coerceLong(right);
-      return new Long(l.longValue() ^ r.longValue());
-  }
+    public ASTBitwiseXorNode(int id) {
+        super(id);
+    }
+
+    public ASTBitwiseXorNode(Parser p, int id) {
+        super(p, id);
+    }
+
+    /** Accept the visitor. * */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+
+    /**
+     * @return a {@link Long} which is the bitwise xor of the two operands.
+     */
+    public Object value(JexlContext context) throws Exception {
+        Object left = ((SimpleNode) jjtGetChild(0)).value(context);
+        Object right = ((SimpleNode) jjtGetChild(1)).value(context);
+
+        Long l = left == null ? new Long(0) : Coercion.coerceLong(left);
+        Long r = right == null ? new Long(0) : Coercion.coerceLong(right);
+        return new Long(l.longValue() ^ r.longValue());
+    }
 }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBlock.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBlock.java?rev=397390&r1=397389&r2=397390&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBlock.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTBlock.java
Wed Apr 26 21:25:06 2006
@@ -1,13 +1,12 @@
-/* Generated By:JJTree: Do not edit this line. ASTBlock.java */
 /*
- * Copyright 2002,2004 The Apache Software Foundation.
- * 
+ * Copyright 2002-2006 The Apache Software Foundation.
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,37 +20,35 @@
 
 /**
  * { code }, a block of statements enclosed in curly braces.
+ * 
  * @author Dion Gillard
- *
+ * 
  */
 public class ASTBlock extends SimpleNode {
-  public ASTBlock(int id) {
-    super(id);
-  }
-
-  public ASTBlock(Parser p, int id) {
-    super(p, id);
-  }
-
-
-  /** Accept the visitor. **/
-  public Object jjtAccept(ParserVisitor visitor, Object data) {
-    return visitor.visit(this, data);
-  }
-
-  /**
-   * @return the value of the block.
-   * Execute all statements inside and return the value of the last.
-   */
-  public Object value(JexlContext context) throws Exception
-  {
-      int numChildren = jjtGetNumChildren();
-      Object result = null;
-      for(int i = 0; i < numChildren; i++)
-      {
-          result = ((SimpleNode) jjtGetChild(i)).value(context);
-      }
-      return result;
-  }
+    public ASTBlock(int id) {
+        super(id);
+    }
+
+    public ASTBlock(Parser p, int id) {
+        super(p, id);
+    }
+
+    /** Accept the visitor. * */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
+        return visitor.visit(this, data);
+    }
+
+    /**
+     * @return the value of the block. Execute all statements inside and return
+     *         the value of the last.
+     */
+    public Object value(JexlContext context) throws Exception {
+        int numChildren = jjtGetNumChildren();
+        Object result = null;
+        for (int i = 0; i < numChildren; i++) {
+            result = ((SimpleNode) jjtGetChild(i)).value(context);
+        }
+        return result;
+    }
 
 }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTDivNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTDivNode.java?rev=397390&r1=397389&r2=397390&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTDivNode.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTDivNode.java
Wed Apr 26 21:25:06 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003,2004 The Apache Software Foundation.
+ * Copyright 2003-2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,41 +19,35 @@
 import org.apache.commons.jexl.JexlContext;
 
 /**
- *  a / b, mathematical divide.
- *
- *  @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
- *  @version $Id$
+ * a / b, mathematical divide.
+ * 
+ * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
+ * @version $Id$
  */
-public class ASTDivNode extends SimpleNode
-{
-    public ASTDivNode(int id)
-    {
+public class ASTDivNode extends SimpleNode {
+    public ASTDivNode(int id) {
         super(id);
     }
 
-    public ASTDivNode(Parser p, int id)
-    {
+    public ASTDivNode(Parser p, int id) {
         super(p, id);
     }
 
-
-    /** Accept the visitor. **/
-    public Object jjtAccept(ParserVisitor visitor, Object data)
-    {
+    /** Accept the visitor. * */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
         return visitor.visit(this, data);
     }
 
-       public Object value(JexlContext jc)
-        throws Exception
-    {
+    public Object value(JexlContext jc) throws Exception {
         Object left = ((SimpleNode) jjtGetChild(0)).value(jc);
         Object right = ((SimpleNode) jjtGetChild(1)).value(jc);
 
         /*
-         *  the spec says 'and', I think 'or'
+         * the spec says 'and', I think 'or'
          */
-        if (left == null && right == null)
-            return new Byte((byte)0);
+        if (left == null && right == null) {
+            return new Byte((byte) 0);
+        }
 
         Double l = Coercion.coerceDouble(left);
         Double r = Coercion.coerceDouble(right);
@@ -61,8 +55,9 @@
         /*
          * catch div/0
          */
-        if (r.doubleValue() == 0.0)
+        if (r.doubleValue() == 0.0) {
             return new Double(0.0);
+        }
 
         return new Double(l.doubleValue() / r.doubleValue());
 



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


Mime
View raw message