Skip to content

Commit 1a64287

Browse files
author
Bart Koelman
committed
Fixed broken build after reformat
1 parent 30b46f6 commit 1a64287

File tree

16 files changed

+26
-26
lines changed

16 files changed

+26
-26
lines changed

src/JsonApiDotNetCore/Hooks/Internal/Discovery/HooksDiscovery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private void DiscoverImplementedHooks(Type containerType)
6767

6868
foreach (ResourceHook hook in _allHooks)
6969
{
70-
MethodInfo? method = containerType.GetMethod(hook.ToString("G"));
70+
MethodInfo method = containerType.GetMethod(hook.ToString("G"));
7171

7272
if (method == null || method.DeclaringType == _boundResourceDefinitionType)
7373
{

src/JsonApiDotNetCore/Hooks/Internal/Execution/HookExecutorHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ private void AddToImplicitlyAffected(IEnumerable includedLefts, RelationshipAttr
280280

281281
private static void AddToList(IList list, IEnumerable itemsToAdd)
282282
{
283-
foreach (object? item in itemsToAdd)
283+
foreach (object item in itemsToAdd)
284284
{
285285
list.Add(item);
286286
}

src/JsonApiDotNetCore/Hooks/Internal/ResourceHookExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ private void ValidateHookResponse<T>(IEnumerable<T> returnedList, ResourcePipeli
448448
/// </summary>
449449
private IEnumerable CallHook(IResourceHookContainer container, ResourceHook hook, object[] arguments)
450450
{
451-
MethodInfo? method = container.GetType().GetMethod(hook.ToString("G"));
451+
MethodInfo method = container.GetType().GetMethod(hook.ToString("G"));
452452
// note that some of the hooks return "void". When these hooks, the
453453
// are called reflectively with Invoke like here, the return value
454454
// is just null, so we don't have to worry about casting issues here.

src/JsonApiDotNetCore/Hooks/Internal/Traversal/RelationshipProxy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public object GetValue(IIdentifiable resource)
6767
return null;
6868
}
6969

70-
foreach (object? throughResource in throughResources)
70+
foreach (object throughResource in throughResources)
7171
{
7272
var rightResource = (IIdentifiable)hasManyThrough.RightProperty.GetValue(throughResource);
7373

@@ -110,7 +110,7 @@ public void SetValue(IIdentifiable resource, object value)
110110
var filteredList = new List<object>();
111111
IList rightResources = TypeHelper.CopyToList((IEnumerable)value, RightType);
112112

113-
foreach (object? throughResource in throughResources ?? Array.Empty<object>())
113+
foreach (object throughResource in throughResources ?? Array.Empty<object>())
114114
{
115115
if (rightResources.Contains(hasManyThrough.RightProperty.GetValue(throughResource)))
116116
{

src/JsonApiDotNetCore/Hooks/Internal/Traversal/TraversalHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private Dictionary<RightType, List<KeyValuePair<RelationshipProxy, List<IIdentif
147147
ExtractLeftResources(leftResources, relationships, rightResourcesGrouped, leftResourcesGrouped);
148148
}
149149

150-
MethodInfo? processResourcesMethod = GetType().GetMethod(nameof(ProcessResources), BindingFlags.NonPublic | BindingFlags.Instance);
150+
MethodInfo processResourcesMethod = GetType().GetMethod(nameof(ProcessResources), BindingFlags.NonPublic | BindingFlags.Instance);
151151

152152
foreach (KeyValuePair<RelationshipProxy, List<IIdentifiable>> kvp in rightResourcesGrouped)
153153
{

src/JsonApiDotNetCore/Middleware/JsonApiRoutingConvention.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private Type ExtractResourceTypeFromController(Type type)
153153

154154
while (!currentType.IsGenericType || currentType.GetGenericTypeDefinition() != baseControllerType)
155155
{
156-
Type? nextBaseType = currentType.BaseType;
156+
Type nextBaseType = currentType.BaseType;
157157

158158
if ((nextBaseType == aspNetControllerType || nextBaseType == coreControllerType) && currentType.IsGenericType)
159159
{

src/JsonApiDotNetCore/Middleware/TraceLogWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private static void WriteProperty(StringBuilder builder, PropertyInfo property,
7676
builder.Append(property.Name);
7777
builder.Append(": ");
7878

79-
object? value = property.GetValue(instance);
79+
object value = property.GetValue(instance);
8080

8181
if (value == null)
8282
{
@@ -111,7 +111,7 @@ private static bool HasToStringOverload(Type type)
111111
{
112112
if (type != null)
113113
{
114-
MethodInfo? toStringMethod = type.GetMethod("ToString", Array.Empty<Type>());
114+
MethodInfo toStringMethod = type.GetMethod("ToString", Array.Empty<Type>());
115115

116116
if (toStringMethod != null && toStringMethod.DeclaringType != typeof(object))
117117
{

src/JsonApiDotNetCore/Resources/Annotations/HasManyThroughAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public override object GetValue(object resource)
132132
{
133133
ArgumentGuard.NotNull(resource, nameof(resource));
134134

135-
object? throughEntity = ThroughProperty.GetValue(resource);
135+
object throughEntity = ThroughProperty.GetValue(resource);
136136

137137
if (throughEntity == null)
138138
{

src/JsonApiDotNetCore/Serialization/JsonApiReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private bool HasMissingId(object model)
221221
/// </summary>
222222
private bool HasMissingId(IEnumerable models)
223223
{
224-
foreach (object? model in models)
224+
foreach (object model in models)
225225
{
226226
if (TryGetId(model, out string id) && id == null)
227227
{

src/JsonApiDotNetCore/TypeHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public static bool TypeCanContainHashSet(Type collectionType)
294294
/// </summary>
295295
public static Type GetIdType(Type resourceType)
296296
{
297-
PropertyInfo? property = resourceType.GetProperty(nameof(Identifiable.Id));
297+
PropertyInfo property = resourceType.GetProperty(nameof(Identifiable.Id));
298298

299299
if (property == null)
300300
{
@@ -375,7 +375,7 @@ public static IEnumerable CopyToTypedCollection(IEnumerable source, Type collect
375375
Type concreteCollectionType = ToConcreteCollectionType(collectionType);
376376
dynamic concreteCollectionInstance = CreateInstance(concreteCollectionType);
377377

378-
foreach (object? item in source)
378+
foreach (object item in source)
379379
{
380380
concreteCollectionInstance.Add((dynamic)item);
381381
}

test/JsonApiDotNetCoreExampleTests/IntegrationTests/QueryStrings/Filtering/FilterDataTypeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public async Task Can_filter_equality_on_type(string propertyName, object value)
4444
{
4545
// Arrange
4646
var resource = new FilterableResource();
47-
PropertyInfo? property = typeof(FilterableResource).GetProperty(propertyName);
47+
PropertyInfo property = typeof(FilterableResource).GetProperty(propertyName);
4848
property?.SetValue(resource, value);
4949

5050
await _testContext.RunOnDatabaseAsync(async dbContext =>
@@ -256,7 +256,7 @@ public async Task Can_filter_is_null_on_type(string propertyName)
256256
{
257257
// Arrange
258258
var resource = new FilterableResource();
259-
PropertyInfo? property = typeof(FilterableResource).GetProperty(propertyName);
259+
PropertyInfo property = typeof(FilterableResource).GetProperty(propertyName);
260260
property?.SetValue(resource, null);
261261

262262
var otherResource = new FilterableResource

test/JsonApiDotNetCoreExampleTests/IntegrationTests/ReadWrite/Creating/CreateResourceTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
110110
workItemInDatabase.DueAt.Should().Be(newWorkItem.DueAt);
111111
});
112112

113-
PropertyInfo? property = typeof(WorkItem).GetProperty(nameof(Identifiable.Id));
113+
PropertyInfo property = typeof(WorkItem).GetProperty(nameof(Identifiable.Id));
114114
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(int));
115115
}
116116

@@ -157,7 +157,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
157157
userAccountInDatabase.LastName.Should().Be(newUserAccount.LastName);
158158
});
159159

160-
PropertyInfo? property = typeof(UserAccount).GetProperty(nameof(Identifiable.Id));
160+
PropertyInfo property = typeof(UserAccount).GetProperty(nameof(Identifiable.Id));
161161
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(long));
162162
}
163163

@@ -201,7 +201,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
201201
groupInDatabase.Name.Should().Be(newGroup.Name);
202202
});
203203

204-
PropertyInfo? property = typeof(WorkItemGroup).GetProperty(nameof(Identifiable.Id));
204+
PropertyInfo property = typeof(WorkItemGroup).GetProperty(nameof(Identifiable.Id));
205205
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(Guid));
206206
}
207207

test/JsonApiDotNetCoreExampleTests/IntegrationTests/ReadWrite/Creating/CreateResourceWithClientGeneratedIdTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
6969
groupInDatabase.Name.Should().Be(newGroup.Name);
7070
});
7171

72-
PropertyInfo? property = typeof(WorkItemGroup).GetProperty(nameof(Identifiable.Id));
72+
PropertyInfo property = typeof(WorkItemGroup).GetProperty(nameof(Identifiable.Id));
7373
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(Guid));
7474
}
7575

@@ -115,7 +115,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
115115
groupInDatabase.Name.Should().Be(newGroup.Name);
116116
});
117117

118-
PropertyInfo? property = typeof(WorkItemGroup).GetProperty(nameof(Identifiable.Id));
118+
PropertyInfo property = typeof(WorkItemGroup).GetProperty(nameof(Identifiable.Id));
119119
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(Guid));
120120
}
121121

@@ -155,7 +155,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
155155
colorInDatabase.DisplayName.Should().Be(newColor.DisplayName);
156156
});
157157

158-
PropertyInfo? property = typeof(RgbColor).GetProperty(nameof(Identifiable.Id));
158+
PropertyInfo property = typeof(RgbColor).GetProperty(nameof(Identifiable.Id));
159159
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(string));
160160
}
161161

@@ -195,7 +195,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
195195
colorInDatabase.DisplayName.Should().Be(newColor.DisplayName);
196196
});
197197

