commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1716245 - in /commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath: ./ ri/ ri/compiler/ ri/model/
Date Tue, 24 Nov 2015 20:28:39 GMT
Author: britter
Date: Tue Nov 24 20:28:39 2015
New Revision: 1716245

URL: http://svn.apache.org/viewvc?rev=1716245&view=rev
Log:
Remove redundant initializations

Modified:
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathIntrospector.java
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/Parser.java
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java
    commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/VariablePointer.java

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java?rev=1716245&r1=1716244&r2=1716245&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
(original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
Tue Nov 24 20:28:39 2015
@@ -105,7 +105,7 @@ public class JXPathBasicBeanInfo impleme
             }
             else {
                 try {
-                    BeanInfo bi = null;
+                    BeanInfo bi;
                     if (clazz.isInterface()) {
                         bi = Introspector.getBeanInfo(clazz);
                     }

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java?rev=1716245&r1=1716244&r2=1716245&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java
(original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java
Tue Nov 24 20:28:39 2015
@@ -220,7 +220,7 @@ public abstract class JXPathContextFacto
         // try to find services in CLASSPATH
         try {
             ClassLoader cl = JXPathContextFactory.class.getClassLoader();
-            InputStream is = null;
+            InputStream is;
             if (cl == null) {
                 is = ClassLoader.getSystemResourceAsStream(serviceId);
             }

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathIntrospector.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathIntrospector.java?rev=1716245&r1=1716244&r2=1716245&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathIntrospector.java
(original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/JXPathIntrospector.java
Tue Nov 24 20:28:39 2015
@@ -136,7 +136,7 @@ public class JXPathIntrospector {
      * @return JXPathBeanInfo
      */
     private static JXPathBeanInfo findDynamicBeanInfo(Class beanClass) {
-        JXPathBeanInfo beanInfo = null;
+        JXPathBeanInfo beanInfo;
         if (beanClass.isInterface()) {
             beanInfo = (JXPathBeanInfo) byInterface.get(beanClass);
             if (beanInfo != null && beanInfo.isDynamic()) {

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java?rev=1716245&r1=1716244&r2=1716245&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
(original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java
Tue Nov 24 20:28:39 2015
@@ -495,7 +495,7 @@ public class JXPathContextReferenceImpl
     public Pointer createPath(String xpath, Expression expr) {
         try {
             Object result = expr.computeValue(getEvalContext());
-            Pointer pointer = null;
+            Pointer pointer;
 
             if (result instanceof Pointer) {
                 pointer = (Pointer) result;
@@ -552,7 +552,7 @@ public class JXPathContextReferenceImpl
     private Pointer setValue(String xpath, Expression expr, Object value,
             boolean create) {
         Object result = expr.computeValue(getEvalContext());
-        Pointer pointer = null;
+        Pointer pointer;
 
         if (result instanceof Pointer) {
             pointer = (Pointer) result;
@@ -734,7 +734,7 @@ public class JXPathContextReferenceImpl
         String namespace = functionName.getPrefix();
         String name = functionName.getName();
         JXPathContext funcCtx = this;
-        Function func = null;
+        Function func;
         Functions funcs;
         while (funcCtx != null) {
             funcs = funcCtx.getFunctions();

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/Parser.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/Parser.java?rev=1716245&r1=1716244&r2=1716245&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/Parser.java (original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/Parser.java Tue
Nov 24 20:28:39 2015
@@ -45,7 +45,7 @@ public class Parser {
         Compiler compiler) {
         synchronized (parser) {
             parser.setCompiler(compiler);
-            Object expr = null;
+            Object expr;
             try {
                 parser.ReInit(new StringReader(expression));
                 expr = parser.parseExpression();

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java?rev=1716245&r1=1716244&r2=1716245&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
(original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/compiler/CoreFunction.java
Tue Nov 24 20:28:39 2015
@@ -882,7 +882,7 @@ public class CoreFunction extends Operat
         String pattern =
             InfoSetUtil.stringValue(getArg2().computeValue(context));
 
-        DecimalFormatSymbols symbols = null;
+        DecimalFormatSymbols symbols;
         if (getArgumentCount() == maxArgs) {
             String symbolsName =
                 InfoSetUtil.stringValue(getArg3().computeValue(context));

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java?rev=1716245&r1=1716244&r2=1716245&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java
(original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/NodePointer.java
Tue Nov 24 20:28:39 2015
@@ -75,7 +75,7 @@ public abstract class NodePointer implem
         QName name,
         Object bean,
         Locale locale) {
-        NodePointer pointer = null;
+        NodePointer pointer;
         if (bean == null) {
             pointer = new NullPointer(name, locale);
             return pointer;

Modified: commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/VariablePointer.java
URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/VariablePointer.java?rev=1716245&r1=1716244&r2=1716245&view=diff
==============================================================================
--- commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/VariablePointer.java
(original)
+++ commons/proper/jxpath/trunk/src/main/java/org/apache/commons/jxpath/ri/model/VariablePointer.java
Tue Nov 24 20:28:39 2015
@@ -120,7 +120,7 @@ public class VariablePointer extends Nod
 
     public NodePointer getImmediateValuePointer() {
         if (valuePointer == null) {
-            Object value = null;
+            Object value;
             if (actual) {
                 value = getImmediateNode();
                 valuePointer =



Mime
View raw message