commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r397427 - in /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser: ASTAddNode.java ASTBlock.java ASTEQNode.java ASTEmptyFunction.java ASTExpression.java ASTExpressionExpression.java ASTFalseNode.java
Date Thu, 27 Apr 2006 05:49:47 GMT
Author: dion
Date: Wed Apr 26 22:49:46 2006
New Revision: 397427

URL: http://svn.apache.org/viewcvs?rev=397427&view=rev
Log:
More checkstyle. {@inheritDoc} can't be used on constructors

Modified:
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAddNode.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/ASTEQNode.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEmptyFunction.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpression.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpressionExpression.java
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTFalseNode.java

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAddNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAddNode.java?rev=397427&r1=397426&r2=397427&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAddNode.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTAddNode.java
Wed Apr 26 22:49:46 2006
@@ -27,14 +27,12 @@
  */
 public class ASTAddNode extends SimpleNode {
     /**
-     * {@inheritDoc}
      */
     public ASTAddNode(int id) {
         super(id);
     }
 
     /**
-     * {@inheritDoc}
      */
     public ASTAddNode(Parser p, int id) {
         super(p, id);

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=397427&r1=397426&r2=397427&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 22:49:46 2006
@@ -33,7 +33,7 @@
         super(p, id);
     }
 
-    /** Accept the visitor. * */
+    /** {@inheritDoc} */
     public Object jjtAccept(ParserVisitor visitor, Object data) {
         return visitor.visit(this, data);
     }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEQNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEQNode.java?rev=397427&r1=397426&r2=397427&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEQNode.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEQNode.java
Wed Apr 26 22:49:46 2006
@@ -1,12 +1,12 @@
 /*
- * 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.
@@ -19,75 +19,58 @@
 import org.apache.commons.jexl.util.Coercion;
 
 /**
- *  represents equality between integers - use .equals() for strings
- *
- *  @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
- *  @version $Id$
+ * represents equality between integers - use .equals() for strings
+ * 
+ * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
+ * @version $Id$
  */
-public class ASTEQNode extends SimpleNode
-{
-    public ASTEQNode(int id)
-    {
+public class ASTEQNode extends SimpleNode {
+    public ASTEQNode(int id) {
         super(id);
     }
 
-    public ASTEQNode(Parser p, int id)
-    {
+    public ASTEQNode(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 pc)
-        throws Exception
-    {
-        Object left = ( (SimpleNode) jjtGetChild(0)).value(pc);
-        Object right = ( (SimpleNode) jjtGetChild(1)).value(pc);
+    public Object value(JexlContext pc) throws Exception {
+        Object left = ((SimpleNode) jjtGetChild(0)).value(pc);
+        Object right = ((SimpleNode) jjtGetChild(1)).value(pc);
 
-        if (left == null && right == null)
-        {
+        if (left == null && right == null) {
             /*
              * if both are null L == R
              */
             return Boolean.TRUE;
-        }
-        else if (left==null || right==null)
-        {
+        } else if (left == null || right == null) {
             /*
              * we know both aren't null, therefore L != R
              */
             return Boolean.FALSE;
-        }
-        else if (left.getClass().equals(right.getClass()))
-        {
+        } else if (left.getClass().equals(right.getClass())) {
             return left.equals(right) ? Boolean.TRUE : Boolean.FALSE;
-        }
-        else if(left instanceof Float || left instanceof Double ||
-                right instanceof Float || right instanceof Double)
-        {
+        } else if (left instanceof Float || left instanceof Double
+                || right instanceof Float || right instanceof Double) {
             Double l = Coercion.coerceDouble(left);
             Double r = Coercion.coerceDouble(right);
 
             return l.equals(r) ? Boolean.TRUE : Boolean.FALSE;
-        }
-        else if ( left instanceof Number || right instanceof Number ||
-                   left instanceof Character || right instanceof Character)
-        {
-            return Coercion.coerceLong(left).equals(Coercion.coerceLong(right)) 
-                ? Boolean.TRUE : Boolean.FALSE;
-        }
-        else if (left instanceof Boolean || right instanceof Boolean)
-        {
-            return Coercion.coerceBoolean(left).equals(Coercion.coerceBoolean(right))
-                ? Boolean.TRUE : Boolean.FALSE;
-        }
-        else if (left instanceof java.lang.String || right instanceof String)
-        {
-            return left.toString().equals(right.toString()) ? Boolean.TRUE : Boolean.FALSE;
+        } else if (left instanceof Number || right instanceof Number
+                || left instanceof Character || right instanceof Character) {
+            return Coercion.coerceLong(left).equals(Coercion.coerceLong(right)) ? Boolean.TRUE
+                    : Boolean.FALSE;
+        } else if (left instanceof Boolean || right instanceof Boolean) {
+            return Coercion.coerceBoolean(left).equals(
+                    Coercion.coerceBoolean(right)) ? Boolean.TRUE
+                    : Boolean.FALSE;
+        } else if (left instanceof java.lang.String || right instanceof String) {
+            return left.toString().equals(right.toString()) ? Boolean.TRUE
+                    : Boolean.FALSE;
         }
 
         return left.equals(right) ? Boolean.TRUE : Boolean.FALSE;

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEmptyFunction.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEmptyFunction.java?rev=397427&r1=397426&r2=397427&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEmptyFunction.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTEmptyFunction.java
Wed Apr 26 22:49:46 2006
@@ -29,12 +29,10 @@
  * @version $Id$
  */
 public class ASTEmptyFunction extends SimpleNode {
-    /** {@inheritDoc} */
     public ASTEmptyFunction(int id) {
         super(id);
     }
 
-    /** {@inheritDoc} */
     public ASTEmptyFunction(Parser p, int id) {
         super(p, id);
     }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpression.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpression.java?rev=397427&r1=397426&r2=397427&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpression.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpression.java
Wed Apr 26 22:49:46 2006
@@ -1,12 +1,12 @@
 /*
- * 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.
@@ -18,32 +18,26 @@
 import org.apache.commons.jexl.JexlContext;
 
 /**
- *  AST node for expression
- *  @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
- *  @version $Id$
+ * AST node for expression
+ * 
+ * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
+ * @version $Id$
  */
-public class ASTExpression extends SimpleNode
-{
-    public ASTExpression(int id)
-    {
+public class ASTExpression extends SimpleNode {
+    public ASTExpression(int id) {
         super(id);
     }
 
-    public ASTExpression(Parser p, int id)
-    {
+    public ASTExpression(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 context)
-            throws Exception
-    {
+    public Object value(JexlContext context) throws Exception {
         return ((SimpleNode) jjtGetChild(0)).value(context);
     }
 

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpressionExpression.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpressionExpression.java?rev=397427&r1=397426&r2=397427&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpressionExpression.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTExpressionExpression.java
Wed Apr 26 22:49:46 2006
@@ -1,12 +1,12 @@
 /*
- * 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.
@@ -19,33 +19,28 @@
 import org.apache.commons.jexl.JexlContext;
 
 /**
- *  represents equality between integers - use .equals() for strings
- *
- *  @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
- *  @version $Id$
+ * represents equality between integers - use .equals() for strings.
+ * 
+ * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
+ * @version $Id$
  */
-public class ASTExpressionExpression extends SimpleNode
-{
-    public ASTExpressionExpression(int id)
-    {
+public class ASTExpressionExpression extends SimpleNode {
+
+    public ASTExpressionExpression(int id) {
         super(id);
     }
 
-    public ASTExpressionExpression(Parser p, int id)
-    {
+    public ASTExpressionExpression(Parser p, int id) {
         super(p, id);
     }
 
-
-    /** Accept the visitor. **/
-    public Object jjtAccept(ParserVisitor visitor, Object data)
-    {
+    /** {@inheritDoc} */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
         return visitor.visit(this, data);
     }
 
-    public Object value(JexlContext context)
-        throws Exception
-    {
+    /** {@inheritDoc} */
+    public Object value(JexlContext context) throws Exception {
         return ((SimpleNode) jjtGetChild(0)).value(context);
     }
 }

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTFalseNode.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTFalseNode.java?rev=397427&r1=397426&r2=397427&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTFalseNode.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTFalseNode.java
Wed Apr 26 22:49:46 2006
@@ -1,12 +1,12 @@
 /*
- * 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.
@@ -18,32 +18,28 @@
 import org.apache.commons.jexl.JexlContext;
 
 /**
- *  represents Boolean false
- *
- *  @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
- *  @version $Id$
+ * represents Boolean false.
+ * 
+ * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
+ * @version $Id$
  */
-public class ASTFalseNode extends SimpleNode
-{
-    public ASTFalseNode(int id)
-    {
+public class ASTFalseNode extends SimpleNode {
+
+    public ASTFalseNode(int id) {
         super(id);
     }
 
-    public ASTFalseNode(Parser p, int id)
-    {
+    public ASTFalseNode(Parser p, int id) {
         super(p, id);
     }
 
-    /** Accept the visitor. **/
-    public Object jjtAccept(ParserVisitor visitor, Object data)
-    {
+    /** {@inheritDoc} */
+    public Object jjtAccept(ParserVisitor visitor, Object data) {
         return visitor.visit(this, data);
     }
 
-    public Object value(JexlContext jc)
-        throws Exception
-    {
+    /** {@inheritDoc} */
+    public Object value(JexlContext jc) throws Exception {
         return Boolean.FALSE;
     }
 }



---------------------------------------------------------------------
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