mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-29 00:02:34 +00:00
104 lines
3.2 KiB
Java
104 lines
3.2 KiB
Java
/*
|
|
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
* published by the Free Software Foundation. Oracle designates this
|
|
* particular file as subject to the "Classpath" exception as provided
|
|
* by Oracle in the LICENSE file that accompanied this code.
|
|
*
|
|
* 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.
|
|
*/
|
|
/*
|
|
* @author IBM Corp.
|
|
*
|
|
* Copyright IBM Corp. 1999-2000. All rights reserved.
|
|
*/
|
|
|
|
|
|
package javax.management.modelmbean;
|
|
|
|
import java.io.IOException;
|
|
import java.io.ObjectInputStream;
|
|
import java.io.ObjectOutputStream;
|
|
import java.io.ObjectStreamField;
|
|
|
|
/**
|
|
* This exception is thrown when an XML formatted string is being parsed into ModelMBean objects
|
|
* or when XML formatted strings are being created from ModelMBean objects.
|
|
*
|
|
* It is also used to wrapper exceptions from XML parsers that may be used.
|
|
*
|
|
* <p>The <b>serialVersionUID</b> of this class is <code>3176664577895105181L</code>.
|
|
*
|
|
* @deprecated This class exists only to support XML parsing implemented privately in this module,
|
|
* in DescriptorSupport. That feature is deprecated for removal.
|
|
*
|
|
* @since 1.5
|
|
*/
|
|
@Deprecated(since="25", forRemoval=true)
|
|
public class XMLParseException
|
|
extends Exception
|
|
{
|
|
private static final long serialVersionUID = 3176664577895105181L;
|
|
|
|
/**
|
|
* Default constructor .
|
|
*/
|
|
public XMLParseException ()
|
|
{
|
|
super("XML Parse Exception.");
|
|
}
|
|
|
|
/**
|
|
* Constructor taking a string.
|
|
*
|
|
* @param s the detail message.
|
|
*/
|
|
public XMLParseException (String s)
|
|
{
|
|
super("XML Parse Exception: " + s);
|
|
}
|
|
/**
|
|
* Constructor taking a string and an exception.
|
|
*
|
|
* @param e the nested exception.
|
|
* @param s the detail message.
|
|
*/
|
|
public XMLParseException (Exception e, String s)
|
|
{
|
|
super("XML Parse Exception: " + s + ":" + e.toString());
|
|
}
|
|
|
|
/**
|
|
* Deserializes an {@link XMLParseException} from an {@link ObjectInputStream}.
|
|
*/
|
|
private void readObject(ObjectInputStream in)
|
|
throws IOException, ClassNotFoundException {
|
|
// New serial form ignores extra field "msgStr"
|
|
in.defaultReadObject();
|
|
}
|
|
|
|
|
|
/**
|
|
* Serializes an {@link XMLParseException} to an {@link ObjectOutputStream}.
|
|
*/
|
|
private void writeObject(ObjectOutputStream out)
|
|
throws IOException {
|
|
out.defaultWriteObject();
|
|
}
|
|
}
|