8066635: Fix deprecation warnings in java.management module

Fixed deprecation warnings in java.management module

Reviewed-by: dholmes
This commit is contained in:
Amit Sapre 2016-08-31 12:10:00 +03:00 committed by Dmitry Samersoff
parent 7bddef3ed0
commit 5f8a441f1a
3 changed files with 15 additions and 55 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2016, 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
@ -1707,25 +1707,6 @@ public class DefaultMBeanServerInterceptor implements MBeanServerInterceptor {
throw new UnsupportedOperationException("Not supported yet.");
}
@SuppressWarnings("deprecation")
public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException,
OperationsException {
throw new UnsupportedOperationException("Not supported yet.");
}
@SuppressWarnings("deprecation")
public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException,
ReflectionException {
throw new UnsupportedOperationException("Not supported yet.");
}
@SuppressWarnings("deprecation")
public ObjectInputStream deserialize(String className, ObjectName loaderName,
byte[] data) throws InstanceNotFoundException, OperationsException,
ReflectionException {
throw new UnsupportedOperationException("Not supported yet.");
}
public ClassLoaderRepository getClassLoaderRepository() {
throw new UnsupportedOperationException("Not supported yet.");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2016, 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
@ -94,32 +94,6 @@ public interface MBeanServerInterceptor extends MBeanServer {
throws ReflectionException, MBeanException,
InstanceNotFoundException;
/**
* This method should never be called.
* Usually throws UnsupportedOperationException.
*/
@Deprecated
public ObjectInputStream deserialize(ObjectName name, byte[] data)
throws InstanceNotFoundException, OperationsException;
/**
* This method should never be called.
* Usually throws UnsupportedOperationException.
*/
@Deprecated
public ObjectInputStream deserialize(String className, byte[] data)
throws OperationsException, ReflectionException;
/**
* This method should never be called.
* Usually hrows UnsupportedOperationException.
*/
@Deprecated
public ObjectInputStream deserialize(String className,
ObjectName loaderName, byte[] data)
throws InstanceNotFoundException, OperationsException,
ReflectionException;
/**
* This method should never be called.
* Usually throws UnsupportedOperationException.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2016, 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
@ -666,9 +666,10 @@ public interface MBeanServer extends MBeanServerConnection {
* obtain the appropriate class loader for deserialization.
*/
@Deprecated
public ObjectInputStream deserialize(ObjectName name, byte[] data)
throws InstanceNotFoundException, OperationsException;
default public ObjectInputStream deserialize(ObjectName name, byte[] data)
throws InstanceNotFoundException, OperationsException {
throw new UnsupportedOperationException("Not supported.");
}
/**
* <p>De-serializes a byte array in the context of a given MBean
@ -693,8 +694,10 @@ public interface MBeanServer extends MBeanServerConnection {
* class loader repository and use it to deserialize.
*/
@Deprecated
public ObjectInputStream deserialize(String className, byte[] data)
throws OperationsException, ReflectionException;
default public ObjectInputStream deserialize(String className, byte[] data)
throws OperationsException, ReflectionException {
throw new UnsupportedOperationException("Not supported.");
}
/**
@ -724,11 +727,13 @@ public interface MBeanServer extends MBeanServerConnection {
* the class loader for deserialization.
*/
@Deprecated
public ObjectInputStream deserialize(String className,
default public ObjectInputStream deserialize(String className,
ObjectName loaderName,
byte[] data)
throws InstanceNotFoundException, OperationsException,
ReflectionException;
ReflectionException {
throw new UnsupportedOperationException("Not supported.");
}
/**
* <p>Return the {@link java.lang.ClassLoader} that was used for