Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compiler warnings related to nullability in Devices module (#495)
* chore: fix nullability in IDbContext * fix: get rid of infinite recursion * chore: remove unused method * refactor: fix nullability of PnsRegistrationsRepository.FindByDeviceId * refactor: make properties required * chore: add comment clarifying the usage of the empty ctor * chore: remove unused directive * chore: remove unused directive * refactor: set properties as nullable since any of two options could be missing * refactor: mark return type as nullable since it can indeed return null refactor: remove nullable mark from the input param as it is never null * refactor: mark return type as nullable since it can return null and the single call of the method suppresses null warnings * refactor: make property required as it is the single property of the class * refactor: put the nullability suffix back * refactor: mark the parameter as nullable as it can clearly be null * chore: remove unused directive * refactor: add nullable suppression and '?' suffix * chore: change parameter order to match the class * refactor: remove '?' suffix as options is never null * refactor: suppress null warnings as the object is instantiated as empty but the properties are then immediately set * refactor: avoid possible multiple enumeration * refactor: remove null suppression as AppId is never null * refactor: suppress null warning as it presumably can never be null * refactor: make the return type not nullable * refactor: throw exception in case of bundle being null * refactor: make the property nullable * chore: revert change * refactor: make the method signature match the one it is calling * refactor: avoid possible multiple enumeration * refactor: make the method signature match the one it is calling * refactor: add '?' suffix where required * refactor: remove meaningless '?' suffix * refactor: remove unnecessary async keyword * refactor: add '?' suffix where needed * refactor: throw exception in case that public key cannot be deserialized * refactor: throw exception in case that signature cannot be deserialized * chore: fix formatting issues * refactor: remove unnecessary null check * refactor: suppress null warning as ToModel never returns null * refactor: make input parameter nullable as it is checked for null value subsequently * refactor: suppress nullable warning as the class is never instantiated manually * refactor: suppress warning with 'null!' initializers as ClientDTO is only instantiated through mapper * refactor: make properties required * fix: remove required keyword as it seems to break some tests * refactor: remove 'null!' initializers as they seem to break some tests * fix: remove 'null!' initializers as they seem to break some tests * fix: remove 'null!' initializers as they seem to break some tests * fix: revert changes that seem to break some tests * refactor: revert to changes previously suspected to crash the tests * fix: wip * Revert "fix: wip" This reverts commit e6d96a7. * Revert "refactor: revert to changes previously suspected to crash the tests" This reverts commit e3d4a1a. * chore: remove redundant nullable directive * refactor: make properties required * chore: comment out the tests which are to be ignored at the moment * refactor: make property required * refactor: check expression for null * refactor: suppress null value as UserName is never null * refactor: throw exceptions where appropriate * refactor: suppress null value on instantiation * refactor: throw exception if basic tier not found * Revert "refactor: throw exception if basic tier not found" This reverts commit 6de40a4. * Revert "refactor: suppress null value on instantiation" This reverts commit 466e29b. * Revert "refactor: throw exceptions where appropriate" This reverts commit 0069918. * Revert "refactor: suppress null value as UserName is never null" This reverts commit 8be174e. * Revert "refactor: check expression for null" This reverts commit 2851b0e. * Revert "refactor: make property required" This reverts commit 08333ea. * refactor: make Provider property nullable * refactor: check expression for null * refactor: check expression for null * refactor: suppress null value as UserName is never null * chore: suppress null value for Read, ReadValue and ReadList * refactor: suppress null value on instantiation * refactor: throw exception if basic tier not found * Helm Chart: Update Consumer API, Admin UI and Admin CLI (#501) * feat: update adminui * feat: update consumerapi * Helm Chart: Update Consumer API, Admin UI and Admin CLI (#501) * feat: update adminui * feat: update consumerapi * refactor: suppress null warning since basic tier always exists * chore: fix formatting issues * refactor: suppress null warnings as values can never be null * refactor: suppress null warning since basic tier always exists * refactor: suppress the null warning since default value of identity is null * refactor: add '?' suffix to match the signature of base method * refactor: cast ids to list * refactor: remove unused field * refactor: suppress null value as UserName is never null * refactor: cast devices to list * refactor: add null checks for nullable parameters * chore: fix formatting issues * refactor: suppress null value as UserName is never null * chore: fix typo * refactor: make property nullable to match the nullability of non-dto class and add null check * refactor: fix formatting * refactor: add null checks due to properties being nullable * chore: fix formatting * refactor: match nullability of the base class return type * refactor: match nullability of the base class return type * refactor: initialize properties of SendResult with null! (not possible to use required but the values are never null) * refactor: make properties of ApnsMessageBuilder nullable * refactor: disable 'property unused' warnings (reluctant to remove unused class properties) * refactor: make property nullable * refactor: suppress nullability warning (class is never instanced in code) * refactor: remove null check as the value should never be null * refactor: mark Property as nullable (insantiated manually once where Data is set) * refactor: mark property as nullable * refactor: mark properties as nullable * refactor: mark properties as nullable * refactor: mark properties as nullable (insantiated manually once where values are set) * refactor: mark properties as nullable * refactor: mark properties as nullable (insantiated manually once where values are set) * refactor: make property nullable * refactor: make properties nullable * refactor: make properties nullable * refactor: make properties nullable * chore: remove unused directive * refactor: make property nullable (instantiated manually with empty ctor) * fix: return null check and disable the warning with comment * refactor: suppress null warnings in case of all properties previously marked as nullable * refactor: cast tiers to list * refactor: suppress nullable warnings * refactor: match signature of FindByAddress in IIdentitiesRepository to Task.FromResult refactor: match signature of FindByAddress implementations to implemented interface * refactor: suppress nullability warnings as JsonElement.Deserialize is presumed to work correctly * refactor: suppress null warnings as the instanced objects cannot be null * refactor: suppress null warnings in tests * refactor: fix nullability of CreateClientCommand * refactor: add invalid default values to ApplicationOptions to be able to make them not nullable * refactor: mkae RegisterDeviceCommand properties required (recursively) * refactor: fix nullability warnings in TiersRepository * refactor: make DeleteDeviceCommand.Id required * refactor: make ClientDTO.CreatedAt required * refactor: make ChallengeDTO.Id required * refactor: simplify IdentitySummaryDTO * refactor: fix nullability issues in DynamicJsonConverter * refactor: add some required modifiers * chore: formatting * refactor: make all properties except ClientId required - ClientId is nullable in Identity * refactor: make Properties required * refactor: make Property required * refactor: mark property as nullable * refactor: make property required to avoid compiler error * refactor: rearrange properties to match domain class refactor: pass in entire identity to ctor * refactor: pass the entire identity to base ctor * refactor: pass identity to ctor * refactor: remove redundant null warning suppression * refactor: remove redundant nullability suppression * refactor: remove redundant nullability suppression * refactor: make properties of DatawalletModifiedIntegrationEvent required * refactor: remove null warning suppression for usage of DatawalletModifiedIntegrationEvent * chore: fix formatting * refactor: make property of ExternalEventCreatedIntegrationEvent required and remove null warning suppression * refactor: remove null warning suppression * refactor: revert changes as they are to be done later * chore: remove pointless line breaks * chore: enhance formatting * chore: enhance formatting * chore: remove pointless line break * refactor: make properties of CreateIdentityResponse and CreateIdentityResponseDevice required * refactor: remove the '?' suffix as it makes no sense, though the class is never instanced in code and I cannot be 100% sure * refactor: make properties of NotificationTextAttribute required instead of nullable * chore: disable meaningless warnings with comments * refactor: use collection expression to initialize list * refactor: make properties of CustomOpenIddictEntityFrameworkCoreApplication required and remove redundant null warning suppression * refactor: initialize field with null in EF Core required ctor * refactor: initialize DbSets with 'null!' as discussed * refactor: remove redundant null warning suppression * refactor: mark return type as nullable * refactor: remove redundant null warning suppression * refactor: update return type * refactor: update return type and remove redundant null warning suppression * refactor: update return type * refactor: update return type and remove redundant null warning suppression * refactor: remove redundant null warning suppression * chore: add line break * refactor: revert changes as they are to be done later * refactor: remove redundant null warning suppression * refactor: remove redundant null warning suppression * refactor: match return type of the interface * refactor: add null warning suppression as _identity is not null * refactor: match return type of the interface * refactor: remove redundant null warning suppression * chore: fix formatting * refactor: remove redundant nullability suffix * Revert "refactor: remove redundant nullability suffix" This reverts commit 166c3f3. * refactor: revert changes to match the possible state of same property in ApplicationUser * refactor: replace null warning suppression with an exception throw * refactor: revert changes as they are to be done later * refactor: replace null warning suppression with an exception throw * refactor: revert changes to match the possible state of same property in ApplicationUser * refactor: make return type nullable * refactor: throw exception if OAuthClient not found * refactor: remove redundant null warning suppression * fix: make return type nullable instead of throwing an exception * refactor: update default values * refactor: change to FirstAsync call as basic tier always exists since it's seeded to the db * refactor: make return type not nullable * fix: revert to previous state * fix: revert changes done earlier * ci: trigger pipelines * refactor: make return type nullable and possibly return null * refactor: remove null warning suppression and return nullable type * refactor: change to FirstAsync call as basic tier always exists since it's seeded to the db and make return type non nullable * refactor: make return type nullable * refactor: change FirstAsync into FirstOrDefaultAsync * Revert "refactor: change FirstAsync into FirstOrDefaultAsync" This reverts commit 68c9ed6. * refactor: change FirstAsync into FirstOrDefaultAsync * chore: disable warning temporarily * refactor: remove null check * chore: formatting * chore: remove null suppression operator * chore: remove default values from PaginationOptions properties * feat: fix nullability in SendResult * chore: resolve nullability problems * chore: extract variable * chore: fix nullability issues for entity constructors * chore: remove redundant using directives * chore: add words to resharper dictionary * chore: remove unused setters from Identity * chore: fix some compiler warnings * chore: remove redundant assignment of null * refactor: rename GetBasicTierAsync to FindBasicTier to match naming convention * chore: fix some nullability issues * chore: formatting * test: fix DeletedAt comparison * fix: add CreatedAt and PublicKey to IdentityEntityTypeConfiguration * chore: formatting --------- Co-authored-by: Timo Notheisen <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Timo Notheisen <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information