code-review 3

Java "Switch vs If which is better for String comparison"

아래 링크 참고 https://stackoverflow.com/questions/41635131/gradle-getting-the-root-project-directory-path-when-starting-with-a-custom-buil#comment72687129_41635558 Gradle: getting the root project directory path when starting with a custom build file The structure of my Gradle project is the following: Project ├── app └── build.gradle ├── foo └── bar.txt · · · └── build.gradle Normally to get the abs..

개발/Code review 2020.07.31

Code Review: Return Empty Collections Instead of Null

함수에서 null을 반환하지 않도록 구현할 때의 장점이 있다. 함수 반환값을 받은 뒤 null check를 안해도 된다. Java에서 반환값이 Collection 이면 empty collection을 반환하는 것이 Null을 반환하는 것보다 낫다. https://dzone.com/articles/10-tips-to-handle-null-effectively 10 Tips to Handle Null Effectively - DZone Java Nulls and the dreaded NPE can be awful, but by maintaining encapsulation, keeping your code simple, and using nulls only in certain situations, you c..

개발/Code review 2020.07.27