@NotNull annotation 의 장점 @NotNull annotation 의 장점 http://robaustin.wikidot.com/annotations-and-notnullhttps://www.jetbrains.com/idea/documentation/howto.html - Find Bugs 와 IntelliJ 는 null check annotation 을 지원한다. 코드 가독성 측면에서 좋지 않다는 이야기도 있지만, 그건 케바케. - function 의 param 에 null 이 들어오면 RuntimeException 을 던지도록 처리하는 것이 좋다.public void testMethodNotNull( @NotNull String param ){ // do sth.}만약 method 선언부에 @NotNull 을 선언하면, valida.. 2015. 6. 23. 반응형 이전 1 다음