[
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|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
was:
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
> 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|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)