198-
PropertyInfo? property = typeof(RgbColor).GetProperty(nameof(Identifiable.Id));
198+
PropertyInfo property = typeof(RgbColor).GetProperty(nameof(Identifiable.Id));
199199
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(string));
200200
}
201201

test/JsonApiDotNetCoreExampleTests/IntegrationTests/ReadWrite/Updating/Resources/UpdateResourceTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
209209
groupInDatabase.IsPublic.Should().Be(existingGroup.IsPublic);
210210
});
211211

212-
PropertyInfo? property = typeof(WorkItemGroup).GetProperty(nameof(Identifiable.Id));
212+
PropertyInfo property = typeof(WorkItemGroup).GetProperty(nameof(Identifiable.Id));
213213
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(Guid));
214214
}
215215

@@ -256,7 +256,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
256256
colorInDatabase.DisplayName.Should().Be(newDisplayName);
257257
});
258258

259-
PropertyInfo? property = typeof(RgbColor).GetProperty(nameof(Identifiable.Id));
259+
PropertyInfo property = typeof(RgbColor).GetProperty(nameof(Identifiable.Id));
260260
property.Should().NotBeNull().And.Subject.PropertyType.Should().Be(typeof(string));
261261
}
262262

test/TestBuildingBlocks/FakerContainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private static MethodBase GetTestMethod()
2222
{
2323
var stackTrace = new StackTrace();
2424

25-
MethodBase? testMethod = stackTrace.GetFrames().Select(stackFrame => stackFrame?.GetMethod()).FirstOrDefault(IsTestMethod);
25+
MethodBase testMethod = stackTrace.GetFrames().Select(stackFrame => stackFrame?.GetMethod()).FirstOrDefault(IsTestMethod);
2626

2727
if (testMethod == null)
2828
{

test/UnitTests/Serialization/Common/BaseDocumentParserTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void DeserializeAttributes_VariousDataTypes_CanDeserialize(string member,
142142

143143
// Assert
144144
PropertyInfo pi = ResourceGraph.GetResourceContext("testResource").Attributes.Single(attr => attr.PublicName == member).Property;
145-
object? deserializedValue = pi.GetValue(resource);
145+
object deserializedValue = pi.GetValue(resource);
146146

147147
if (member == "intField")
148148
{

0 commit comments

Comments
 (0)