[
https://issues.apache.org/jira/browse/AVRO-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16790817#comment-16790817
]
Hudson commented on AVRO-2350:
------------------------------
FAILURE: Integrated in Jenkins build AvroJava #619 (See
[https://builds.apache.org/job/AvroJava/619/])
AVRO-2350: Use Switch Statement for Strings in LogicalTypes (dan:
[https://github.com/apache/avro/commit/63e02101cf94d8ab0e1ae01baafe04c5767aa371])
* (edit) lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java
> Use Switch Statement for Strings in LogicalTypes
> ------------------------------------------------
>
> Key: AVRO-2350
> URL: https://issues.apache.org/jira/browse/AVRO-2350
> Project: Apache Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.9.0
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
>
> https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/LogicalTypes.java#L59-L101
> {quote}
> The switch statement compares the String object in its expression with the
> expressions associated with each case label as if it were using the
> String.equals method; consequently, the comparison of String objects in
> switch statements is case sensitive. The Java compiler generates generally
> more efficient bytecode from switch statements that use String objects than
> from chained if-then-else statements.
> https://docs.oracle.com/javase/7/docs/technotes/guides/language/strings-switch.html
> {quote}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)