Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
According to the documentation, the configure pdx command should set the check-portability parameter as false when the user configures a list of auto serializable classes through the --auto-serializable-classes parameter. However, check-portability parameter is set as true by default.
The problematic code is below:
ConfigurePDXCommand.java
@CliCommand(value = CliStrings.CONFIGURE_PDX, help = CliStrings.CONFIGURE_PDX__HELP) @CliMetaData(relatedTopic = CliStrings.TOPIC_GEODE_REGION) @ResourceOperation(resource = ResourcePermission.Resource.CLUSTER, operation = ResourcePermission.Operation.MANAGE) public Result configurePDX( ... @CliOption(key = CliStrings.CONFIGURE_PDX__AUTO__SERIALIZER__CLASSES, /* auto-serializable-classes */ help = CliStrings.CONFIGURE_PDX__AUTO__SERIALIZER__CLASSES__HELP) String[] patterns, /* the patterns which are matched against domain class names to determine whether they should be serialized, serialization done by the auto-serializer will throw an exception if the object of these classes are not portable to non-java languages */ @CliOption(key = CliStrings.CONFIGURE_PDX__PORTABLE__AUTO__SERIALIZER__CLASSES /* portable-auto-serializable-classes */, help = CliStrings.CONFIGURE_PDX__PORTABLE__AUTO__SERIALIZER__CLASSES__HELP) String[] portablePatterns /* the patterns which are matched against domain class names to determine whether they should be serialized */) { ... if (patterns != null) { ReflectionBasedAutoSerializer nonPortableAutoSerializer = new ReflectionBasedAutoSerializer(true, patterns); cache.setPdxSerializer(nonPortableAutoSerializer); ird.addLine("PDX Serializer : " + cache.getPdxSerializer().getClass().getName()); ird.addLine("Non portable classes :" + Arrays.toString(patterns)); } ...
The help text for parameters auto-serializable-classes and portable-auto-serializable-classes is also wrong, it's clear that they should be swapped.
Attachments
Issue Links
- links to