Skip to content

Commit db2c492

Browse files
Fix Null Dereference and Privacy Violation issues. (#763)
* Fix Null Dereference and Privacy Violation issues. * Fix Null Dereference * Undo changes on FabricConnection. It will be removed.
1 parent 29c5eb4 commit db2c492

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

dotnet/src/dotnetframework/GxClasses/Data/GXDataMysqlDriverCS.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ protected override string BuildConnectionString(string datasourceName, string us
9797
string maxpoolSize = GetParameterValue(connstr, "Max Pool Size");
9898
if (String.IsNullOrEmpty(maxpoolSize)) MAX_TRIES = 100;
9999
else MAX_TRIES = Convert.ToInt32(maxpoolSize);
100-
GXLogging.Debug(log, "MAX_TRIES=" + MAX_TRIES);
101100
return connstr;
102101
}
103102
public override bool AllowsDuplicateParameters

dotnet/src/extensions/Azure/Handlers/QueueHandler/QueueTriggerHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private QueueMessage SetupMessage(FunctionContext context, string item)
7878
private void ProcessMessage(FunctionContext context, ILogger log, QueueMessage queueMessage)
7979
{
8080
CallMappings callmap = (CallMappings)_callmappings;
81-
GxAzMappings map = callmap.mappings is object ? callmap.mappings.First(m => m.FunctionName == context.FunctionDefinition.Name) : null;
81+
GxAzMappings map = (callmap!=null && callmap.mappings is object) ? callmap.mappings.First(m => m.FunctionName == context.FunctionDefinition.Name) : null;
8282
string gxProcedure = map is object ? map.GXEntrypoint : string.Empty;
8383

8484
string exMessage;

dotnet/src/extensions/Azure/Handlers/ServiceBusHandler/ServiceBusTriggerHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private Message SetupMessage(FunctionContext context, string item)
102102
private void ProcessMessage(FunctionContext context, ILogger log, Message message)
103103
{
104104
CallMappings callmap = (CallMappings)_callmappings;
105-
GxAzMappings map = callmap.mappings is object ? callmap.mappings.First(m => m.FunctionName == context.FunctionDefinition.Name) : null;
105+
GxAzMappings map = (callmap!=null && callmap.mappings is object) ? callmap.mappings.First(m => m.FunctionName == context.FunctionDefinition.Name) : null;
106106
string gxProcedure = map is object ? map.GXEntrypoint : string.Empty;
107107

108108
string exMessage;

dotnet/src/extensions/Azure/Handlers/TimerHandler/TimerTriggerHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private void ProcessMessage(FunctionContext context, ILogger log, MyInfo TimerIn
4343
CallMappings callmap = (CallMappings)_callmappings;
4444

4545
GxAzMappings map = callmap.mappings is object ? callmap.mappings.First(m => m.FunctionName == context.FunctionDefinition.Name) : null;
46-
string gxProcedure = map is object ? map.GXEntrypoint : string.Empty;
46+
string gxProcedure = (map != null && map is object) ? map.GXEntrypoint : string.Empty;
4747
string exMessage;
4848

4949
if (!string.IsNullOrEmpty(gxProcedure))

0 commit comments

Comments
 (0)