Skip to content

Commit

Permalink
Fixed sonarqube security hotspot
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Hofmann <oss@hoffe.org>
  • Loading branch information
hoffe86 committed Feb 25, 2024
1 parent 347a14f commit ceb9480
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/openHAB.Core.Client/Connection/ConnectionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public ConnectionService(OpenHABHttpClient openHABHttpClient, ILogger<Connection
}

/// <inheritdoc/>
public Models.Connection CurrentConnection
public Models.Connection CurrentConnection
{
get => _connection;
get => _connection;
}

/// <inheritdoc/>
Expand Down Expand Up @@ -167,7 +167,7 @@ public async Task<HttpResponseResult<ServerInfo>> GetOpenHABServerInfo(Models.Co
return new HttpResponseResult<ServerInfo>(serverInfo, result.StatusCode);
}

string runtimeversion = Regex.Replace(apiInfo?.RuntimeInfo.Version, "[^.0-9]", string.Empty);
string runtimeversion = Regex.Replace(apiInfo?.RuntimeInfo.Version, "[^.0-9]", string.Empty, RegexOptions.CultureInvariant, TimeSpan.FromSeconds(1));
if (!Version.TryParse(runtimeversion, out Version serverVersion))
{
string message = "Not able to parse runtime version from openHAB server";
Expand Down

0 comments on commit ceb9480

Please sign in to comment.