/*
* 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.
*/
/*
* Portions Copyright (c) 2010, 2011 IBM Corporation
*/
/*
* @test
* @bug 6934356
* @summary Serializing Vector objects which refer to each other should not be able to deadlock.
* @author Neil Richards <neil.richards@ngmr.net>, <neil_richards@uk.ibm.com>
*/
public class SerializationDeadlock {
// Test for Vector serialization deadlock
// Populate the vectors so that they refer to each other
// Wait for both test threads to have initiated serialization
// of the 'testStart' object (and hence of both 'v1' and 'v2')
// Wait for both test threads to successfully finish serialization
// of 'v1' and 'v2'.
}
implements Serializable {
super(count);
}
throws IOException {
// Wait until all test threads have started serializing data
try {
await();
} catch (final Exception e) {
throw new IOException("Test ERROR: Unexpected exception caught", e);
}
}
}
setDaemon(true);
}
public void run() {
try {
} catch (final IOException ioe) {
} finally {
try {
} catch (Exception e) {
addException(e);
}
}
}
}
public static synchronized void handleExceptions() {
if (false == exceptions.isEmpty()) {
}
}
}
}
}
}
}