/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4811968 6908628 8006564
* @run main S11N check
* @summary Serialization compatibility with old versions (and fixes)
*/
public class S11N {
"0.0",
"1.1",
"2.2",
"1.2.3456",
"1.2.2147483647.4",
"1.2.268435456.4",
};
"2.16.764.1.3101555394.1.0.100.2.1",
"1.2.2147483648.4",
"2.3.4444444444444444444444",
"1.2.8888888888888888.33333333333333333.44444444444444",
};
// Do not use j.u.Base64, the test needs to run in jdk6
protected int bytesPerLine() {
return 48;
}
};
if (version >= 7) {
// 7 -> 7
// 6 -> 7
}
// 7 -> 7
}
} else {
// 6 -> 6
// 7 -> 6
}
// 7 -> 6 fails for HUGE oids
boolean ok = false;
try {
ok = true;
} catch (Exception e) {
}
if (ok) {
throw new Exception();
}
}
}
} else {
// Generates the JDK6 serialized string inside this test, call
// and paste the output at the end of this test.
// For jdk6, the following line will throw an exception, ignore it
}
}
// Gets the serialized form for jdk6
}
// Gets the serialized form for jdk7
}
// Gets the serialized form for this java
return bout.toByteArray();
}
// Makes sure serialized form can be deserialized
ObjectIdentifier o = (ObjectIdentifier) (
}
}
// dump serialized form to java code style text
} else {
}
}
}
}
// Do not use diamond operator, this test is also meant to run in jdk6
static {
////////////// PASTE BEGIN //////////////
"rO0ABXNyACJzdW4uc2VjdXJpdHkudXRpb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QX" +
"fy4CAAJJAAxjb21wb25lbnRMZW5bAApjb21wb25lbnRzdAACW0l4cAAAAAJ1cgAC" +
"W0lNumAmduqypQIAAHhwAAAAAgAAAAIAAAAC");
"rO0ABXNyACJzdW4uc2VjdXJpdHkudXRpbC5PYmplY3RJZGVudGlmaWVyeLIO7GQX" +
"fy4CAAJJAAxjb21wb25lbnRMZW5bAApjb21wb25lbnRzdAACW0l4cAAAAAN1cgAC" +
"W0lNumAmduqypQIAAHhwAAAAAwAAAAEAAAACAAANgA==");
"rO0ABXNyACJzdW4uc2VjdXJpdHkudXRpbC5PYmplY3RJZGVudGlmaWVyeLIO7GQX" +
"fy4CAAJJAAxjb21wb25lbnRMZW5bAApjb21wb25lbnRzdAACW0l4cAAAAAR1cgAC" +
"W0lNumAmduqypQIAAHhwAAAABAAAAAEAAAACf////wAAAAQ=");
"rO0ABXNyACJzdW4uc2VjdXJpdHkudXRpbC5PYmplY3RJZGVudGlmaWVyeLIO7GQX" +
"fy4CAAJJAAxjb21wb25lbnRMZW5bAApjb21wb25lbnRzdAACW0l4cAAAAAR1cgAC" +
"W0lNumAmduqypQIAAHhwAAAABAAAAAEAAAACEAAAAAAAAAQ=");
////////////// PASTE END //////////////
}
}