P_W999  committed 6c2f2d2

- findbugs

  • Participants
  • Parent commits 7ae3b59
  • Branches master

Comments (0)

Files changed (2)

File src/be/pw/jexif/

 				exifThread.wait(); // wait unconditionally for the notify, we must be sure all the threads are running.
+									//also: starting the ExifTool process normally takes long enough so that the wait can be reached before the notify is called.
 			LOG.debug("ExifTool-thread and subthreads started");
 		} catch (IOException e) {

File src/be/pw/jexif/internal/util/

-import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 public class DateUtil {
-	public static final DateFormat fmt = new SimpleDateFormat("YYYY:MM:dd HH:mm:ss.SS XXX");
 	public static String fromDate(final Date date) {
-		return fmt.format(date);
+		return new SimpleDateFormat("YYYY:MM:dd HH:mm:ss.SS XXX").format(date);	//not ideal, but see FindBugs bugs STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE 
 	public static Date toDate(final String date) throws ParseException {
-		return fmt.parse(date);
+		return new SimpleDateFormat("YYYY:MM:dd HH:mm:ss.SS XXX").parse(date);