Re: [cp-patches] [RFC/PATCH 2/2] Add missing Java 1.5 java/net methods

2012-03-15 Thread Andrew Hughes


- Original Message -
 On Wed, Mar 14, 2012 at 8:22 PM, Andrew Hughes ahug...@redhat.com
 wrote:
  I don't see how this is better than just not having these APIs.
   Shouldn't
  they at least delegate to VM level?

 That's what the API does with OpenJDK too! Also, the VM is not really
 involved for networking code so I don't see why we'd need to delegate
 anything.


Well they at least need to be documented and the lack of implementation noted 
therein.
--
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH 2/2] Add missing Java 1.5 java/net methods

2012-03-14 Thread Andrew Hughes
- Original Message -
 Signed-off-by: Pekka Enberg penb...@kernel.org
 ---
  java/net/ServerSocket.java |8 
  java/net/Socket.java   |8 
  java/net/SocketImpl.java   |8 
  3 files changed, 24 insertions(+), 0 deletions(-)
 
 diff --git a/java/net/ServerSocket.java b/java/net/ServerSocket.java
 index 1dbd763..453fb29 100644
 --- a/java/net/ServerSocket.java
 +++ b/java/net/ServerSocket.java
 @@ -584,6 +584,14 @@ public class ServerSocket
}
  
/**
 +   * @since 1.5
 +   */
 +  public void setPerformancePreferences(int connectionTime, int
 latency, int bandwidth)
 +  {
 +// Ignored
 +  }
 +
 +  /**
 * Returns the value of this socket as a codeString/code.
 *
 * @return This socket represented as a codeString/code.
 diff --git a/java/net/Socket.java b/java/net/Socket.java
 index 32b12e8..26490e3 100644
 --- a/java/net/Socket.java
 +++ b/java/net/Socket.java
 @@ -1294,4 +1294,12 @@ public class Socket
{
  return outputShutdown;
}
 +
 +  /**
 +   * @since 1.5
 +   */
 +  public void setPerformancePreferences(int connectionTime, int
 latency, int bandwidth)
 +  {
 +// Ignored
 +  }
  }
 diff --git a/java/net/SocketImpl.java b/java/net/SocketImpl.java
 index 77f470b..ab3b636 100644
 --- a/java/net/SocketImpl.java
 +++ b/java/net/SocketImpl.java
 @@ -318,4 +318,12 @@ public abstract class SocketImpl implements
 SocketOptions
{
  throw new IOException(Not implemented in this socket class);
}
 +
 +  /**
 +   * @since 1.5
 +   */
 +  public void setPerformancePreferences(int connectionTime, int
 latency, int bandwidth)
 +  {
 +// Ignored
 +  }
  }
 --
 1.7.6.5
 
 
 

I don't see how this is better than just not having these APIs.  Shouldn't
they at least delegate to VM level?
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




Re: [cp-patches] [RFC/PATCH 2/2] Add missing Java 1.5 java/net methods

2012-03-14 Thread Pekka Enberg
On Wed, Mar 14, 2012 at 8:22 PM, Andrew Hughes ahug...@redhat.com wrote:
 I don't see how this is better than just not having these APIs.  Shouldn't
 they at least delegate to VM level?

That's what the API does with OpenJDK too! Also, the VM is not really
involved for networking code so I don't see why we'd need to delegate
anything.