[
https://issues.apache.org/jira/browse/AVRO-2548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16985539#comment-16985539
]
Hudson commented on AVRO-2548:
------------------------------
SUCCESS: Integrated in Jenkins build AvroJava #782 (See
[https://builds.apache.org/job/AvroJava/782/])
AVRO-2548: Handle logicalTypes with stringType (#655) (fokko:
[https://github.com/apache/avro/commit/1238bdfad85e63becc53e21bb6dca506456264d2])
* (edit)
lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
* (add)
lang/java/integration-test/codegen-test/src/test/java/org/apache/avro/codegentest/TestLogicalTypeForStringType.java
* (add)
lang/java/integration-test/codegen-test/src/test/resources/avro/string_logical_type.avsc
* (edit) lang/java/integration-test/codegen-test/pom.xml
> StringType of "String" causes logicalType converters to be ignored for field
> ----------------------------------------------------------------------------
>
> Key: AVRO-2548
> URL: https://issues.apache.org/jira/browse/AVRO-2548
> Project: Apache Avro
> Issue Type: Bug
> Components: java, logical types
> Affects Versions: 1.9.0
> Reporter: Chris Woodham
> Assignee: Ivan Greene
> Priority: Major
> Fix For: 1.9.2
>
> Attachments: avro-issue-example.zip
>
>
> I have the avro maven plugin configured like this:
> {code:xml}
> <plugin>
> <groupId>org.apache.avro</groupId>
> <artifactId>avro-maven-plugin</artifactId>
> <version>${avro.version}</version>
> <executions>
> <execution>
> <goals>
> <goal>schema</goal>
> </goals>
> <configuration>
> <stringType>String</stringType>
> <createSetters>false</createSetters>
>
> <enableDecimalLogicalType>true</enableDecimalLogicalType>
> <fieldVisibility>private</fieldVisibility>
> <customConversions>
> <conversion>
> org.apache.avro.Conversions$UUIDConversion
> </conversion>
> </customConversions>
> </configuration>
> </execution>
> </executions>
> </plugin>
> {code}
> With the intention of using the provided {{UUIDConversion}} class on string
> fields set with the {{logicalType}} {{uuid}}. However, it seems like having
> {{stringType}} specified as {{String}} means the converter is ignored.
> If I comment out the line {{<stringType>String</stringType>}} then the
> converter is used as expected and the java classes have {{UUID}} types for
> those fields, but obviously all normal strings are now {{CharSequence}}
> objects.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)