Avoid calling deprecated Date ctor
This commit is contained in:
parent
dfc6928957
commit
e20cbef134
|
|
@ -20,7 +20,7 @@ import java.io.File;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLClassLoader;
|
import java.net.URLClassLoader;
|
||||||
import java.util.Date;
|
import java.util.GregorianCalendar;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
@ -97,7 +97,9 @@ public class TestScenarioCreator {
|
||||||
* @param testContext the evaluation context in which to set the root object
|
* @param testContext the evaluation context in which to set the root object
|
||||||
*/
|
*/
|
||||||
private static void setupRootContextObject(StandardEvaluationContext testContext) {
|
private static void setupRootContextObject(StandardEvaluationContext testContext) {
|
||||||
Inventor tesla = new Inventor("Nikola Tesla", new Date(1856, 7, 9), "Serbian");
|
GregorianCalendar c = new GregorianCalendar();
|
||||||
|
c.set(1856, 7, 9);
|
||||||
|
Inventor tesla = new Inventor("Nikola Tesla", c.getTime(), "Serbian");
|
||||||
tesla.setPlaceOfBirth(new PlaceOfBirth("SmilJan"));
|
tesla.setPlaceOfBirth(new PlaceOfBirth("SmilJan"));
|
||||||
tesla.setInventions(new String[] { "Telephone repeater", "Rotating magnetic field principle",
|
tesla.setInventions(new String[] { "Telephone repeater", "Rotating magnetic field principle",
|
||||||
"Polyphase alternating-current system", "Induction motor", "Alternating-current power transmission",
|
"Polyphase alternating-current system", "Induction motor", "Alternating-current power transmission",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue