NicMcPhee/CraftBukkit — pull request #12 by Ottomoeller (2014-05-01 02:53:19+00:00)
Title: Reducing equals method in CraftBlockState

The Issue:
There were a great deal of if/else statements in the equals method, and a good deal of the if statements were very similar to each other and performed the same actions if true.

Justification:
These changes reduced the number of lines and increases readability.

Break Down:
We extracted the lines from 178 to right before the last return in the method and set the last return to return what our extracted method results in. Then we just moved all the conditions for the if statements that were similar in the equals method into one if statement. Line 182 to 184 in our code is the extent of the change.