Skip to content

Commit 99082c9

Browse files
author
Dhriti Chopra
committed
Reverting noop change
1 parent 409d83a commit 99082c9

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/ReadAsChannel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public ReadAsChannel withRangeSpec(RangeSpec range) {
9797
*/
9898
@BetaApi
9999
boolean getCrc32cValidationEnabled() {
100-
return !Hasher.noop().equals(hasher);
100+
return Hasher.enabled().equals(hasher);
101101
}
102102

103103
/**
@@ -111,7 +111,7 @@ boolean getCrc32cValidationEnabled() {
111111
*/
112112
@BetaApi
113113
ReadAsChannel withCrc32cValidationEnabled(boolean enabled) {
114-
if (enabled && !Hasher.noop().equals(hasher)) {
114+
if (enabled && Hasher.enabled().equals(hasher)) {
115115
return this;
116116
} else if (!enabled && Hasher.noop().equals(hasher)) {
117117
return this;

java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/ReadAsFutureByteString.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public ReadAsFutureByteString withRangeSpec(RangeSpec range) {
9797
*/
9898
@BetaApi
9999
boolean getCrc32cValidationEnabled() {
100-
return !Hasher.noop().equals(hasher);
100+
return Hasher.enabled().equals(hasher);
101101
}
102102

103103
/**
@@ -111,7 +111,7 @@ boolean getCrc32cValidationEnabled() {
111111
*/
112112
@BetaApi
113113
ReadAsFutureByteString withCrc32cValidationEnabled(boolean enabled) {
114-
if (enabled && !Hasher.noop().equals(hasher)) {
114+
if (enabled && Hasher.enabled().equals(hasher)) {
115115
return this;
116116
} else if (!enabled && Hasher.noop().equals(hasher)) {
117117
return this;

java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/ReadAsFutureBytes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public ReadAsFutureBytes withRangeSpec(RangeSpec range) {
9292
*/
9393
@BetaApi
9494
boolean getCrc32cValidationEnabled() {
95-
return !Hasher.noop().equals(hasher);
95+
return Hasher.enabled().equals(hasher);
9696
}
9797

9898
/**
@@ -106,7 +106,7 @@ boolean getCrc32cValidationEnabled() {
106106
*/
107107
@BetaApi
108108
ReadAsFutureBytes withCrc32cValidationEnabled(boolean enabled) {
109-
if (enabled && !Hasher.noop().equals(hasher)) {
109+
if (enabled && Hasher.enabled().equals(hasher)) {
110110
return this;
111111
} else if (!enabled && Hasher.noop().equals(hasher)) {
112112
return this;

java-storage/google-cloud-storage/src/main/java/com/google/cloud/storage/ReadAsSeekableChannel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public ReadAsSeekableChannel withRangeSpecFunction(RangeSpecFunction rangeSpecFu
9494
*/
9595
@BetaApi
9696
boolean getCrc32cValidationEnabled() {
97-
return !Hasher.noop().equals(hasher);
97+
return Hasher.enabled().equals(hasher);
9898
}
9999

100100
/**
@@ -108,7 +108,7 @@ boolean getCrc32cValidationEnabled() {
108108
*/
109109
@BetaApi
110110
ReadAsSeekableChannel withCrc32cValidationEnabled(boolean enabled) {
111-
if (enabled && !Hasher.noop().equals(hasher)) {
111+
if (enabled && Hasher.enabled().equals(hasher)) {
112112
return this;
113113
} else if (!enabled && Hasher.noop().equals(hasher)) {
114114
return this;

0 commit comments

Comments
 (0)