File tree 4 files changed +7
-6
lines changed
main/java/com/fasterxml/jackson/dataformat/avro/schema
test/java/com/fasterxml/jackson/dataformat/avro
4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ abstractions.
47
47
<dependency >
48
48
<groupId >org.apache.avro</groupId >
49
49
<artifactId >avro</artifactId >
50
- <version >1.8.2 </version >
50
+ <version >1.11.3 </version >
51
51
</dependency >
52
52
53
53
<!-- and for testing we need logback -->
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ protected static String getNamespace(Class<?> cls) {
108
108
// NOTE: was reverted in 2.8.8, but is enabled for Jackson 2.9.
109
109
Class <?> enclosing = cls .getEnclosingClass ();
110
110
if (enclosing != null ) {
111
- return enclosing .getName () + "$" ;
111
+ return enclosing .getName ();
112
112
}
113
113
Package pkg = cls .getPackage ();
114
114
return (pkg == null ) ? "" : pkg .getName ();
@@ -351,6 +351,7 @@ public static String getFullName(Schema schema) {
351
351
if (namespace == null ) {
352
352
return name ;
353
353
}
354
+ // Backward compatibility with schemas that use dollar sign for nested classes (Apache Avro before 1.9)
354
355
final int len = namespace .length ();
355
356
if (namespace .charAt (len -1 ) == '$' ) {
356
357
return namespace + name ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public void class_without_AvroNamespace_test() throws Exception {
35
35
36
36
// THEN
37
37
assertThat (actualSchema .getNamespace ())
38
- .isEqualTo ("com.fasterxml.jackson.dataformat.avro.annotation.AvroNamespaceTest$ " );
38
+ .isEqualTo ("com.fasterxml.jackson.dataformat.avro.annotation.AvroNamespaceTest" );
39
39
}
40
40
41
41
@ Test
@@ -65,7 +65,7 @@ public void enum_without_AvroNamespace_test() throws Exception {
65
65
66
66
// THEN
67
67
assertThat (actualSchema .getNamespace ())
68
- .isEqualTo ("com.fasterxml.jackson.dataformat.avro.annotation.AvroNamespaceTest$ " );
68
+ .isEqualTo ("com.fasterxml.jackson.dataformat.avro.annotation.AvroNamespaceTest" );
69
69
}
70
70
71
71
@ Test
Original file line number Diff line number Diff line change 15
15
16
16
public class AvroAliasTest extends InteropTestBase {
17
17
18
- @ AvroAlias (alias = "Employee" , space = "com.fasterxml.jackson.dataformat.avro.AvroTestBase$ " )
18
+ @ AvroAlias (alias = "Employee" , space = "com.fasterxml.jackson.dataformat.avro.AvroTestBase" )
19
19
public static class NewEmployee {
20
20
21
21
public String name ;
@@ -40,7 +40,7 @@ public static class AliasedNameEmployee {
40
40
public AliasedNameEmployee boss ;
41
41
}
42
42
43
- @ AvroAlias (alias = "Size" , space = "com.fasterxml.jackson.dataformat.avro.AvroTestBase$ " )
43
+ @ AvroAlias (alias = "Size" , space = "com.fasterxml.jackson.dataformat.avro.AvroTestBase" )
44
44
public enum NewSize {
45
45
SMALL ,
46
46
LARGE ;
You can’t perform that action at this time.
0 commit comments