Commit 0b7e1ad3 authored by qsr@chromium.org's avatar qsr@chromium.org

Remove @Nullable annoation on readAndDispatchMessage

The public API of mojo should not depend on any third-party library.
This CL remove the @Nullable annoation on Message#readAndDispatchMessage

R=rmcilroy@chromium.org

Review URL: https://codereview.chromium.org/385113005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282625 0039d316-1c4b-4281-b951-d872f2087c98
parent 967052f1
...@@ -12,8 +12,6 @@ import org.chromium.mojo.system.MojoResult; ...@@ -12,8 +12,6 @@ import org.chromium.mojo.system.MojoResult;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.List; import java.util.List;
import javax.annotation.Nullable;
/** /**
* A raw message to be sent/received from a {@link MessagePipeHandle}. * A raw message to be sent/received from a {@link MessagePipeHandle}.
*/ */
...@@ -44,9 +42,11 @@ public final class Message { ...@@ -44,9 +42,11 @@ public final class Message {
/** /**
* Read a message, and pass it to the given |MessageReceiver| if not null. If the * Read a message, and pass it to the given |MessageReceiver| if not null. If the
* |MessageReceiver| is null, the message is lost. * |MessageReceiver| is null, the message is lost.
*
* @param receiver The {@link MessageReceiver} that will receive the read {@link Message}. Can
* be <code>null</code>, in which case the message is discarded.
*/ */
public static int readAndDispatchMessage(MessagePipeHandle handle, public static int readAndDispatchMessage(MessagePipeHandle handle, MessageReceiver receiver) {
@Nullable MessageReceiver receiver) {
// TODO(qsr) Allow usage of a pool of pre-allocated buffer for performance. // TODO(qsr) Allow usage of a pool of pre-allocated buffer for performance.
ReadMessageResult result = handle.readMessage(null, 0, MessagePipeHandle.ReadFlags.NONE); ReadMessageResult result = handle.readMessage(null, 0, MessagePipeHandle.ReadFlags.NONE);
if (result.getMojoResult() != MojoResult.RESOURCE_EXHAUSTED) { if (result.getMojoResult() != MojoResult.RESOURCE_EXHAUSTED) {
......
...@@ -424,13 +424,6 @@ ...@@ -424,13 +424,6 @@
'java_in_dir': 'public/java', 'java_in_dir': 'public/java',
}, },
'includes': [ '../build/java.gypi' ], 'includes': [ '../build/java.gypi' ],
'conditions': [
['android_webview_build==0', {
'dependencies': [
'../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
],
}]
],
}, },
{ {
'target_name': 'mojo_bindings_java', 'target_name': 'mojo_bindings_java',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment