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
}

0 commit comments

Comments
 (0)