/*
* 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 4886033
* @summary Query.{initial,any,final}SubString fail if the
* matching constraint string contains wildcards.
* @author Luis-Miguel Alventosa
* @run clean QuerySubstringTest
* @run build QuerySubstringTest
* @run main QuerySubstringTest
*/
public class QuerySubstringTest {
public static interface SimpleMBean {
}
}
return value;
}
}
{ "a*b?c\\d[e-f]", "OK", "OK", "OK" },
{ "a*b?c\\d[e-f]g", "OK", "OK", "KO" },
{ "za*b?c\\d[e-f]", "KO", "OK", "OK" },
{ "za*b?c\\d[e-f]g", "KO", "OK", "KO" },
{ "a*b?c\\de", "KO", "KO", "KO" },
{ "a*b?c\\deg", "KO", "KO", "KO" },
{ "za*b?c\\de", "KO", "KO", "KO" },
{ "za*b?c\\deg", "KO", "KO", "KO" },
{ "a*b?c\\df", "KO", "KO", "KO" },
{ "a*b?c\\dfg", "KO", "KO", "KO" },
{ "za*b?c\\df", "KO", "KO", "KO" },
{ "za*b?c\\dfg", "KO", "KO", "KO" },
{ "axxbxc\\de", "KO", "KO", "KO" },
{ "axxbxc\\deg", "KO", "KO", "KO" },
{ "zaxxbxc\\de", "KO", "KO", "KO" },
{ "zaxxbxc\\deg", "KO", "KO", "KO" },
{ "axxbxc\\df", "KO", "KO", "KO" },
{ "axxbxc\\dfg", "KO", "KO", "KO" },
{ "zaxxbxc\\df", "KO", "KO", "KO" },
{ "zaxxbxc\\dfg", "KO", "KO", "KO" },
};
int type,
int error = 0;
switch (type) {
case 1:
querySubString = "InitialSubString";
break;
case 2:
querySubString = "AnySubString";
break;
case 3:
querySubString = "FinalSubString";
break;
}
querySubString + ",name=" + i);
switch (type) {
case 1:
break;
case 2:
break;
case 3:
break;
}
q.setMBeanServer(mbs);
} else {
error++;
}
}
return error;
}
int error = 0;
"\n--- Test javax.management.Query.{initial|any|final}SubString ---");
if (error > 0) {
throw new IllegalArgumentException("Test failed");
} else {
}
}
}