Skip to content

Commit 42592ae

Browse files
refactor: normalize log and exception messages
1 parent 146a4dc commit 42592ae

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- Normalized logging and error messages using Keyple coding standards.
810

911
## [3.2.1] - 2026-02-06
1012
### Changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
group = org.eclipse.keyple
33
title = Keyple Plugin Android NFC Java Lib
44
description = Keyple add-on to manage Android NFC readers
5-
version = 3.2.1-SNAPSHOT
5+
version = 3.2.2-SNAPSHOT
66

77
# Java Configuration
88
javaSourceLevel = 1.8

plugin/src/main/kotlin/org/eclipse/keyple/plugin/android/nfc/AndroidNfcReaderAdapter.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ internal class AndroidNfcReaderAdapter(private val config: AndroidNfcConfig) :
335335
return when (keyType) {
336336
MIFARE_KEY_A -> mifareClassic.authenticateSectorWithKeyA(sectorIndex, usedKey)
337337
MIFARE_KEY_B -> mifareClassic.authenticateSectorWithKeyB(sectorIndex, usedKey)
338-
else -> throw IllegalArgumentException("Unsupported key type: 0x${HexUtil.toHex(keyType)}")
338+
else -> throw IllegalArgumentException("Unsupported key type: ${HexUtil.toHex(keyType)}h")
339339
}
340340
}
341341

@@ -380,12 +380,12 @@ internal class AndroidNfcReaderAdapter(private val config: AndroidNfcConfig) :
380380
.put("protocolInfo", HexUtil.toHex(tagB.protocolInfo))
381381
.toString()
382382
}
383-
else -> logger.warn("{}: unreachable code", name)
383+
else -> logger.warn("unreachable code")
384384
}
385385
cardInsertionWaiterAsynchronousApi.onCardInserted()
386386
} catch (_: NoSuchElementException) {
387387
tagTechnology = null
388-
logger.warn("{}: unsupported card technology", name)
388+
logger.warn("Card technology not supported")
389389
}
390390
}
391391
}

0 commit comments

Comments
 (0)