@@ -223,7 +223,6 @@ void handleMessageReturnsHandlerThatAcceptsMessage() {
223
223
assertThat (messages ).hasSize (1 );
224
224
assertThat (messages .get (0 )).startsWith ("Unable to instantiate factory class" );
225
225
}
226
-
227
226
}
228
227
229
228
@@ -292,9 +291,9 @@ void andResolverReturnsComposite() {
292
291
assertThat (resolver .resolve (Integer .class )).isEqualTo (123 );
293
292
assertThat (resolver .resolve (Long .class )).isEqualTo (234L );
294
293
}
295
-
296
294
}
297
295
296
+
298
297
@ Nested
299
298
class FactoryInstantiatorTests {
300
299
@@ -350,14 +349,12 @@ void multiplePackagePrivateConstructorsThrowsException() {
350
349
}
351
350
352
351
static class DefaultConstructor {
353
-
354
352
}
355
353
356
354
static class SingleConstructor {
357
355
358
356
SingleConstructor (String arg ) {
359
357
}
360
-
361
358
}
362
359
363
360
static class MultiplePrivateAndSinglePublicConstructor {
@@ -368,7 +365,6 @@ public MultiplePrivateAndSinglePublicConstructor(String arg) {
368
365
369
366
private MultiplePrivateAndSinglePublicConstructor (String arg , boolean extra ) {
370
367
}
371
-
372
368
}
373
369
374
370
static class MultiplePackagePrivateAndSinglePublicConstructor {
@@ -379,22 +375,18 @@ public MultiplePackagePrivateAndSinglePublicConstructor(String arg) {
379
375
380
376
MultiplePackagePrivateAndSinglePublicConstructor (String arg , boolean extra ) {
381
377
}
382
-
383
378
}
384
379
385
-
386
380
static class SinglePackagePrivateConstructor {
387
381
388
382
SinglePackagePrivateConstructor (String arg ) {
389
383
}
390
-
391
384
}
392
385
393
386
static class SinglePrivateConstructor {
394
387
395
388
private SinglePrivateConstructor (String arg ) {
396
389
}
397
-
398
390
}
399
391
400
392
static class MultiplePackagePrivateConstructors {
@@ -405,11 +397,10 @@ static class MultiplePackagePrivateConstructors {
405
397
406
398
MultiplePackagePrivateConstructors (String arg , boolean extra ) {
407
399
}
408
-
409
400
}
410
-
411
401
}
412
402
403
+
413
404
private static class LimitedClassLoader extends URLClassLoader {
414
405
415
406
private static final ClassLoader constructorArgumentFactories = new LimitedClassLoader ("constructor-argument-factories" );
@@ -428,7 +419,6 @@ private static URL toUrl(String location) {
428
419
throw new IllegalStateException (ex );
429
420
}
430
421
}
431
-
432
422
}
433
423
434
424
}
0 commit comments