/*
* 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 6204469
* @summary Test that MBean*Info can be constructed with default descriptor
* @author Eamonn McManus
* @run clean DefaultDescriptorTest
* @run build DefaultDescriptorTest
* @run main DefaultDescriptorTest
*/
import javax.management.*;
public class DefaultDescriptorTest {
final Descriptor empty =
int.class);
String.class);
final OpenMBeanParameterInfoSupport ombpi1 =
final OpenMBeanParameterInfoSupport ombpi2 =
(Descriptor) null);
final OpenMBeanParameterInfoSupport ombpi3 =
empty);
final OpenMBeanParameterInfoSupport ombpi4 =
"defaultString");
final OpenMBeanParameterInfoSupport ombpi5 =
final OpenMBeanParameterInfoSupport ombpi6 =
final ModelMBeanInfoSupport mmbi1 =
final ModelMBeanInfoSupport mmbi2 =
(Descriptor) null);
// final ModelMBeanInfoSupport mmbi3 =
// new ModelMBeanInfoSupport("yo", "yo", null, null, null, null,
// empty);
// an empty descriptor is currently illegal for MMBIS
final ModelMBeanAttributeInfo mmbai1 =
final ModelMBeanAttributeInfo mmbai2 =
(Descriptor) null);
final ModelMBeanAttributeInfo mmbai3 =
final ModelMBeanAttributeInfo mmbai4 =
(Descriptor) null);
final ModelMBeanConstructorInfo mmbci1 =
final ModelMBeanConstructorInfo mmbci2 =
final ModelMBeanConstructorInfo mmbci3 =
final ModelMBeanConstructorInfo mmbci4 =
final ModelMBeanNotificationInfo mmbni1 =
final ModelMBeanNotificationInfo mmbni2 =
(Descriptor) null);
final ModelMBeanOperationInfo mmboi1 =
final ModelMBeanOperationInfo mmboi2 =
final ModelMBeanOperationInfo mmboi3 =
final ModelMBeanOperationInfo mmboi4 =
(Descriptor) null);
final DescriptorRead[] infos = {
(Descriptor) null),
empty),
// Following constructor deleted because Method has implicit Descriptor
// from annotations
// new MBeanAttributeInfo("blah", "blah", getWhatever, setWhatever,
// (Descriptor) null),
// new MBeanAttributeInfo("blah", "blah", getWhatever, setWhatever,
// empty),
true, true, false),
true, true, false, (Descriptor) null),
true, true, false, empty),
// Following constructor deleted because Constructor has implicit Descriptor
// from annotations
// new MBeanConstructorInfo("blah", con, (Descriptor) null),
// new MBeanConstructorInfo("blah", con, empty),
// this class should be abstract but isn't
(Descriptor) null),
empty),
// Following constructor deleted because Method has implicit Descriptor
// from annotations
// new MBeanOperationInfo("blah", doWhatever, (Descriptor) null),
// new MBeanOperationInfo("blah", doWhatever, empty),
(Descriptor) null),
empty),
(Descriptor) null),
empty),
true, true, false),
true, true, false,
(Descriptor) null),
true, true, false,
empty),
true, true, false,
"defaultString"),
true, true, false,
true, true, false,
new OpenMBeanParameterInfo[] {
}),
new OpenMBeanParameterInfo[] {
}, (Descriptor) null),
new OpenMBeanParameterInfo[] {
}, empty),
new OpenMBeanParameterInfo[] {
}, SimpleType.DATE,
new OpenMBeanParameterInfo[] {
}, SimpleType.DATE,
(Descriptor) null),
new OpenMBeanParameterInfo[] {
}, SimpleType.DATE,
empty),
new ModelMBeanInfoSupport(mmbi1),
new ModelMBeanInfoSupport(mmbi2),
// Oddly enough there's no public copy constructor for this class
};
"supplied");
if (d == null)
}
}
public int getWhatever() {
return 0;
}
public void setWhatever(int x) {
}
}
}