Reduce use of deprecated APIs

This commit is contained in:
Henning Poettker
2022-06-06 18:28:06 +02:00
committed by Mahmoud Ben Hassine
parent 451db9a968
commit 3ef199b92b
13 changed files with 43 additions and 78 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2018 the original author or authors.
* Copyright 2006-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -153,12 +153,10 @@ public class ExecutionContextTests {
context.put("5", s);
context.putInt("6", 6);
byte[] serialized = SerializationUtils.serialize(context);
ExecutionContext clone = SerializationUtils.clone(context);
ExecutionContext deserialized = (ExecutionContext) SerializationUtils.deserialize(serialized);
assertEquals(context, deserialized);
assertEquals(7, ((TestSerializable) deserialized.get("5")).value);
assertEquals(context, clone);
assertEquals(7, ((TestSerializable) clone.get("5")).value);
}
@Test

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2007 the original author or authors.
* Copyright 2006-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -76,17 +76,6 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean {
DataSourceInitializer.class.getSimpleName() + "-context.xml"));
}
/**
* @throws Throwable
* @see java.lang.Object#finalize()
*/
@Override
protected void finalize() throws Throwable {
logger.debug("finalize called for " + dataSource);
super.finalize();
initialized = false;
}
@Override
public void destroy() {
logger.info("destroy called for " + dataSource);