Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: mojo/public/java/system/src/org/chromium/mojo/system/InvalidHandle.java

Issue 1057213003: Java: Introduce ResultAnd<> and use it. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/java/system/src/org/chromium/mojo/system/InvalidHandle.java
diff --git a/mojo/public/java/system/src/org/chromium/mojo/system/InvalidHandle.java b/mojo/public/java/system/src/org/chromium/mojo/system/InvalidHandle.java
index d92da7ebc68077ce8bffb497e98654590d39d757..9dff70e2e63c4f9d9255ffceaa01c65e44a4ad6f 100644
--- a/mojo/public/java/system/src/org/chromium/mojo/system/InvalidHandle.java
+++ b/mojo/public/java/system/src/org/chromium/mojo/system/InvalidHandle.java
@@ -145,7 +145,7 @@ public class InvalidHandle implements UntypedHandle, MessagePipeHandle, Consumer
* @see DataPipe.ProducerHandle#writeData(java.nio.ByteBuffer, DataPipe.WriteFlags)
*/
@Override
- public int writeData(ByteBuffer elements, DataPipe.WriteFlags flags) {
+ public ResultAnd<Integer> writeData(ByteBuffer elements, DataPipe.WriteFlags flags) {
throw new MojoException(MojoResult.INVALID_ARGUMENT);
}
@@ -178,7 +178,7 @@ public class InvalidHandle implements UntypedHandle, MessagePipeHandle, Consumer
* @see DataPipe.ConsumerHandle#readData(java.nio.ByteBuffer, DataPipe.ReadFlags)
*/
@Override
- public int readData(ByteBuffer elements, DataPipe.ReadFlags flags) {
+ public ResultAnd<Integer> readData(ByteBuffer elements, DataPipe.ReadFlags flags) {
throw new MojoException(MojoResult.INVALID_ARGUMENT);
}
@@ -212,8 +212,8 @@ public class InvalidHandle implements UntypedHandle, MessagePipeHandle, Consumer
* @see MessagePipeHandle#readMessage(java.nio.ByteBuffer, int, MessagePipeHandle.ReadFlags)
*/
@Override
- public ReadMessageResult readMessage(ByteBuffer bytes, int maxNumberOfHandles,
- ReadFlags flags) {
+ public ResultAnd<ReadMessageResult> readMessage(
+ ByteBuffer bytes, int maxNumberOfHandles, ReadFlags flags) {
throw new MojoException(MojoResult.INVALID_ARGUMENT);
}

Powered by Google App Engine
This is Rietveld 408576698