You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Juan José Ramos Cassella (JIRA)" <ji...@apache.org> on 2018/03/05 12:11:00 UTC

[jira] [Created] (GEODE-4771) Configuring 'auto-serializable-classes' incorrectly sets 'check-portability' as 'true'

Juan José Ramos Cassella created GEODE-4771:
-----------------------------------------------

             Summary: Configuring 'auto-serializable-classes' incorrectly sets 'check-portability' as 'true'
                 Key: GEODE-4771
                 URL: https://issues.apache.org/jira/browse/GEODE-4771
             Project: Geode
          Issue Type: Bug
          Components: gfsh
            Reporter: Juan José Ramos Cassella


According to the documentation, the [configure pdx|https://geode.apache.org/docs/guide/14/tools_modules/gfsh/command-pages/configure.html] 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:
 
{code:title=ConfigurePDXCommand.java|borderStyle=solid}
@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));
		}
...
{code}

The help text for parameters {{auto-serializable-classes}} and {{portable-auto-serializable-classes}} is also wrong, it's clear that they should be swapped.
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)