Two bugs in deserialize for private fields:
1. findSetter(field) can return null — no null check (NPE risk)
2. setter.invoke(result) passed no value argument — the setter was
called with zero args, silently failing to set the field
Fixed to match the serialize side's pattern: null-check the setter,
log an error if missing, and pass fieldValue.get() as the argument.
CodeRabbit flagged this on PR #5299 (outside-diff-range, critical).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Revert "revert: "qa: parametrize logger usages (#5173)" (#5180)"
This reverts commit 4f42a8fa1a.
* revert upgrade slf4j-2.0
* micrometer 1.9.8 --> 1.9.12
* qa, still use old slf4j, feedback jdrueckert.
gradle does not care about the logger definition in engine-tests, it
uses the one from engine also for the tests. remove it to not confuse.
---------
Co-authored-by: soloturn <soloturn@gmail.com>
* kotlin jps updated itself
* update spotbugs version to consume AsserThrows error fix (https://github.com/spotbugs/spotbugs/issues/2667)
* parametrize logs
* make fields final
* remove unused logger
* suppress PMD.ArrayIsStoredDirectly and PMD.MethodReturnsInternalArray until proper security assessment (https://github.com/MovingBlocks/Terasology/issues/5176)
* respect inner type last rule (https://stackoverflow.com/questions/25158939/what-motivation-is-behind-checkstyle-inner-type-last-rule)
* replace assertEquals with assertArrayEquals for arrays
* suppress warning for unused field in ObjectFieldMapTypeHandlerFactoryTest (Direct member access is not expected. TypeHandler factory dynamically loads type handlers on type handler creation based on member types of input class TypeInfo.)
Co-authored-by: jdrueckert <jd.rueckert@googlemail.com>
* make final fields static
* remove unnecessary local before return
* remove instanceof checks in catch clause
* avoid throwing java.lang.Exception
* remove null checks covered by instanceof check
* remove toString on String objects
* remove overrides that only call their super
* remove unused private methods
* remove unnecessary if statement nesting
* remove unused local variables
* use try-with-resources to close resources after use
* use equals() to compare object references
* fix broken javadoc references
* fix disallowed self-closing and empty javadoc elements
* fix bad use of symbols in javadoc
* fix disallowed list item tag in javadoc without surrounding list
* fix erroneous javadoc tags
* fix emphasize tags in javadoc
* remove illegal throws
* remove unused imports
Related:
Terasology/CoreRendering#75
Terasology/Furnishings#17
Terasology/Health#105
Terasology/Inventory#51
Terasology/Behaviors#114
Terasology/CoreWorlds#45
Terasology/FlexiblePathfinding#32
Adds to #3859
* fix junitXmlReport.isEnabled -> required
* fix several declaration of `copyResourcesToClasses`. unitTests and integrationTests works now
* fix undeclared implicit dependency gradle errors
* update groovyw wrapper to work with Gradle 8
* use kotlin-1.9, force java-11 target
* update spotbugs version for gradle 7+, java-17, java-20 (#5126)
Co-authored-by: Benjamin Amos <benjamin.amos11@gmail.com>
Co-authored-by: jdrueckert <jd.rueckert@googlemail.com>
Co-authored-by: Tobias Nett <skaldarnar@gmail.com>
Co-authored-by: soloturn <soloturn@gmail.com>
Our type handlers should be able to deserialize the empty array `[ ]`
correctly into different collection formats, for instance, basic
`Array`s, collections like `List<T>`, or `Map<K, V>`.
This PR adds more tests to ensure that this is indeed the case.
Closes#2343.
* refactor(network): use Map in PingStockComponent
We have introduced type handlers for generic maps some time ago, and there is no need anymore to keep the ping information as separate lists.
Therefore, refactor the internal storage of ping data to use a `Map<EntityRef, Long>`.
* refactor(network): restructure and document ServerPingSystem
* fix: more resilience on empty maps
* refactor(network)!: merge PingSubscriberComponent and PingStockComponent into PingComponent
* feat(nui): improve online players visuals
* doc(nui): docs for OnlinePlayersOverlay
Otherwise it says “defaulting to no-operation (NOP) logger implementation” and we don't see messages that could help diagnose test failures.
Fixes#4943.
Instead of commenting out the code in the reflection-manifest plugin, comment out its usages.
(Yes commented code is bad either way but I still feel some doubt about which way this branch is going.)