[ 
https://issues.apache.org/jira/browse/GEODE-4771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16405534#comment-16405534
 ] 

ASF subversion and git services commented on GEODE-4771:
--------------------------------------------------------

Commit 54b18eded8802561b8607b4bcdc1525915436e85 in geode's branch 
refs/heads/develop from [~jujoramos]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=54b18ed ]

GEODE-4771: Changes requested by reviewers.


> 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
>            Assignee: Juan José Ramos Cassella
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to