jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java
changeset 2427 f35f516befc3
parent 2057 3acf8e5e2ca0
child 5506 202f599c92aa
equal deleted inserted replaced
2426:a528c0830862 2427:f35f516befc3
   311             throw new IllegalArgumentException("Read-only buffer");
   311             throw new IllegalArgumentException("Read-only buffer");
   312         if (dst == null)
   312         if (dst == null)
   313             throw new NullPointerException();
   313             throw new NullPointerException();
   314         synchronized (readLock) {
   314         synchronized (readLock) {
   315             ensureOpen();
   315             ensureOpen();
   316             // If socket is not bound then behave as if nothing received
   316             // Socket was not bound before attempting receive
   317             // Will be fixed by 6621699
   317             if (localAddress() == null)
   318             if (localAddress() == null) {
   318                 bind(null);
   319                 return null;
       
   320             }
       
   321             int n = 0;
   319             int n = 0;
   322             ByteBuffer bb = null;
   320             ByteBuffer bb = null;
   323             try {
   321             try {
   324                 begin();
   322                 begin();
   325                 if (!isOpen())
   323                 if (!isOpen())