IDE: Fire
Version: 9.0.97.2071 (was originally discovered in 8.4 beta 2 month ago)
Target: Java
Description:
The static variable(writingIgnoredVariableNames) is defined in https://github.com/GeoThings/LakestoneCore/blob/master/Source/CustomSerialization.swift#L32
inside the protocol.
When passing the entity that implements this protocol, you obviously cannot call the static method in the swift style like
customSerializable.self.writingIgnoredVariableNames
since .self
will retrieve the Class
object.
However, compiler still allows calling the static method on the instance -> just calling customerSerializable.writingIgnoredVariableNames
will compile, but since this is called as an instance, not the static method, elements compiler will not handle it correctly, and it will result in invalid .class files that will result in java.lang.ClassNotFoundException: lakestonecore.eunit.CustomSerialization
To reproduce this issue please replace this line https://github.com/GeoThings/LakestoneCore/blob/master/Source/CustomSerialization.swift#L111
with this:
let ignoredVariableNames = customEntity.writingIgnoredVariableNames