@@ -187,10 +187,11 @@ public java.util.Date FromCBORObject(CBORObject obj) {
187
187
* through 23.</li> <li>3 - Minute of the hour, from 0 through 59.</li>
188
188
* <li>4 - Second of the minute, from 0 through 59.</li> <li>5 -
189
189
* 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>.
194
195
* @return Either {@code true} if the method is successful, or {@code false}
195
196
* otherwise.
196
197
* @throws NullPointerException The parameter {@code year} or {@code
@@ -374,11 +375,13 @@ public CBORObject DateTimeFieldsToCBORObject(EInteger bigYear, int[]
374
375
if (lesserFields == null ) {
375
376
throw new NullPointerException ("lesserFields" );
376
377
}
378
+ // TODO: Make into CBORException in next major version
377
379
if (lesserFields .length < 7 ) {
378
380
throw new IllegalArgumentException ("\" lesserFields\" + \" 's length\" (" +
379
381
lesserFields .length + ") is not greater or equal to 7" );
380
382
}
381
383
try {
384
+ CBORUtilities .CheckYearAndLesserFields (bigYear , lesserFields );
382
385
switch (this .convType ) {
383
386
case TaggedString : {
384
387
String str = CBORUtilities .ToAtomDateTimeString (bigYear ,
0 commit comments