> On Aug. 5, 2016, 2:58 p.m., Robert Levas wrote: > > ambari-server/src/main/java/org/apache/ambari/server/api/DateJsonDeserializer.java, > > line 42 > > <https://reviews.apache.org/r/50850/diff/1/?file=1464264#file1464264line42> > > > > From http://docs.oracle.com/javase/7/docs/api/java/text/DateFormat.html: > > > > ``` > > Date formats are not synchronized. It is recommended to create separate > > format instances for each thread. If multiple threads access a format > > concurrently, it must be synchronized externally. > > ``` > > > > So either this method should be synchornized, or each separate call to > > the different DateFormat instances should be synchronized.
I missed this. Now parsing dates in synchronized method as suggested. - Gaurav ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50850/#review144928 ----------------------------------------------------------- On Aug. 5, 2016, 6:19 p.m., Gaurav Nagar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50850/ > ----------------------------------------------------------- > > (Updated Aug. 5, 2016, 6:19 p.m.) > > > Review request for Ambari, DIPAYAN BHOWMICK, Nitiraj Rathore, Pallav > Kulshreshtha, Rohit Choudhary, Robert Levas, and Ashwin Rajeev. > > > Bugs: AMBARI-18045 > https://issues.apache.org/jira/browse/AMBARI-18045 > > > Repository: ambari > > > Description > ------- > > Added date deserializer for parsing epoch time. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/api/DateJsonDeserializer.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/api/GsonJsonProvider.java > 8ba9ff7 > > ambari-server/src/test/java/org/apache/ambari/server/api/TestDateDeserializer.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/50850/diff/ > > > Testing > ------- > > Manually Tested > > > Thanks, > > Gaurav Nagar > >