< prev index next >
src/java.base/share/classes/java/net/DatagramSocket.java
Print this page
@@ -306,11 +306,11 @@
return;
// DatagramSocketImpl.peekdata() is a protected method, therefore we need to use
// getDeclaredMethod, therefore we need permission to access the member
try {
AccessController.doPrivileged(
- new PrivilegedExceptionAction<Void>() {
+ new PrivilegedExceptionAction<>() {
public Void run() throws NoSuchMethodException {
Class<?>[] cl = new Class<?>[1];
cl[0] = DatagramPacket.class;
impl.getClass().getDeclaredMethod("peekData", cl);
return null;
< prev index next >