Skip to content

Commit d0a1ae0

Browse files
authored
IGNITE-28574 Fix error deserialization in ServiceSingleNodeDeploymentResult (#13048)
1 parent d616dca commit d0a1ae0

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceSingleNodeDeploymentResult.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ public void errors(@Nullable Collection<Throwable> errors) {
9999

100100
for (Throwable th : errors) {
101101
try {
102-
byte[] arr = U.marshal(marsh, th);
103-
104-
errorsBytes.add(arr);
102+
errorsBytes.add(U.marshal(marsh, th));
105103
}
106104
catch (IgniteCheckedException e) {
107105
log.error("Failed to marshal deployment error, err=" + th, e);
@@ -123,18 +121,19 @@ public void errors(@Nullable Collection<Throwable> errors) {
123121

124122
/** {@inheritDoc} */
125123
@Override public void finishUnmarshal(Marshaller marsh, ClassLoader clsLdr) throws IgniteCheckedException {
126-
try {
127-
if (errorsBytes != null && errors == null) {
128-
errors = new ArrayList<>();
124+
if (errorsBytes != null && errors == null) {
125+
errors = new ArrayList<>();
129126

130-
for (byte[] arr : errorsBytes)
127+
for (byte[] arr : errorsBytes) {
128+
try {
131129
errors.add(U.unmarshal(marsh, arr, clsLdr));
132-
}
133-
}
134-
catch (IgniteCheckedException e) {
135-
U.error(null, "Failed to unmarshal deployment result message", e);
130+
}
131+
catch (IgniteCheckedException e) {
132+
U.error(null, "Failed to unmarshal deployment error.", e);
136133

137-
errors.add(new IgniteCheckedException("Failed to unmarshal deployment error, see server logs for details."));
134+
errors.add(new IgniteCheckedException("Failed to unmarshal deployment error, see server logs for details."));
135+
}
136+
}
138137
}
139138
}
140139

0 commit comments

Comments
 (0)