Last active
July 12, 2016 21:18
-
-
Save feststelltaste/e595146b595a630bceaa11e51bb9dfa9 to your computer and use it in GitHub Desktop.
Exaggerated ReviewCodeExample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReviewCodeExample { | |
public static String ID = "review.example"; | |
public BigDecimal getFactor() { | |
return new BigDecimal(0.1); | |
} | |
public Collection<String> getCarNames() { | |
List<Car> cars = getCarsFromDatabase(); | |
List<String> carNames = new ArrayList(cars.size()); | |
for (Car car : cars) { | |
if (!carNames.contains(car)) | |
carNames.add(car.getName()); | |
} | |
return carNames; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exaggerated code review findings for the code example (from @rgra) above:
This is the result of a code review if senseless code review instructions exist in your company.
Please maintain common sense in software development.
Many thanks to @rgra for her great talk about code reviews at Java Forum Stuttgart 2016!