Upgrade Kryo to 3.0.3.
Possible fix for ONOS-4206. Change-Id: I6782559b294297f6d929bda49ca6c0fc982cd672
Showing
3 changed files
with
17 additions
and
14 deletions
... | @@ -40,11 +40,11 @@ | ... | @@ -40,11 +40,11 @@ |
40 | <bundle>mvn:io.dropwizard.metrics/metrics-json/3.1.2</bundle> | 40 | <bundle>mvn:io.dropwizard.metrics/metrics-json/3.1.2</bundle> |
41 | <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.1</bundle> | 41 | <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.1</bundle> |
42 | 42 | ||
43 | - <bundle>mvn:com.esotericsoftware/kryo/3.0.0</bundle> | 43 | + <bundle>mvn:com.esotericsoftware/kryo/3.0.3</bundle> |
44 | <bundle>mvn:com.esotericsoftware/reflectasm/1.11.0</bundle> | 44 | <bundle>mvn:com.esotericsoftware/reflectasm/1.11.0</bundle> |
45 | <bundle>mvn:org.ow2.asm/asm/4.2</bundle> | 45 | <bundle>mvn:org.ow2.asm/asm/4.2</bundle> |
46 | <bundle>mvn:com.esotericsoftware/minlog/1.3.0</bundle> | 46 | <bundle>mvn:com.esotericsoftware/minlog/1.3.0</bundle> |
47 | - <bundle>mvn:org.objenesis/objenesis/2.1</bundle> | 47 | + <bundle>mvn:org.objenesis/objenesis/2.2</bundle> |
48 | 48 | ||
49 | <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle> | 49 | <bundle>mvn:com.fasterxml.jackson.core/jackson-core/2.7.0</bundle> |
50 | <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle> | 50 | <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/2.7.0</bundle> | ... | ... |
... | @@ -308,7 +308,7 @@ | ... | @@ -308,7 +308,7 @@ |
308 | <dependency> | 308 | <dependency> |
309 | <groupId>com.esotericsoftware</groupId> | 309 | <groupId>com.esotericsoftware</groupId> |
310 | <artifactId>kryo</artifactId> | 310 | <artifactId>kryo</artifactId> |
311 | - <version>3.0.0</version> | 311 | + <version>3.0.3</version> |
312 | </dependency> | 312 | </dependency> |
313 | <dependency> | 313 | <dependency> |
314 | <groupId>com.esotericsoftware</groupId> | 314 | <groupId>com.esotericsoftware</groupId> | ... | ... |
... | @@ -15,17 +15,6 @@ | ... | @@ -15,17 +15,6 @@ |
15 | */ | 15 | */ |
16 | package org.onlab.util; | 16 | package org.onlab.util; |
17 | 17 | ||
18 | -import static org.slf4j.LoggerFactory.getLogger; | ||
19 | - | ||
20 | -import java.io.InputStream; | ||
21 | -import java.io.OutputStream; | ||
22 | -import java.nio.ByteBuffer; | ||
23 | -import java.util.ArrayList; | ||
24 | -import java.util.List; | ||
25 | - | ||
26 | -import org.apache.commons.lang3.tuple.Pair; | ||
27 | -import org.slf4j.Logger; | ||
28 | - | ||
29 | import com.esotericsoftware.kryo.Kryo; | 18 | import com.esotericsoftware.kryo.Kryo; |
30 | import com.esotericsoftware.kryo.Serializer; | 19 | import com.esotericsoftware.kryo.Serializer; |
31 | import com.esotericsoftware.kryo.io.ByteBufferInput; | 20 | import com.esotericsoftware.kryo.io.ByteBufferInput; |
... | @@ -36,6 +25,17 @@ import com.esotericsoftware.kryo.pool.KryoFactory; | ... | @@ -36,6 +25,17 @@ import com.esotericsoftware.kryo.pool.KryoFactory; |
36 | import com.esotericsoftware.kryo.pool.KryoPool; | 25 | import com.esotericsoftware.kryo.pool.KryoPool; |
37 | import com.google.common.base.MoreObjects; | 26 | import com.google.common.base.MoreObjects; |
38 | import com.google.common.collect.ImmutableList; | 27 | import com.google.common.collect.ImmutableList; |
28 | +import org.apache.commons.lang3.tuple.Pair; | ||
29 | +import org.objenesis.strategy.StdInstantiatorStrategy; | ||
30 | +import org.slf4j.Logger; | ||
31 | + | ||
32 | +import java.io.InputStream; | ||
33 | +import java.io.OutputStream; | ||
34 | +import java.nio.ByteBuffer; | ||
35 | +import java.util.ArrayList; | ||
36 | +import java.util.List; | ||
37 | + | ||
38 | +import static org.slf4j.LoggerFactory.getLogger; | ||
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Pool of Kryo instances, with classes pre-registered. | 41 | * Pool of Kryo instances, with classes pre-registered. |
... | @@ -381,6 +381,9 @@ public final class KryoNamespace implements KryoFactory, KryoPool { | ... | @@ -381,6 +381,9 @@ public final class KryoNamespace implements KryoFactory, KryoPool { |
381 | public Kryo create() { | 381 | public Kryo create() { |
382 | Kryo kryo = new Kryo(); | 382 | Kryo kryo = new Kryo(); |
383 | kryo.setRegistrationRequired(registrationRequired); | 383 | kryo.setRegistrationRequired(registrationRequired); |
384 | + // TODO rethink whether we want to use StdInstantiatorStrategy | ||
385 | + kryo.setInstantiatorStrategy( | ||
386 | + new Kryo.DefaultInstantiatorStrategy(new StdInstantiatorStrategy())); | ||
384 | for (RegistrationBlock block : registeredBlocks) { | 387 | for (RegistrationBlock block : registeredBlocks) { |
385 | int id = block.begin(); | 388 | int id = block.begin(); |
386 | if (id == FLOATING_ID) { | 389 | if (id == FLOATING_ID) { | ... | ... |
-
Please register or login to post a comment