Optional<T> : T == null 코드 삭제 구글 실험소의 메일 보내기 취소 라는 기능이 생겨 구현 중인데... 이넘의 null 처리가 왜이리 보기가 싫은지. public boolean isCancelMail(String sender, String storeKey) { if(cancelStore.containsKey(sender)){ final Optional list = Optional.of(cancelStore.get(sender)); return list.isPresent() && list.get().contains(storeKey); } return false; } 나쁘지 않군. 더보기 Java 8 Launch video http://www.oracle.com/events/us/en/java8/index.html 더보기 protocols-pop3 ㅁ SMTP , POP, IMAP 중에 pop 이 그나마 만만해보여서 먼저~ @PostConstruct public void init() throws Exception { servers = createServers(log, config); for (AbstractConfigurableAsyncServer server: servers) { server.init(); } } @PostConstruct public final void init() throws Exception { if (isEnabled()) { buildSSLContext(); preInit(); executionHandler = createExecutionHander(); bind(); mbeanServer = ManagementFacto.. 더보기 이전 1 ··· 7 8 9 10 11 12 13 ··· 16 다음