Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaces String == comparison with .equals() #183

Merged
merged 1 commit into from
Sep 29, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/appeng/integration/modules/FMP.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public TMultiPart createPart(String name, boolean client)
{
for (PartRegistry pr : PartRegistry.values())
{
if ( pr.getName() == name )
if ( pr.getName().equals( name ) )
return pr.construct( 0 );
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/items/tools/ToolMemoryCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public String getSettingsName(ItemStack is)
{
NBTTagCompound c = Platform.openNbtData( is );
String name = c.getString( "Config" );
return name == null || name == "" ? GuiText.Blank.getUnlocalized() : name;
return name == null || name.equals( "" ) ? GuiText.Blank.getUnlocalized() : name;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void addInformation(ItemStack i, EntityPlayer p, List l, boolean b)
{
String encKey = tag.getString( "encryptionKey" );

if ( encKey == null || encKey == "" )
if ( encKey == null || encKey.equals( "" ) )
l.add( GuiText.Unlinked.getLocal() );
else
l.add( GuiText.Linked.getLocal() );
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/appeng/util/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public static boolean NBTEqualityTest(NBTBase A, NBTBase B)
return ((NBTTagLong) A).func_150291_c() == ((NBTTagLong) B).func_150291_c();

case 8: // else if ( A instanceof NBTTagString )
return ((NBTTagString) A).func_150285_a_() == ((NBTTagString) B).func_150285_a_()
return ((NBTTagString) A).func_150285_a_().equals( ((NBTTagString) B).func_150285_a_() )
|| ((NBTTagString) A).func_150285_a_().equals( ((NBTTagString) B).func_150285_a_() );

case 6: // else if ( A instanceof NBTTagDouble )
Expand Down