From a5e9a788e8a8e6f48f073d277a5649fc8f663813 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 25 Aug 2019 14:58:17 +0100 Subject: [PATCH] Use var in isIf/getIf --- .../dev/openrs2/deob/ast/transform/IfElseTransformer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/IfElseTransformer.java b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/IfElseTransformer.java index 6a02d1bb..73f69951 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/IfElseTransformer.java +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/transform/IfElseTransformer.java @@ -1,7 +1,6 @@ package dev.openrs2.deob.ast.transform; import com.github.javaparser.ast.CompilationUnit; -import com.github.javaparser.ast.NodeList; import com.github.javaparser.ast.stmt.IfStmt; import com.github.javaparser.ast.stmt.Statement; import dev.openrs2.deob.ast.util.ExprUtils; @@ -11,7 +10,7 @@ public final class IfElseTransformer extends Transformer { if (stmt.isIfStmt()) { return true; } else if (stmt.isBlockStmt()) { - NodeList stmts = stmt.asBlockStmt().getStatements(); + var stmts = stmt.asBlockStmt().getStatements(); return stmts.size() == 1 && stmts.get(0).isIfStmt(); } else { return false; @@ -22,7 +21,7 @@ public final class IfElseTransformer extends Transformer { if (stmt.isIfStmt()) { return stmt.clone(); } else if (stmt.isBlockStmt()) { - NodeList stmts = stmt.asBlockStmt().getStatements(); + var stmts = stmt.asBlockStmt().getStatements(); if (stmts.size() == 1) { Statement head = stmts.get(0); if (head.isIfStmt()) {