1 /* |
1 /* |
2 * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
89 * |
89 * |
90 * Therfore, for the first 3 cases, exact compatibility is preserved. In |
90 * Therfore, for the first 3 cases, exact compatibility is preserved. In |
91 * the 4th case, non-huge OID is still supportable in old versions, while |
91 * the 4th case, non-huge OID is still supportable in old versions, while |
92 * huge OID is not. |
92 * huge OID is not. |
93 */ |
93 */ |
|
94 @java.io.Serial |
94 private static final long serialVersionUID = 8697030238860181294L; |
95 private static final long serialVersionUID = 8697030238860181294L; |
95 |
96 |
96 /** |
97 /** |
97 * Changed to Object |
98 * Changed to Object |
98 * @serial |
99 * @serial |
99 */ |
100 */ |
|
101 @SuppressWarnings("serial") // Not statically typed as Serializable |
100 private Object components = null; // path from root |
102 private Object components = null; // path from root |
101 /** |
103 /** |
102 * @serial |
104 * @serial |
103 */ |
105 */ |
104 private int componentLen = -1; // how much is used. |
106 private int componentLen = -1; // how much is used. |
105 |
107 |
106 // Is the components field calculated? |
108 // Is the components field calculated? |
107 private transient boolean componentsCalculated = false; |
109 private transient boolean componentsCalculated = false; |
108 |
110 |
|
111 @java.io.Serial |
109 private void readObject(ObjectInputStream is) |
112 private void readObject(ObjectInputStream is) |
110 throws IOException, ClassNotFoundException { |
113 throws IOException, ClassNotFoundException { |
111 is.defaultReadObject(); |
114 is.defaultReadObject(); |
112 |
115 |
113 if (encoding == null) { // from an old version |
116 if (encoding == null) { // from an old version |
117 } |
120 } |
118 init(comp, componentLen); |
121 init(comp, componentLen); |
119 } |
122 } |
120 } |
123 } |
121 |
124 |
|
125 @java.io.Serial |
122 private void writeObject(ObjectOutputStream os) |
126 private void writeObject(ObjectOutputStream os) |
123 throws IOException { |
127 throws IOException { |
124 if (!componentsCalculated) { |
128 if (!componentsCalculated) { |
125 int[] comps = toIntArray(); |
129 int[] comps = toIntArray(); |
126 if (comps != null) { // every one understands this |
130 if (comps != null) { // every one understands this |