/*
* 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
* @summary it is new version of old test which was
* Test pickling and unpickling an object with derived classes
* and using a read special to serialize the "middle" class.
*
*/
public class CheckingEquality {
"serialization/deserialization of " +
"complex objects\n");
try {
p.writeObject(objout);
p.flush();
"\nTEST FAILED: Original and read objects not equal.");
throw new Error();
}
} catch (Exception e) {
e.printStackTrace();
int ch;
try {
}
} catch (Exception f) {
throw new Error();
}
throw new Error();
}
}
}
int two;
float three[];
one = "one";
two = 2;
three = new float[5];
float f = 3.0f;
for (int i=0; i<5 ; i++) {
f += 0.11;
three[i] = f;
}
}
/* Compare two first objects */
boolean ret = true;
ret = false;
}
ret = false;
}
ret = false;
}
}
return ret;
}
}
int cinq;
}
{
"\nTEST FAILED: Superclass not serialized when " +
"it should have been");
throw new StreamCorruptedException("Superclass not serialized " +
"when it should have been");
}
}
ret = false;
}
ret = false;
}
return ret;
}
/* called only before writing */
void init() {
quatre = "4444";
cinq = 5;
super.init();
}
}
int six;
private static int seven[];
long ten;
ret = false;
}
ret = false;
}
ret = false;
}
ret = false;
}
ret = false;
}
return ret;
}
/* called only before writing */
void init() {
six = 666;
eight = (byte)8;
nine = (short)9;
ten = (long)100000;
super.init();
}
}