@@ -187,10 +187,11 @@ public java.util.Date FromCBORObject(CBORObject obj) {
187187 * through 23.</li> <li>3 - Minute of the hour, from 0 through 59.</li>
188188 * <li>4 - Second of the minute, from 0 through 59.</li> <li>5 -
189189 * Fractional seconds, expressed in nanoseconds. This value cannot be
190- * less than 0.</li> <li>6 - Number of minutes to subtract from this
191- * date and time to get global time. This number can be positive or
192- * negative, but cannot be less than -1439 or greater than 1439. For
193- * tags 0 and 1, this value is always 0.</li></ul>.
190+ * less than 0 and must be less than 1000*1000*1000.</li> <li>6 -
191+ * Number of minutes to subtract from this date and time to get global
192+ * time. This number can be positive or negative, but cannot be less
193+ * than -1439 or greater than 1439. For tags 0 and 1, this value is
194+ * always 0.</li></ul>.
194195 * @return Either {@code true} if the method is successful, or {@code false}
195196 * otherwise.
196197 * @throws NullPointerException The parameter {@code year} or {@code
@@ -374,11 +375,13 @@ public CBORObject DateTimeFieldsToCBORObject(EInteger bigYear, int[]
374375 if (lesserFields == null ) {
375376 throw new NullPointerException ("lesserFields" );
376377 }
378+ // TODO: Make into CBORException in next major version
377379 if (lesserFields .length < 7 ) {
378380 throw new IllegalArgumentException ("\" lesserFields\" + \" 's length\" (" +
379381 lesserFields .length + ") is not greater or equal to 7" );
380382 }
381383 try {
384+ CBORUtilities .CheckYearAndLesserFields (bigYear , lesserFields );
382385 switch (this .convType ) {
383386 case TaggedString : {
384387 String str = CBORUtilities .ToAtomDateTimeString (bigYear ,
0 commit comments