Workaround for ReflectASM bug.
- When spanning multiple class loaders, Object cannot be instantiated from 'protected' constructor. Change-Id: Iacb33755ccf3da3d8ec28623b9d3aaa28870208d
Showing
3 changed files
with
15 additions
and
1 deletions
| ... | @@ -96,4 +96,13 @@ public class DefaultDeviceDescription extends AbstractDescription | ... | @@ -96,4 +96,13 @@ public class DefaultDeviceDescription extends AbstractDescription |
| 96 | .toString(); | 96 | .toString(); |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | + // default constructor for serialization | ||
| 100 | + private DefaultDeviceDescription() { | ||
| 101 | + this.uri = null; | ||
| 102 | + this.type = null; | ||
| 103 | + this.manufacturer = null; | ||
| 104 | + this.hwVersion = null; | ||
| 105 | + this.swVersion = null; | ||
| 106 | + this.serialNumber = null; | ||
| 107 | + } | ||
| 99 | } | 108 | } | ... | ... |
| ... | @@ -48,4 +48,9 @@ public class DefaultPortDescription extends AbstractDescription | ... | @@ -48,4 +48,9 @@ public class DefaultPortDescription extends AbstractDescription |
| 48 | return isEnabled; | 48 | return isEnabled; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | + // default constructor for serialization | ||
| 52 | + private DefaultPortDescription() { | ||
| 53 | + this.number = null; | ||
| 54 | + this.isEnabled = false; | ||
| 55 | + } | ||
| 51 | } | 56 | } | ... | ... |
| ... | @@ -82,7 +82,7 @@ public final class Timestamped<T> { | ... | @@ -82,7 +82,7 @@ public final class Timestamped<T> { |
| 82 | 82 | ||
| 83 | // Default constructor for serialization | 83 | // Default constructor for serialization |
| 84 | @Deprecated | 84 | @Deprecated |
| 85 | - protected Timestamped() { | 85 | + private Timestamped() { |
| 86 | this.value = null; | 86 | this.value = null; |
| 87 | this.timestamp = null; | 87 | this.timestamp = null; |
| 88 | } | 88 | } | ... | ... |
-
Please register or login to post a comment