Skip to content

Commit 1c79ad7

Browse files
fix: Swap writer and reader schema to correct places in sample (#1849)
* samples: schema evolution * samples: schema evolution * Format fixes * Fix documentation for field. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add back in working asserts * Formatting fixes * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Version/delete fixes * samples: schema evolution * samples: schema evolution * Format fixes * Fix documentation for field. * Add back in working asserts * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Formatting fixes * Version/delete fixes * samples: Schema evolution (#1499) * samples: schema evolution * samples: schema evolution * Format fixes * Fix documentation for field. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add back in working asserts * Formatting fixes * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Version/delete fixes * samples: schema evolution * samples: schema evolution * Format fixes * Fix documentation for field. * Add back in working asserts * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Formatting fixes * Version/delete fixes --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * Minor fixes for comments * samples: Schema evolution (#1499) * samples: schema evolution * samples: schema evolution * Format fixes * Fix documentation for field. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add back in working asserts * Formatting fixes * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Version/delete fixes * samples: schema evolution * samples: schema evolution * Format fixes * Fix documentation for field. * Add back in working asserts * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Formatting fixes * Version/delete fixes --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * Fix rollback example * Formatting * Formatting and wording fixes * Add new schemas to test directory * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Samples: Fix exception handling * fix: Set x-goog-request-params for streaming pull request * Revert "fix: Set x-goog-request-params for streaming pull request" This reverts commit 3185a3e. * Revert "Revert "fix: Set x-goog-request-params for streaming pull request"" This reverts commit 3b1f4d9. * Thread example * Add examples for limited and unlimited exeuctors * Add back missing semicolon * Revert changes to original async example * Revert changes to original async example * Add examples of different threading models * Make variables final to conform to style. * Fix catches * Fix ids * Fix naming * Revert "Merge pull request #2 from kamalaboulhosn/ML_experiments" This reverts commit 5a435fa, reversing changes made to c3a5725. * Set blunderbuss config to auto-assign issues and PRs * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: Swap writer and reader schema to correct places in sample * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent a5b4d5e commit 1c79ad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/snippets/src/main/java/pubsub/SubscribeWithAvroSchemaRevisionsExample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static void subscribeWithAvroSchemaRevisionsExample(
9393
Schema schema = schemaServiceClient.getSchema(name + "@" + revision);
9494
org.apache.avro.Schema avroSchema =
9595
new org.apache.avro.Schema.Parser().parse(schema.getDefinition());
96-
reader = new SpecificDatumReader<State>(State.getClassSchema(), avroSchema);
96+
reader = new SpecificDatumReader<State>(avroSchema, State.getClassSchema());
9797
synchronized (revisionReaders) {
9898
revisionReaders.put(revision, reader);
9999
}

0 commit comments

Comments
 (0)