Adapt to java 8 convention