/*
* 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 4716807
* @summary Test wildcards in ObjectName key properties value part.
* @author Luis-Miguel Alventosa
* @run clean ValueWildcardTest
* @run build ValueWildcardTest
* @run main ValueWildcardTest
*/
public class ValueWildcardTest {
private static int createObjectName(int i,
String s,
String d,
String k,
String v,
boolean plp,
boolean pvp)
throws Exception {
switch (i) {
case 1:
break;
case 2:
break;
case 3:
break;
default:
throw new Exception("Test incorrect: case: " + i);
}
int error = 0;
try {
switch (i) {
case 1:
on = new ObjectName(s);
break;
case 2:
on = new ObjectName(d, k, v);
break;
case 3:
on = new ObjectName(d, t);
break;
default:
throw new Exception("Test incorrect: case: " + i);
}
on.getCanonicalName());
int error2 = 0;
if (isDomainPattern) {
error2++;
}
if (!plp && isPropertyListPattern) {
error2++;
}
if (!pvp && isPropertyValuePattern) {
error2++;
}
if (plp &&
error2++;
}
if (pvp &&
error2++;
}
if (error2 > 0) {
error++;
} else {
}
} catch (Exception e) {
error++;
}
return error;
}
boolean plp,
boolean pvp)
throws Exception {
}
String k,
String v,
boolean plp,
boolean pvp)
throws Exception {
}
boolean plp,
boolean pvp)
throws Exception {
}
int error = 0;
if (error > 0) {
throw new IllegalArgumentException(msg);
} else {
}
}
}