Skip to content

Commit 4975270

Browse files
committed
Add failing test for #584
1 parent 8f2797e commit 4975270

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

protobuf/src/test/java/tools/jackson/dataformat/protobuf/ReadNestedUnknownFieldsTest.java

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1010

1111
import tools.jackson.core.*;
12-
import tools.jackson.databind.MapperFeature;
1312
import tools.jackson.databind.ObjectReader;
1413
import tools.jackson.dataformat.protobuf.schema.ProtobufSchema;
1514

@@ -124,21 +123,14 @@ public static class Embed {
124123
}
125124

126125
/*
127-
/**********************************************************
126+
/**********************************************************************
128127
/* Test methods
129-
/**********************************************************
128+
/**********************************************************************
130129
*/
131130

132-
// 30-Apr-2025, tatu: Looks like we have a bug of some kind, exposed
133-
// by change to `MapperFeature.DEFAULT_VIEW_INCLUSION` defaults
134-
// (changed to `false`) but probably not caused by the change
131+
private final ProtobufMapper MAPPER = newObjectMapper();
135132

136-
// private final ProtobufMapper MAPPER = newObjectMapper();
137-
private final ProtobufMapper MAPPER = newMapperBuilder()
138-
.enable(MapperFeature.DEFAULT_VIEW_INCLUSION)
139-
.build();
140-
141-
// [dataformats-binary#108]
133+
// [dataformats-binary#108], [dataformats-binary#584]
142134
@Test
143135
public void testMultipleUnknown() throws Exception
144136
{
@@ -159,9 +151,7 @@ public void testMultipleUnknown() throws Exception
159151

160152
//System.err.println("-> "+MAPPER.valueToTree(protoR.readValue(doc)).toPrettyString());
161153

162-
// 30-Apr-2025, tatu: First, iterate over tokens
163-
// ... alas, does not actually
164-
/*
154+
// 30-Apr-2025, tatu: [dataformats-binary#584]: First, iterate over tokens
165155
try (JsonParser p = protoR.createParser(doc)) {
166156
assertToken(JsonToken.START_OBJECT, p.nextToken());
167157
assertToken(JsonToken.PROPERTY_NAME, p.nextToken());
@@ -176,9 +166,8 @@ public void testMultipleUnknown() throws Exception
176166
assertToken(JsonToken.END_OBJECT, p.nextToken());
177167
assertNull(p.nextToken());
178168
}
179-
*/
180169

181-
// and only then use databinding
170+
// and only then test databinding
182171

183172
LessNestedField lesser = protoR.readValue(doc);
184173

0 commit comments

Comments
 (0)