You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Zezeng Wang (Jira)" <ji...@apache.org> on 2020/04/03 03:03:00 UTC
[jira] [Updated] (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:all-tabpanel ]
Zezeng Wang updated AVRO-2790:
------------------------------
Description:
The **[javaEscape|#L976]]* method in **SpecificCompiler* is a utility used by templates. Escaping quotes and backslashes, which means it's dealing with strings.
Utility for template use. Escapes quotes and backslashes.
And I checked the caller (*[enum.vm|#L31]], [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
was:
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.
Utility for template use. Escapes quotes and backslashes.
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/c81ea58c601a2f600d9d45cf50b9f6434b911d5a/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
> 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
> Priority: Minor
> Fix For: 1.10.0
>
>
> The **[javaEscape|#L976]]* method in **SpecificCompiler* is a utility used by templates. Escaping quotes and backslashes, which means it's dealing with strings.
> Utility for template use. Escapes quotes and backslashes.
> And I checked the caller (*[enum.vm|#L31]], [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)