Reduce use of deprecated APIs
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
451db9a968
commit
3ef199b92b
@@ -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.
|
||||
@@ -54,10 +54,8 @@ public class ChunkRequestTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSerializable() throws Exception {
|
||||
@SuppressWarnings("unchecked")
|
||||
ChunkRequest<String> result = (ChunkRequest<String>) SerializationUtils
|
||||
.deserialize(SerializationUtils.serialize(request));
|
||||
public void testSerializable() {
|
||||
ChunkRequest<String> result = SerializationUtils.clone(request);
|
||||
assertNotNull(result.getStepContribution());
|
||||
assertEquals(111L, result.getJobId());
|
||||
assertEquals(2, result.getItems().size());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2021 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.
|
||||
@@ -47,8 +47,8 @@ public class ChunkResponseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSerializable() throws Exception {
|
||||
ChunkResponse result = (ChunkResponse) SerializationUtils.deserialize(SerializationUtils.serialize(response));
|
||||
public void testSerializable() {
|
||||
ChunkResponse result = SerializationUtils.clone(response);
|
||||
assertNotNull(result.getStepContribution());
|
||||
assertEquals(Long.valueOf(111L), result.getJobId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user