fateh288 commented on code in PR #447: URL: https://github.com/apache/ranger/pull/447#discussion_r1880949513
########## tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/AtlasRESTTagSource.java: ########## @@ -68,16 +68,13 @@ public class AtlasRESTTagSource extends AbstractTagSource implements Runnable { private static final Logger LOG = LoggerFactory.getLogger(AtlasRESTTagSource.class); - private static final ThreadLocal<DateFormat> DATE_FORMATTER = new ThreadLocal<DateFormat>() { - @Override - protected DateFormat initialValue() { - SimpleDateFormat dateFormat = new SimpleDateFormat(AtlasBaseTypeDef.SERIALIZED_DATE_FORMAT_STR); + private static final ThreadLocal<DateFormat> DATE_FORMATTER = ThreadLocal.withInitial(() -> { + SimpleDateFormat dateFormat = new SimpleDateFormat(AtlasBaseTypeDef.SERIALIZED_DATE_FORMAT_STR); Review Comment: @kulkabhay @kumaab @mneethiraj @dineshkumar-yadav This was suggested by IntelliJ. Seems fine to me but wanted second opinion -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org