mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-02 06:28:23 +00:00
8076089: Cleanup: Inline & remove sun.management.Util.newException
Reviewed-by: kevinw, amenkov, dfuchs, sspitsyn
This commit is contained in:
parent
c2ee1b33c3
commit
890830196d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2022, 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
|
||||
@ -68,7 +68,7 @@ public class LockInfoCompositeData extends LazyCompositeData {
|
||||
return new CompositeDataSupport(LOCK_INFO_COMPOSITE_TYPE, items);
|
||||
} catch (OpenDataException e) {
|
||||
// Should never reach here
|
||||
throw Util.newException(e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ public class LockInfoCompositeData extends LazyCompositeData {
|
||||
MappedMXBeanType.toOpenType(LockInfo.class);
|
||||
} catch (OpenDataException e) {
|
||||
// Should never reach here
|
||||
throw Util.newException(e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2022, 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
|
||||
@ -482,7 +482,7 @@ public class ManagementFactoryHelper {
|
||||
}
|
||||
});
|
||||
} catch (PrivilegedActionException e) {
|
||||
throw Util.newException(e.getException());
|
||||
throw new RuntimeException(e.getException());
|
||||
}
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ public class ManagementFactoryHelper {
|
||||
}
|
||||
});
|
||||
} catch (PrivilegedActionException e) {
|
||||
throw Util.newException(e.getException());
|
||||
throw new RuntimeException(e.getException());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2022, 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
|
||||
@ -34,10 +34,6 @@ import javax.management.MalformedObjectNameException;
|
||||
public class Util {
|
||||
private Util() {} // there are no instances of this class
|
||||
|
||||
static RuntimeException newException(Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
private static final String[] EMPTY_STRING_ARRAY = new String[0];
|
||||
static String[] toStringArray(List<String> list) {
|
||||
return list.toArray(EMPTY_STRING_ARRAY);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user