You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/04/26 10:02:00 UTC
[jira] [Commented] (AVRO-2790) Necessity of using Object as
parameter of javaEscape method
[ https://issues.apache.org/jira/browse/AVRO-2790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17092629#comment-17092629 ]
ASF subversion and git services commented on AVRO-2790:
-------------------------------------------------------
Commit d83e43b3cf087aa1911befd39e9df0c9f5e82628 in avro's branch refs/heads/master from Zezeng Wang
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=d83e43b ]
AVRO-2790: Necessity of using Object as parameter of javaEscape method
> Necessity of using Object as parameter of javaEscape method
> -----------------------------------------------------------
>
> Key: AVRO-2790
> URL: https://issues.apache.org/jira/browse/AVRO-2790
> Project: Apache Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.9.2
> Reporter: Zezeng Wang
> Assignee: Zezeng Wang
> Priority: Minor
> Fix For: 1.10.0
>
>
> Hi,
> The [javaEscape|https://github.com/apache/avro/blob/c81ea58c601a2f600d9d45cf50b9f6434b911d5a/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java#L976] method in *SpecificCompiler* is a utility used by templates. Escaping quotes and backslashes, which means it's dealing with strings.
> And I checked the caller ([enum.vm|https://github.com/apache/avro/blob/c81ea58c601a2f600d9d45cf50b9f6434b911d5a/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/enum.vm#L31], [fixed.vm|https://github.com/apache/avro/blob/master/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/fixed.vm#L31]) of javaEscape, all passed in as java.lang.String,
> So I'm sure this should use java.lang.String as the input parameter and remove unnecessary Object.toString operations.
>
> Cheers,
> Ze Zeng
--
This message was sent by Atlassian Jira
(v8.3.4#803005)