SnmpOidHashCode.java revision 2362
0N/A * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 2362N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @summary Test that SnmpOid hashCode is consistent with equals. 0N/A * @build SnmpOidHashCode 0N/A * @run main SnmpOidHashCode 0N/A "1.1.1.1.1.1.1.1.1",
0N/A "1.1.1.1.2.1.1.1.1",
0N/A "1.1.1.1.1.2.1.1.1",
0N/A "1.2."+
0xFFFFFFFFL+
".3."+
0xFFFFFFFFL+
".4."+
0xFFFFFFFFL+
0N/A ".5."+
0xFFFFFFFFL+
".6."+
0xFFFFFFFFL+
".7."+
0xFFFFFFFFL+
0N/A ".8."+
0xFFFFFFFFL+
".9."+
0xFFFFFFFFL+
".10."+
0xFFFFFFFFL+
0N/A ".11."+
0xFFFFFFFFL+
".12."+
0xFFFFFFFFL+
".13."+
0xFFFFFFFFL+
0N/A ".14."+
0xFFFFFFFFL+
".15."+
0xFFFFFFFFL+
".16."+
0xFFFFFFFFL+
0N/A ".17."+
0xFFFFFFFFL+
".18."+
0xFFFFFFFFL+
".19."+
0xFFFFFFFFL+
0N/A ".20."+
0xFFFFFFFFL+
".21."+
0xFFFFFFFFL+
".22."+
0xFFFFFFFFL+
0N/A ".23."+
0xFFFFFFFFL+
".24."+
0xFFFFFFFFL+
".25."+
0xFFFFFFFFL+
0N/A ".26."+
0xFFFFFFFFL+
".27."+
0xFFFFFFFFL+
".28."+
0xFFFFFFFFL+
0N/A ".30."+
0xFFFFFFFFL+
".31."+
0xFFFFFFFFL+
".32."+
0xFFFFFFFFL+
0N/A ".33."+
0xFFFFFFFFL+
".34."+
0xFFFFFFFFL+
".35."+
0xFFFFFFFFL+
0N/A ".36."+
0xFFFFFFFFL+
".37."+
0xFFFFFFFFL+
".38."+
0xFFFFFFFFL+
50N/A // We use an SnmpOidBuilder in order to adapt this test case to a 50N/A // configuration where the SNMP packages are not present in rt.jar. 0N/A "com.sun.jmx.snmp.SnmpOid";
50N/A ": Testing for SNMP Packages...");
50N/A ": test skipped.");
50N/A "equals yields true: " +
0N/A "hashCode differ:" +
0N/A "equals yields false: " +