Java 17 features (H-M) (#15520)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex - instanceof matching and multiline strings - remove null check before instanceof Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -299,8 +299,11 @@ public class P1Payload {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("P1 [version: %d model: %s ssid: %s signal: %d"
|
||||
+ " imp1: %f imp2: %f exp1: %f exp2: %f active: %f active1: %f active2: %f active3: %f gas: %f timestamp: %.0f]",
|
||||
return String.format(
|
||||
"""
|
||||
P1 [version: %d model: %s ssid: %s signal: %d\
|
||||
imp1: %f imp2: %f exp1: %f exp2: %f active: %f active1: %f active2: %f active3: %f gas: %f timestamp: %.0f]\
|
||||
""",
|
||||
smrVersion, meterModel, wifiSsid, wifiStrength, totalEnergyImportT1Kwh, totalEnergyImportT2Kwh,
|
||||
totalEnergyExportT1Kwh, totalEnergyExportT2Kwh, activePowerW, activePowerL1W, activePowerL2W,
|
||||
activePowerL3W, totalGasM3, gasTimestamp);
|
||||
|
||||
Reference in New Issue
Block a user