Repository navigation
Update almost all classes to support IDisposable pattern - #1537
Merged
masesdevelopers merged 16 commits intoApr 18, 2026
Conversation
…-reports-problems-with-disposable-classes-2
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
| if (!_localKeyDes) | ||
| { | ||
| _keyDeserializer ??= _factory?.BuildKeySerDes<K, TJVMK>(); | ||
| _localKey = _keyDeserializer.UseHeaders ? _keyDeserializer.DeserializeWithHeaders(Topic, Headers, _record.Key()) : _keyDeserializer.Deserialize(Topic, _record.Key()); |
| if (!_localValueDes) | ||
| { | ||
| _valueDeserializer ??= _factory?.BuildValueSerDes<V, TJVMV>(); | ||
| _localValue = _valueDeserializer.UseHeaders ? _valueDeserializer.DeserializeWithHeaders(Topic, Headers, _record.Value()) : _valueDeserializer.Deserialize(Topic, _record.Value()); |
| /// KNet implementation of <see href="https://www.javadoc.io/doc/org.apache.kafka/kafka-streams/4.2.0/org/apache/kafka/streams/kstream/Windowed.html#key()"/> | ||
| /// </summary> | ||
| /// <returns><typeparamref name="K"/></returns> | ||
| public K Key { get { CheckDisposed(); _keySerDes ??= _factory?.BuildKeySerDes<K, TJVMK>(); return _keySerDes.Deserialize(null, _inner.Key()); } } |
| CheckDisposed(); | ||
| _valueSerDes ??= _factory?.BuildKeySerDes<V, TJVMV>(); | ||
| var vv = _valueAndTimestamp.Value(); | ||
| return _valueSerDes.Deserialize(null, vv); |
…-reports-problems-with-disposable-classes-2
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
| if (!_keyStored) | ||
| { | ||
| _keySerDes ??= _factory?.BuildKeySerDes<K, TJVMK>(); | ||
| _key = _keySerDes.Deserialize(null, _inner.Key); |
| if (!_valueStored) | ||
| { | ||
| _valueSerDes ??= _factory?.BuildValueSerDes<V, TJVMV>(); | ||
| _value = _valueSerDes.Deserialize(null, _inner.Value); |
| if (fromPrefetched) | ||
| { | ||
| _keySerDes ??= _factory?.BuildKeySerDes<K, TJVMK>(); | ||
| _key = _keySerDes.Deserialize(null, _inner.Key); |
| if (!_keyStored) | ||
| { | ||
| _keySerDes ??= _factory?.BuildKeySerDes<K, TJVMK>(); | ||
| _key = _keySerDes.Deserialize(null, _inner.Key); |
| /// <typeparam name="TJVMV">The JVM type of <typeparamref name="V"/></typeparam> | ||
| public class TimeWindowedCogroupedKStream<K, V, TJVMK, TJVMV> : IGenericSerDesFactoryApplier, IDisposable | ||
| { | ||
| Org.Apache.Kafka.Streams.Kstream.TimeWindowedCogroupedKStream<TJVMK, TJVMV> _inner; |
| /// <typeparam name="TJVMV">The JVM type of <typeparamref name="V"/></typeparam> | ||
| public class SessionWindowedCogroupedKStream<K, V, TJVMK, TJVMV> : IGenericSerDesFactoryApplier, IDisposable | ||
| { | ||
| Org.Apache.Kafka.Streams.Kstream.SessionWindowedCogroupedKStream<TJVMK, TJVMV> _inner; |
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
masesdevelopers
deleted the
1460-on-every-pull-request-copilot-autofix-reports-problems-with-disposable-classes-2
branch
April 18, 2026 10:31
masesdevelopers
added a commit
that referenced
this pull request
Apr 18, 2026
* Temporary remove class to check its generation * Removes since it is internal * Adds IDisposable pattern on many classes with a short live * Adds Disposable where the objects ends their life * Review test program to test Dispose behavior * Updates other classes to implement IDisposable * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Update message of ObjectDisposedException * General review of Dispose to reduce lock contention * Promote threads to be background in case of failure on their close * Merge fix * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
masesdevelopers
added a commit
that referenced
this pull request
Apr 18, 2026
* Update almost all classes to support IDisposable pattern (#1537) * Temporary remove class to check its generation * Removes since it is internal * Adds IDisposable pattern on many classes with a short live * Adds Disposable where the objects ends their life * Review test program to test Dispose behavior * Updates other classes to implement IDisposable * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Update message of ObjectDisposedException * General review of Dispose to reduce lock contention * Promote threads to be background in case of failure on their close * Merge fix * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Update tab with spaces * Updates to 3.9.2 * Other updates * Revert change --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: