Skip to content

Commit

Permalink
Cleanup JavaScript var usage - Fix #2876 (#2991)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Oct 28, 2024
1 parent 36ba53b commit c23ad29
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion js/src/Ice/ConnectionI.js
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ export class ConnectionI {
while (requestCount > 0) {
// adapter can be null here, however the adapter set in current can't be null, and we never pass
// a null current.adapter to the application code.
var request = new IncomingRequest(requestId, this, adapter, stream);
const request = new IncomingRequest(requestId, this, adapter, stream);

if (dispatcher !== null) {
// We don't and can't await the dispatchAsync: with batch requests, we want all the dispatches to
Expand Down
4 changes: 2 additions & 2 deletions js/src/Ice/IncomingRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class IncomingRequest {

// Read everything else from the input stream
const start = inputStream.pos;
var identity = new Identity();
const identity = new Identity();
identity._read(inputStream);

let facet = "";
Expand All @@ -52,7 +52,7 @@ export class IncomingRequest {
}

const encapsulationSize = inputStream.readInt();
var encoding = new EncodingVersion();
const encoding = new EncodingVersion();
encoding._read(inputStream);

this._current = new Current(adapter, connection, identity, facet, operation, mode, ctx, requestId, encoding);
Expand Down
2 changes: 1 addition & 1 deletion js/src/Ice/OutgoingAsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class ProxyOutgoingAsyncBase extends OutgoingAsyncBase {
++this._cnt;
Debug.assert(this._cnt > 0);

var retryIntervals = instance._retryIntervals;
const retryIntervals = instance._retryIntervals;

let interval = 0;
if (this._cnt == retryIntervals.length + 1 && ex instanceof CloseConnectionException) {
Expand Down
2 changes: 1 addition & 1 deletion js/src/Ice/OutputStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ EncapsEncoder11.InstanceData = class {

export class OutputStream {
constructor(arg1, arg2) {
var instance = null;
let instance = null;
this._encoding = null;

if (arg1 !== undefined && arg1 !== null) {
Expand Down
4 changes: 2 additions & 2 deletions js/src/Ice/Properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Properties {

getIcePropertyAsInt(key) {
const defaultValueString = Properties.getDefaultProperty(key);
var defaultValue = 0;
let defaultValue = 0;
if (defaultValueString != "") {
defaultValue = parseInt(defaultValueString);
}
Expand All @@ -84,7 +84,7 @@ export class Properties {
}

getIcePropertyAsList(key) {
var defaultPropertyList = StringUtil.splitString(Properties.getDefaultProperty(key), ", \t\r\n");
const defaultPropertyList = StringUtil.splitString(Properties.getDefaultProperty(key), ", \t\r\n");
return this.getPropertyAsListWithDefault(key, defaultPropertyList);
}

Expand Down
2 changes: 1 addition & 1 deletion js/src/Ice/Reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ export class RoutableReference extends Reference {
}

getRequestHandler() {
var handler = new ConnectRequestHandler(this);
const handler = new ConnectRequestHandler(this);
this.getConnection(handler);
return handler;
}
Expand Down
2 changes: 1 addition & 1 deletion js/test/Ice/middleware/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Middleware extends Ice.Object {
return this._next.dispatch(request);
} else {
this._inLog.push(this._name);
var response = await this._next.dispatch(request);
const response = await this._next.dispatch(request);
this._outLog.push(this._name);
return response;
}
Expand Down
2 changes: 1 addition & 1 deletion js/test/Ice/timeout/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class Client extends TestHelper {
}

{
var properties = communicator.getProperties().clone();
const properties = communicator.getProperties().clone();
properties.setProperty("Ice.Connection.Client.ConnectTimeout", "-1");
const [communicator2, _] = this.initialize(properties);

Expand Down

0 comments on commit c23ad29

Please sign in to comment.