Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-4771

Configuring 'auto-serializable-classes' incorrectly sets 'check-portability' as 'true'

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              jjramos Juan Ramos
              jjramos Juan Ramos
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m