@@ -193,8 +193,6 @@ public void testIterator()
193
193
/**
194
194
* Test for verifying that parametric types can be constructed
195
195
* programmatically
196
- *
197
- * @since 1.5
198
196
*/
199
197
public void testParametricTypes ()
200
198
{
@@ -277,10 +275,7 @@ public void testCanonicalNames()
277
275
/* Unit tests: low-level inheritance resolution
278
276
/**********************************************************
279
277
*/
280
-
281
- /**
282
- * @since 1.6
283
- */
278
+
284
279
public void testSuperTypeDetectionClass ()
285
280
{
286
281
TypeFactory tf = TypeFactory .defaultInstance ();
@@ -294,10 +289,7 @@ public void testSuperTypeDetectionClass()
294
289
assertSame (HashMap .class , sup2 .getRawClass ());
295
290
assertNull (sup2 .getSuperType ());
296
291
}
297
-
298
- /**
299
- * @since 1.6
300
- */
292
+
301
293
public void testSuperTypeDetectionInterface ()
302
294
{
303
295
// List first
@@ -324,9 +316,6 @@ public void testSuperTypeDetectionInterface()
324
316
assertNull (sup2 .getSuperType ());
325
317
}
326
318
327
- /**
328
- * @since 1.6
329
- */
330
319
public void testAtomicArrayRefParameterDetection ()
331
320
{
332
321
TypeFactory tf = TypeFactory .defaultInstance ();
@@ -352,10 +341,7 @@ private int _countSupers(HierarchicType t)
352
341
/* Unit tests: map/collection type parameter resolution
353
342
/**********************************************************
354
343
*/
355
-
356
- /**
357
- * @since 1.6
358
- */
344
+
359
345
public void testMapTypesSimple ()
360
346
{
361
347
TypeFactory tf = TypeFactory .defaultInstance ();
@@ -365,9 +351,6 @@ public void testMapTypesSimple()
365
351
assertEquals (tf .constructType (Boolean .class ), mapType .getContentType ());
366
352
}
367
353
368
- /**
369
- * @since 1.6
370
- */
371
354
public void testMapTypesRaw ()
372
355
{
373
356
TypeFactory tf = TypeFactory .defaultInstance ();
@@ -377,9 +360,6 @@ public void testMapTypesRaw()
377
360
assertEquals (tf .constructType (Object .class ), mapType .getContentType ());
378
361
}
379
362
380
- /**
381
- * @since 1.6
382
- */
383
363
public void testMapTypesAdvanced ()
384
364
{
385
365
TypeFactory tf = TypeFactory .defaultInstance ();
@@ -402,8 +382,6 @@ public void testMapTypesAdvanced()
402
382
/**
403
383
* Specific test to verify that complicate name mangling schemes
404
384
* do not fool type resolver
405
- *
406
- * @since 1.6
407
385
*/
408
386
public void testMapTypesSneaky ()
409
387
{
@@ -416,8 +394,6 @@ public void testMapTypesSneaky()
416
394
417
395
/**
418
396
* Plus sneaky types may be found via introspection as well.
419
- *
420
- * @since 1.7
421
397
*/
422
398
public void testSneakyFieldTypes () throws Exception
423
399
{
@@ -438,8 +414,6 @@ public void testSneakyFieldTypes() throws Exception
438
414
439
415
/**
440
416
* Looks like type handling actually differs for properties, too.
441
- *
442
- * @since 1.7
443
417
*/
444
418
public void testSneakyBeanProperties () throws Exception
445
419
{
@@ -533,5 +507,16 @@ public void testMoreSpecificType()
533
507
assertSame (t1 , tf .moreSpecificType (t1 , t2 ));
534
508
assertSame (t2 , tf .moreSpecificType (t2 , t1 ));
535
509
}
510
+
511
+ // [Issue#489]
512
+ public void testCacheClearing ()
513
+ {
514
+ TypeFactory tf = TypeFactory .defaultInstance ().withModifier (null );
515
+ assertEquals (0 , tf ._typeCache .size ());
516
+ tf .constructType (getClass ());
517
+ assertEquals (1 , tf ._typeCache .size ());
518
+ tf .clearCache ();
519
+ assertEquals (0 , tf ._typeCache .size ());
520
+ }
536
521
}
537
522
0 commit comments