diff --git a/src/org/jetbrains/java/decompiler/struct/attr/StructLocalVariableTableAttribute.java b/src/org/jetbrains/java/decompiler/struct/attr/StructLocalVariableTableAttribute.java index 1c80ef0..15fb317 100644 --- a/src/org/jetbrains/java/decompiler/struct/attr/StructLocalVariableTableAttribute.java +++ b/src/org/jetbrains/java/decompiler/struct/attr/StructLocalVariableTableAttribute.java @@ -1,14 +1,11 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.java.decompiler.struct.attr; import org.jetbrains.java.decompiler.struct.consts.ConstantPool; import org.jetbrains.java.decompiler.util.DataInputFullStream; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -67,7 +64,7 @@ public class StructLocalVariableTableAttribute extends StructGeneralAttribute { } public boolean containsName(String name) { - return localVariables.stream().anyMatch(v -> v.name == name); + return localVariables.stream().anyMatch(v -> Objects.equals(v.name, name)); } public Map getMapParamNames() { diff --git a/testData/classes/pkg/TestStaticNameClash.class b/testData/classes/pkg/TestStaticNameClash.class index 1573836..7ae890e 100644 Binary files a/testData/classes/pkg/TestStaticNameClash.class and b/testData/classes/pkg/TestStaticNameClash.class differ diff --git a/testData/results/TestStaticNameClash.dec b/testData/results/TestStaticNameClash.dec index 230983e..1c0f21a 100644 --- a/testData/results/TestStaticNameClash.dec +++ b/testData/results/TestStaticNameClash.dec @@ -3,8 +3,8 @@ package pkg; public class TestStaticNameClash { public static String property; - public static void setProperty(String var0) { - property = var0;// 8 + public static void setProperty(String property) { + TestStaticNameClash.property = property;// 8 }// 9 }