/*
* 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 4880633
* @summary Tests multi threaded access to the XMLEncoder
* @author Mark Davidson
*/
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
object.setAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa("Value aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + i);
// set encoder thread to use this object
}
//start all threads
}
}
}
public void run() {
// run thread a few time
// object stays the same but NullPointerException appears randomly
// on dual proccessor a lock is generated
for (int i = 0; i < THREAD_LENGTH; i++) {
// create XMLEncoder to ByteArrayOutputStream
// this is to exclude file locking problems
encoder.setExceptionListener(this);
// write the object
// will see randomly null pointer exceptions
// a bug as object is same through different encode phases
//close encoder
}
}
}
public static class ValueObject {
private String a;
this.a = a;
}
return this.a;
}
this.aa = a;
}
return this.aa;
}
this.aaa = a;
}
return this.aaa;
}
this.aaaa = a;
}
return this.aaaa;
}
this.aaaaa = a;
}
return this.aaaaa;
}
this.aaaaaa = a;
}
return this.aaaaaa;
}
this.aaaaaaa = a;
}
return this.aaaaaaa;
}
this.aaaaaaaa = a;
}
return this.aaaaaaaa;
}
this.aaaaaaaaa = a;
}
return this.aaaaaaaaa;
}
this.aaaaaaaaaa = a;
}
return this.aaaaaaaaaa;
}
this.aaaaaaaaaaa = a;
}
return this.aaaaaaaaaaa;
}
this.aaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaa;
}
this.aaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = a;
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
return this.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}