Skip to content

Commit aa8c11e

Browse files
committed
Address sonarcloud issues
1 parent d4397d1 commit aa8c11e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/main/typescript/client/GitHubClientImpl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ export class GitHubClientImpl implements GitHubClient {
1313

1414
private static readonly DEFAULT_API_POLL_INTERVAL: number = 60;
1515

16+
private readonly engine: HttpEngine;
17+
1618
private _pollInterval: number;
1719

1820
private _domain: string;
1921

2022
private _token: string;
2123

22-
private engine: HttpEngine;
23-
2424
public constructor(domain: string, token: string, engine: HttpEngine) {
2525
this._pollInterval = GitHubClientImpl.DEFAULT_API_POLL_INTERVAL;
2626

src/main/typescript/client/Http.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export enum HttpMethod {
1212
}
1313

1414
export class HttpRequest {
15-
private _url: string;
16-
private _method: HttpMethod;
17-
private _body: RequestBody | undefined;
15+
private readonly _url: string;
16+
private readonly _method: HttpMethod;
1817
private readonly _headers: Map<string, string>;
18+
private _body: RequestBody | undefined;
1919

2020
public constructor(method: HttpMethod, url: string, body?: RequestBody, headers?: Map<string, string>) {
2121
this._method = method;

src/main/typescript/utils/gnome.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface BaseGObject<K extends GObject.Object> {
2828
export function registerGObject<K extends GObject.Object, T extends BaseGObject<K>>(target: T): T {
2929
// Note that we use 'hasOwnProperty' because otherwise we would get inherited meta infos.
3030
// This would be bad because we would inherit the GObjectName too, which is supposed to be unique.
31-
if (target.metaInfo !== undefined && Object.prototype.hasOwnProperty.call(target, 'metaInfo')) {
31+
if (target.metaInfo !== undefined && Object.hasOwn(target, 'metaInfo')) {
3232
LOGGER.debug('Registering GObject {0} with metaInfo', typeof target);
3333
return GObject.registerClass(target.metaInfo, target);
3434
} else {

0 commit comments

Comments
 (0)