1
1
/*
2
- * Copyright 2002-2013 the original author or authors.
2
+ * Copyright 2002-2016 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -258,6 +258,7 @@ public void resolveRequiredPlaceholders_withNullInput() {
258
258
}
259
259
260
260
@ Test
261
+ @ SuppressWarnings ("deprecation" )
261
262
public void getPropertyAsClass () throws ClassNotFoundException , LinkageError {
262
263
MutablePropertySources propertySources = new MutablePropertySources ();
263
264
propertySources .addFirst (new MockPropertySource ().withProperty ("some.class" , SpecificType .class .getName ()));
@@ -266,6 +267,7 @@ public void getPropertyAsClass() throws ClassNotFoundException, LinkageError {
266
267
}
267
268
268
269
@ Test
270
+ @ SuppressWarnings ("deprecation" )
269
271
public void getPropertyAsClass_withInterfaceAsTarget () throws ClassNotFoundException , LinkageError {
270
272
MutablePropertySources propertySources = new MutablePropertySources ();
271
273
propertySources .addFirst (new MockPropertySource ().withProperty ("some.class" , SomeType .class .getName ()));
@@ -274,6 +276,7 @@ public void getPropertyAsClass_withInterfaceAsTarget() throws ClassNotFoundExcep
274
276
}
275
277
276
278
@ Test (expected = ConversionException .class )
279
+ @ SuppressWarnings ("deprecation" )
277
280
public void getPropertyAsClass_withMismatchedTypeForValue () {
278
281
MutablePropertySources propertySources = new MutablePropertySources ();
279
282
propertySources .addFirst (new MockPropertySource ().withProperty ("some.class" , "java.lang.String" ));
@@ -282,6 +285,7 @@ public void getPropertyAsClass_withMismatchedTypeForValue() {
282
285
}
283
286
284
287
@ Test (expected = ConversionException .class )
288
+ @ SuppressWarnings ("deprecation" )
285
289
public void getPropertyAsClass_withNonExistentClassForValue () {
286
290
MutablePropertySources propertySources = new MutablePropertySources ();
287
291
propertySources .addFirst (new MockPropertySource ().withProperty ("some.class" , "some.bogus.Class" ));
@@ -290,6 +294,7 @@ public void getPropertyAsClass_withNonExistentClassForValue() {
290
294
}
291
295
292
296
@ Test
297
+ @ SuppressWarnings ("deprecation" )
293
298
public void getPropertyAsClass_withObjectForValue () {
294
299
MutablePropertySources propertySources = new MutablePropertySources ();
295
300
propertySources .addFirst (new MockPropertySource ().withProperty ("some.class" , new SpecificType ()));
@@ -298,6 +303,7 @@ public void getPropertyAsClass_withObjectForValue() {
298
303
}
299
304
300
305
@ Test (expected = ConversionException .class )
306
+ @ SuppressWarnings ("deprecation" )
301
307
public void getPropertyAsClass_withMismatchedObjectForValue () {
302
308
MutablePropertySources propertySources = new MutablePropertySources ();
303
309
propertySources .addFirst (new MockPropertySource ().withProperty ("some.class" , new Integer (42 )));
@@ -306,6 +312,7 @@ public void getPropertyAsClass_withMismatchedObjectForValue() {
306
312
}
307
313
308
314
@ Test
315
+ @ SuppressWarnings ("deprecation" )
309
316
public void getPropertyAsClass_withRealClassForValue () {
310
317
MutablePropertySources propertySources = new MutablePropertySources ();
311
318
propertySources .addFirst (new MockPropertySource ().withProperty ("some.class" , SpecificType .class ));
@@ -314,6 +321,7 @@ public void getPropertyAsClass_withRealClassForValue() {
314
321
}
315
322
316
323
@ Test (expected = ConversionException .class )
324
+ @ SuppressWarnings ("deprecation" )
317
325
public void getPropertyAsClass_withMismatchedRealClassForValue () {
318
326
MutablePropertySources propertySources = new MutablePropertySources ();
319
327
propertySources .addFirst (new MockPropertySource ().withProperty ("some.class" , Integer .class ));
0 commit comments