Should Class objects be serialized?
问题 We have a distributed application, and our "managed" nodes have to sent information about "features" to the controller node. Our first approach was to simply send instances of some Map<Class, FeatureSet> . ( the FeatureSet class for valus can be ignored in the context of my question ) Now a coworker suggested in a review to avoid serializing instances of java.lang.Class , mainly for potential version incompatibility issues: over time, our controller nodes are replaced with newer systems,