Skip to content

Commit a93ee23

Browse files
bpcreechBen Creechgcf-owl-bot[bot]
authored
fix: Supress unchecked conversion warnings (#1014)
* fix: Supress unchecked conversion warnings * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Ben Creech <bpcreech@google.com> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 2d57d78 commit a93ee23

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

google-cloud-logging/src/main/java/com/google/cloud/logging/Payload.java

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public static StringPayload of(String data) {
6868
return new StringPayload(data);
6969
}
7070

71+
@SuppressWarnings("unchecked")
7172
static StringPayload fromPb(com.google.logging.v2.LogEntry entryPb) {
7273
return StringPayload.of(entryPb.getTextPayload());
7374
}
@@ -124,6 +125,7 @@ public static JsonPayload of(Struct data) {
124125
return new JsonPayload(data);
125126
}
126127

128+
@SuppressWarnings("unchecked")
127129
static JsonPayload fromPb(com.google.logging.v2.LogEntry entryPb) {
128130
return JsonPayload.of(entryPb.getJsonPayload());
129131
}
@@ -148,6 +150,7 @@ public static ProtoPayload of(Any data) {
148150
return new ProtoPayload(data);
149151
}
150152

153+
@SuppressWarnings("unchecked")
151154
static ProtoPayload fromPb(com.google.logging.v2.LogEntry entryPb) {
152155
return ProtoPayload.of(entryPb.getProtoPayload());
153156
}

google-cloud-logging/src/main/java/com/google/cloud/logging/SinkInfo.java

+4
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public static BucketDestination of(String bucket) {
129129
return new BucketDestination(bucket);
130130
}
131131

132+
@SuppressWarnings("unchecked")
132133
static BucketDestination fromPb(String destinationPb) {
133134
Matcher matcher = PATTERN.matcher(destinationPb);
134135
if (!matcher.matches()) {
@@ -221,6 +222,7 @@ static boolean matchesDestination(String destinationPb) {
221222
return PATTERN.matcher(destinationPb).matches();
222223
}
223224

225+
@SuppressWarnings("unchecked")
224226
static DatasetDestination fromPb(String destinationPb) {
225227
Matcher matcher = PATTERN.matcher(destinationPb);
226228
if (!matcher.matches()) {
@@ -321,6 +323,7 @@ static boolean matchesDestination(String destinationPb) {
321323
return PATTERN.matcher(destinationPb).matches();
322324
}
323325

326+
@SuppressWarnings("unchecked")
324327
static LoggingBucketDestination fromPb(String destinationPb) {
325328
Matcher matcher = PATTERN.matcher(destinationPb);
326329
if (!matcher.matches()) {
@@ -413,6 +416,7 @@ static boolean matchesDestination(String destinationPb) {
413416
return PATTERN.matcher(destinationPb).matches();
414417
}
415418

419+
@SuppressWarnings("unchecked")
416420
static TopicDestination fromPb(String destinationPb) {
417421
Matcher matcher = PATTERN.matcher(destinationPb);
418422
if (!matcher.matches()) {

0 commit comments

Comments
 (0)