Skip to content

Commit

Permalink
chore: remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-grgt committed Feb 12, 2024
1 parent 23bef32 commit 18cdbd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,34 +189,6 @@ private void indexSimpleType(FieldReflector field, Map<Path, PathWriter> index,
}

private void indexSetType(FieldReflector field, Map<Path, PathWriter> index, Path parentPath, Supplier<Object> parent) {
// Collection<Object> set = new HashSet<>();
// Path path = getPathForField(field, parentPath);
// var pathWriter = PathWriter.objectInitializer(() -> {
// FieldAccessor.of(field, parent.get()).set(set);
// return set;
// });
// if (parentPath.isRoot()) {
// pathWriter.setRootInitializer(() -> {
// FieldAccessor.of(field, parent.get()).set(set);
// return parent.get();
// });
// }
// index.put(path, pathWriter);
// Type actualTypeArgument = ((ParameterizedType) field.genericType()).getActualTypeArguments()[0];
// Class<?> typeArgument = (Class<?>) actualTypeArgument;
// var tag = Reflector.reflect(typeArgument).annotation(Tag.class);
// if (tag != null) {
// Supplier<Object> listTypeInstanceSupplier = collectionSupplierForType(typeArgument);
// index.put(Path.parse(tag.path()), PathWriter.objectInitializer(() -> {
// collectionCacheType.clear();
// Object listTypeInstance = listTypeInstanceSupplier.get();
// set.add(listTypeInstance);
// return listTypeInstance;
// }));
// doBuildIndex(typeArgument, Path.parse(tag.path()), index, listTypeInstanceSupplier);
// } else {
// throw new XjxDeserializationException("Generics of type Set require @Tag pointing to mapped XML path (" + typeArgument.getSimpleName() + ")");
// }
Collection<Object> set = new HashSet<>();
Path path = getPathForField(field, parentPath);
var pathWriter = PathWriter.objectInitializer(() -> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.jonasg.xjx.serdes.deserialize;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
Expand All @@ -10,25 +9,19 @@

public class TypedValueMapSaxHandler implements SaxHandler {

private final LinkedList<Map<String, Object>> mapsStack;

private final Class<?> valueType;
private PathBasedSaxHandler<Object> objectPathBasedSaxHandler;
private final Class<?> valueType;

private final Map<String, Object> instance;

private Map<String, Object> instance;
private PathBasedSaxHandler<Object> objectPathBasedSaxHandler;

private String activeKey;

private String rootTag;

public TypedValueMapSaxHandler(MapWithTypeInfo instance) {
this.mapsStack = new LinkedList<>();
this.instance = instance.map();
public TypedValueMapSaxHandler(MapWithTypeInfo instance) {
this.instance = instance.map();
this.valueType = instance.valueType();
}


@Override
public void startDocument() {
}
Expand Down

0 comments on commit 18cdbd4

Please sign in to comment.