File tree Expand file tree Collapse file tree
branches/pubsub-alpha/gcloud-java-compute/src/main/java/com/google/gcloud/compute Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22refs/heads/master: 36a62ef856d199f8efd09501b5ba65c422c01f23
33refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44refs/heads/gh-pages: 7406918e071dd2c5677a638ae2a06e7592b6542c
5- refs/heads/pubsub-alpha: ba4fcf01983f61df06ab07734944c2408e6932f2
5+ refs/heads/pubsub-alpha: de30a254b7e9e994bbf87644f5a0a0bf41ed97f4
66refs/heads/update-datastore: 47aae517c2cb33f1dccd909adaced73ec9d0f4df
77refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
88refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd
Original file line number Diff line number Diff line change @@ -1092,7 +1092,8 @@ public static OperationListOption fields(OperationField... fields) {
10921092 Page <Operation > listZoneOperations (String zone , OperationListOption ... options );
10931093
10941094 /**
1095- * Deletes the requested operation.
1095+ * Deletes the requested operation. Delete is only possible for operations that have completed
1096+ * their execution. Any attempt to delete a running operation will fail.
10961097 *
10971098 * @return {@code true} if operation was deleted, {@code false} if it was not found
10981099 * @throws ComputeException upon failure
Original file line number Diff line number Diff line change @@ -542,8 +542,10 @@ public com.google.api.services.compute.model.Operation call() {
542542 ZoneOperationId zoneOperationId = (ZoneOperationId ) operationId ;
543543 return computeRpc .getZoneOperation (zoneOperationId .zone (),
544544 zoneOperationId .operation (), optionsMap );
545- default :
545+ case GLOBAL :
546546 return computeRpc .getGlobalOperation (operationId .operation (), optionsMap );
547+ default :
548+ throw new IllegalArgumentException ("Unexpected operation identity type" );
547549 }
548550 }
549551 }, options ().retryParams (), EXCEPTION_HANDLER );
@@ -670,8 +672,10 @@ public Boolean call() {
670672 ZoneOperationId zoneOperationId = (ZoneOperationId ) operation ;
671673 return computeRpc .deleteZoneOperation (zoneOperationId .zone (),
672674 zoneOperationId .operation ());
673- default :
675+ case GLOBAL :
674676 return computeRpc .deleteGlobalOperation (operation .operation ());
677+ default :
678+ throw new IllegalArgumentException ("Unexpected operation identity type" );
675679 }
676680 }
677681 }, options ().retryParams (), EXCEPTION_HANDLER );
Original file line number Diff line number Diff line change @@ -692,7 +692,8 @@ public Operation reload(Compute.OperationOption... options) throws ComputeExcept
692692 }
693693
694694 /**
695- * Deletes this operation.
695+ * Deletes this operation. Delete is only possible for operations that have completed their
696+ * execution. Any attempt to delete a running operation will fail.
696697 *
697698 * @return {@code true} if operation was deleted, {@code false} if it was not found
698699 * @throws ComputeException upon failure
You can’t perform that action at this time.
0 commit comments