Skip to content

Commit 9f4deaf

Browse files
authored
Fix typo: recieve (openhab#18177)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
1 parent dfb322b commit 9f4deaf

File tree

28 files changed

+58
-58
lines changed

28 files changed

+58
-58
lines changed

bundles/org.openhab.binding.bluetooth/src/main/java/org/openhab/binding/bluetooth/ConnectedBluetoothHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public void onConnectionStateChange(BluetoothConnectionStatusNotification connec
322322
public void onCharacteristicUpdate(BluetoothCharacteristic characteristic, byte[] value) {
323323
super.onCharacteristicUpdate(characteristic, value);
324324
if (logger.isDebugEnabled()) {
325-
logger.debug("Recieved update {} to characteristic {} of device {}", HexUtils.bytesToHex(value),
325+
logger.debug("Received update {} to characteristic {} of device {}", HexUtils.bytesToHex(value),
326326
characteristic.getUuid(), address);
327327
}
328328
}

bundles/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/handler/KeypadThingHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void dscAlarmEventReceived(EventObject event, Thing thing) {
139139
.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
140140
String dscAlarmMessageData = dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.DATA);
141141

142-
logger.debug("dscAlarmEventRecieved(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
142+
logger.debug("dscAlarmEventReceived(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
143143

144144
switch (dscAlarmCode) {
145145
case KeypadLEDState: /* 510 */

bundles/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/handler/PanelThingHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ public void dscAlarmEventReceived(EventObject event, Thing thing) {
435435
ChannelUID channelUID = null;
436436
DSCAlarmCode dscAlarmCode = DSCAlarmCode
437437
.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
438-
logger.debug("dscAlarmEventRecieved(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
438+
logger.debug("dscAlarmEventReceived(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
439439

440440
int state = 0;
441441

bundles/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/handler/PartitionThingHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public void dscAlarmEventReceived(EventObject event, Thing thing) {
197197
String dscAlarmMessageName = dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.NAME);
198198
String dscAlarmMessageMode = dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.MODE);
199199

200-
logger.debug("dscAlarmEventRecieved(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
200+
logger.debug("dscAlarmEventReceived(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
201201

202202
switch (dscAlarmCode) {
203203
case PartitionReady: /* 650 */

bundles/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/handler/ZoneThingHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public void dscAlarmEventReceived(EventObject event, Thing thing) {
132132
ChannelUID channelUID = null;
133133
DSCAlarmCode dscAlarmCode = DSCAlarmCode
134134
.getDSCAlarmCodeValue(dscAlarmMessage.getMessageInfo(DSCAlarmMessageInfoType.CODE));
135-
logger.debug("dscAlarmEventRecieved(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
135+
logger.debug("dscAlarmEventReceived(): Thing - {} Command - {}", thing.getUID(), dscAlarmCode);
136136

137137
int state = 0;
138138
String status = "";

bundles/org.openhab.binding.gree/src/main/java/org/openhab/binding/gree/internal/GreeCryptoUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static String decryptPack(byte[] keyarray, String message) throws GreeExc
120120
return new String(bytePlainText, StandardCharsets.UTF_8);
121121
} catch (NoSuchAlgorithmException | NoSuchPaddingException | BadPaddingException | InvalidKeyException
122122
| IllegalBlockSizeException ex) {
123-
throw new GreeException("Decryption of recieved data failed", ex);
123+
throw new GreeException("Decryption of received data failed", ex);
124124
}
125125
}
126126

@@ -145,7 +145,7 @@ public static String decryptGCMPack(byte[] keyBytes, String pack, String tag) th
145145
return new String(bytePlainText, StandardCharsets.UTF_8);
146146
} catch (NoSuchAlgorithmException | NoSuchPaddingException | BadPaddingException | InvalidKeyException
147147
| IllegalBlockSizeException | InvalidAlgorithmParameterException ex) {
148-
throw new GreeException("GCM decryption of recieved data failed", ex);
148+
throw new GreeException("GCM decryption of received data failed", ex);
149149
}
150150
}
151151

bundles/org.openhab.binding.gree/src/main/java/org/openhab/binding/gree/internal/handler/GreeAirDevice.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public void bindWithDevice(DatagramSocket clientSocket, EncryptionTypes encrypti
164164
DatagramPacket sendPacket = createPackRequest(1, encryptedBindReqData);
165165
clientSocket.send(sendPacket);
166166

167-
// Recieve a response, create the JSON to hold the response values
167+
// Receive a response, create the JSON to hold the response values
168168
GreeBindResponseDTO resp = receiveResponse(clientSocket, GreeBindResponseDTO.class);
169169
resp.decryptedPack = GreeCryptoUtil.decrypt(resp, encType);
170170
resp.packJson = GSON.fromJson(resp.decryptedPack, GreeBindResponsePackDTO.class);

bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/HttpOnlyHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {
7070
try {
7171
ipCameraHandler.audioThreshold = Integer.valueOf(command.toString());
7272
} catch (NumberFormatException e) {
73-
logger.warn("Audio Threshold recieved an unexpected command, was it a number?");
73+
logger.warn("Audio Threshold received an unexpected command, was it a number?");
7474
}
7575
}
7676
ipCameraHandler.setupFfmpegFormat(FFmpegFormat.RTSP_ALARMS);

bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/handler/IpCameraHandler.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ public class IpCameraHandler extends BaseThingHandler {
199199

200200
// These methods handle the response from all camera brands, nothing specific to 1 brand.
201201
private class CommonCameraHandler extends ChannelDuplexHandler {
202-
private int bytesToRecieve = 0;
203-
private int bytesAlreadyRecieved = 0;
202+
private int bytesToReceive = 0;
203+
private int bytesAlreadyReceived = 0;
204204
private byte[] incomingJpeg = new byte[0];
205205
private String incomingMessage = "";
206206
private String contentType = "empty";
@@ -229,7 +229,7 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
229229
contentType = response.headers().getAsString(name);
230230
break;
231231
case "content-length":
232-
bytesToRecieve = Integer.parseInt(response.headers().getAsString(name));
232+
bytesToReceive = Integer.parseInt(response.headers().getAsString(name));
233233
break;
234234
case "transfer-encoding":
235235
if (response.headers().getAsString(name).contains("chunked")) {
@@ -252,11 +252,11 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
252252
}
253253
}
254254
} else if (contentType.contains("image/jp")) {
255-
if (bytesToRecieve == 0) {
256-
bytesToRecieve = 768000; // 0.768 Mbyte when no Content-Length is sent
255+
if (bytesToReceive == 0) {
256+
bytesToReceive = 768000; // 0.768 Mbyte when no Content-Length is sent
257257
logger.debug("Camera has no Content-Length header, we have to guess how much RAM.");
258258
}
259-
incomingJpeg = new byte[bytesToRecieve];
259+
incomingJpeg = new byte[bytesToReceive];
260260
}
261261
}
262262
} else {
@@ -277,7 +277,7 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
277277
// Found some cameras use Content-Type: image/jpg instead of image/jpeg
278278
if (contentType.contains("image/jp")) {
279279
for (int i = 0; i < content.content().capacity(); i++) {
280-
incomingJpeg[bytesAlreadyRecieved++] = content.content().getByte(i);
280+
incomingJpeg[bytesAlreadyReceived++] = content.content().getByte(i);
281281
}
282282
if (content instanceof LastHttpContent) {
283283
processSnapshot(incomingJpeg);
@@ -289,54 +289,54 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
289289
} else {
290290
incomingMessage += content.content().toString(CharsetUtil.UTF_8);
291291
}
292-
bytesAlreadyRecieved = incomingMessage.length();
292+
bytesAlreadyReceived = incomingMessage.length();
293293
if (content instanceof LastHttpContent) {
294294
// If it is not an image send it on to the next handler//
295-
if (bytesAlreadyRecieved != 0) {
295+
if (bytesAlreadyReceived != 0) {
296296
reply = incomingMessage;
297297
super.channelRead(ctx, reply);
298298
}
299299
}
300300
// Alarm Streams never have a LastHttpContent as they always stay open//
301301
else if (contentType.contains("multipart")) {
302302
int beginIndex, endIndex;
303-
if (bytesToRecieve == 0) {
303+
if (bytesToReceive == 0) {
304304
beginIndex = incomingMessage.indexOf("Content-Length:");
305305
if (beginIndex != -1) {
306306
endIndex = incomingMessage.indexOf("\r\n", beginIndex);
307307
if (endIndex != -1) {
308-
bytesToRecieve = Integer.parseInt(
308+
bytesToReceive = Integer.parseInt(
309309
incomingMessage.substring(beginIndex + 15, endIndex).strip());
310310
}
311311
}
312312
}
313313
// --boundary and headers are not included in the Content-Length value
314-
if (bytesAlreadyRecieved > bytesToRecieve) {
314+
if (bytesAlreadyReceived > bytesToReceive) {
315315
// Check if message has a second --boundary
316-
endIndex = incomingMessage.indexOf("--" + boundary, bytesToRecieve);
316+
endIndex = incomingMessage.indexOf("--" + boundary, bytesToReceive);
317317
if (endIndex == -1) {
318318
reply = incomingMessage;
319319
incomingMessage = "";
320-
bytesToRecieve = 0;
321-
bytesAlreadyRecieved = 0;
320+
bytesToReceive = 0;
321+
bytesAlreadyReceived = 0;
322322
} else {
323323
reply = incomingMessage.substring(0, endIndex);
324324
incomingMessage = incomingMessage.substring(endIndex, incomingMessage.length());
325-
bytesToRecieve = 0;// Triggers search next time for Content-Length:
326-
bytesAlreadyRecieved = incomingMessage.length() - endIndex;
325+
bytesToReceive = 0;// Triggers search next time for Content-Length:
326+
bytesAlreadyReceived = incomingMessage.length() - endIndex;
327327
}
328328
super.channelRead(ctx, reply);
329329
}
330330
}
331331
// Foscam needs this as will other cameras with chunks//
332-
if (isChunked && bytesAlreadyRecieved != 0) {
332+
if (isChunked && bytesAlreadyReceived != 0) {
333333
reply = incomingMessage;
334334
}
335335
}
336336
}
337337
} else { // msg is not HttpContent
338338
// Foscam cameras need this
339-
if (!contentType.contains("image/jp") && bytesAlreadyRecieved != 0) {
339+
if (!contentType.contains("image/jp") && bytesAlreadyReceived != 0) {
340340
reply = incomingMessage;
341341
logger.trace("Packet back from camera is {}", incomingMessage);
342342
super.channelRead(ctx, reply);
@@ -353,8 +353,8 @@ public void exceptionCaught(@Nullable ChannelHandlerContext ctx, @Nullable Throw
353353
return;
354354
}
355355
if (cause instanceof ArrayIndexOutOfBoundsException) {
356-
logger.debug("Camera sent {} bytes when the content-length header was {}.", bytesAlreadyRecieved,
357-
bytesToRecieve);
356+
logger.debug("Camera sent {} bytes when the content-length header was {}.", bytesAlreadyReceived,
357+
bytesToReceive);
358358
} else {
359359
logger.warn("Camera possibly closed the channel on the binding for URL: {}, cause reported is: {}",
360360
requestUrl, cause.getMessage());

bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/onvif/OnvifConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public void processReply(RequestType requestType, String message) {
388388
break;
389389
case PullMessages:
390390
try {
391-
eventRecieved(message);
391+
eventReceived(message);
392392
} catch (Exception e) {
393393
logger.error("Error processing PullMessages error:\n{}\nmessage: {}", e.toString(), message);
394394
}
@@ -813,7 +813,7 @@ public void gotoPreset(int index) {
813813
}
814814
}
815815

816-
public void eventRecieved(String eventMessage) {
816+
public void eventReceived(String eventMessage) {
817817
Document xmlDocument;
818818
try {
819819
xmlDocument = Helper.loadXMLFromString(eventMessage);

0 commit comments

Comments
 (0)