title: Why does SimpleDateFormat.parse not throw an exception here?
body: <p>First of all please be aware I'm stuck with java6 here.</p>
  
  <p>I am trying to get a Date from a String that may come in different formats.
  For some reason I don't get a ParseException where I'd expect one...</p>
  
  <pre><code>    import java.text.SimpleDateFormat;
      import java.util.Date;
  
      public class test1{
  
        public static void main(String argc[]){
            System.out.println(parseAllDateFormats(argc[0]));
      }
  
        private static final String[] dateFormats = "yyyyMMdd,yyyy/MM/dd,yyyy-MM-dd,dd/MM/yyyy,dd-MM-yyyy,dd-MMM-yyyy,yyyy MM dd".split(",");
        public static Date parseAllDateFormats(String date) {
            if (date == null)
                return null;
            for (int f = 0; f &lt; dateFormats.length; f++) {
                String format = dateFormats[f];
                try {
                    SimpleDateFormat dateFormat = new SimpleDateFormat(format);
      System.out.println("trying " + format);                
                    return dateFormat.parse(date);
                }
                catch (Exception e) {}
            }
            return null;
        }
  
      }
  </code></pre>
  
  <p>run: 
  java test1 1980-04-25 </p>
  
  <p>I'd expect to get:</p>
  
  <blockquote>
  <pre><code>trying yyyyMMdd
  trying yyyy/MM/dd
  trying yyyy-MM-dd
  Fri Apr 25 00:00:00 EST 1980
  </code></pre>
  </blockquote>
  
  <p>But I only get:</p>
  
  <blockquote>
  <pre><code>trying yyyyMMdd
  Tue Dec 04 00:00:00 EST 1979
  </code></pre>
  </blockquote>
  
  <p>Any idea what's wrong?</p>