equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
448 * @param cause the raeson why NotCompliantMBeanException should |
448 * @param cause the raeson why NotCompliantMBeanException should |
449 * be thrown. |
449 * be thrown. |
450 * @return nothing - this method always throw an exception. |
450 * @return nothing - this method always throw an exception. |
451 * The return type makes it possible to write |
451 * The return type makes it possible to write |
452 * <pre> throw throwException(clazz,cause); </pre> |
452 * <pre> throw throwException(clazz,cause); </pre> |
453 * @throws SecurityException - if cause is a SecurityException |
453 * @throws SecurityException if cause is a SecurityException |
454 * @throws NotCompliantMBeanException otherwise. |
454 * @throws NotCompliantMBeanException otherwise. |
455 **/ |
455 **/ |
456 static NotCompliantMBeanException throwException(Class<?> notCompliant, |
456 static NotCompliantMBeanException throwException(Class<?> notCompliant, |
457 Throwable cause) |
457 Throwable cause) |
458 throws NotCompliantMBeanException, SecurityException { |
458 throws NotCompliantMBeanException, SecurityException { |