Skip to content

Commit

Permalink
Fix #49 to use null as the default value of serializer (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhfeng authored Dec 20, 2024
1 parent 5734009 commit 2613e32
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import jakarta.ws.rs.RuntimeType;

import org.apache.fury.serializer.Serializer;
import org.jboss.jandex.AnnotationTarget;
import org.jboss.jandex.DotName;

Expand Down Expand Up @@ -56,7 +57,10 @@ void unremovableBeans(BuildProducer<AdditionalBeanBuildItem> beanProducer) {
public void registerClasses(FuryBuildTimeConfig configs,
FuryBuildItem fury, List<FurySerializerBuildItem> classes, FuryRecorder recorder) {
for (FurySerializerBuildItem item : classes) {
recorder.registerClass(fury.getFury(), item.getClazz(), item.getClassId(), item.getSerializer());
Class<? extends Serializer> serializer = null;
if (item.getSerializer() != Serializer.class)
serializer = item.getSerializer();
recorder.registerClass(fury.getFury(), item.getClazz(), item.getClassId(), serializer);
}

if (configs.registerClassNames().isPresent()) {
Expand Down

0 comments on commit 2613e32

Please sign in to comment.