Skip to content
Permalink
Browse files
Remove redundant initializations
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/jxpath/trunk@1716245 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
britter committed Nov 24, 2015
1 parent e689b62 commit 52f7a43b0b1fa236d32dfd03a7694fdc6d6bdc8f
Showing 8 changed files with 10 additions and 10 deletions.
@@ -105,7 +105,7 @@ public synchronized PropertyDescriptor[] getPropertyDescriptors() {
}
else {
try {
BeanInfo bi = null;
BeanInfo bi;
if (clazz.isInterface()) {
bi = Introspector.getBeanInfo(clazz);
}
@@ -220,7 +220,7 @@ private static String findFactory(String property, String defaultFactory) {
// try to find services in CLASSPATH
try {
ClassLoader cl = JXPathContextFactory.class.getClassLoader();
InputStream is = null;
InputStream is;
if (cl == null) {
is = ClassLoader.getSystemResourceAsStream(serviceId);
}
@@ -136,7 +136,7 @@ public static JXPathBeanInfo getBeanInfo(Class beanClass) {
* @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()) {
@@ -495,7 +495,7 @@ public Pointer createPath(String xpath) {
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 Pointer createPathAndSetValue(String xpath, Expression expr,
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 Function getFunction(QName functionName, Object[] parameters) {
String namespace = functionName.getPrefix();
String name = functionName.getName();
JXPathContext funcCtx = this;
Function func = null;
Function func;
Functions funcs;
while (funcCtx != null) {
funcs = funcCtx.getFunctions();
@@ -45,7 +45,7 @@ public static Object parseExpression(
Compiler compiler) {
synchronized (parser) {
parser.setCompiler(compiler);
Object expr = null;
Object expr;
try {
parser.ReInit(new StringReader(expression));
expr = parser.parseExpression();
@@ -882,7 +882,7 @@ private Object functionFormatNumber(EvalContext context) {
String pattern =
InfoSetUtil.stringValue(getArg2().computeValue(context));

DecimalFormatSymbols symbols = null;
DecimalFormatSymbols symbols;
if (getArgumentCount() == maxArgs) {
String symbolsName =
InfoSetUtil.stringValue(getArg3().computeValue(context));
@@ -75,7 +75,7 @@ public static NodePointer newNodePointer(
QName name,
Object bean,
Locale locale) {
NodePointer pointer = null;
NodePointer pointer;
if (bean == null) {
pointer = new NullPointer(name, locale);
return pointer;
@@ -120,7 +120,7 @@ public void setIndex(int index) {

public NodePointer getImmediateValuePointer() {
if (valuePointer == null) {
Object value = null;
Object value;
if (actual) {
value = getImmediateNode();
valuePointer =

0 comments on commit 52f7a43

Please sign in to comment.