Skip to content

Commit

Permalink
Fix #120: MimeTypes native handling
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Oct 8, 2023
1 parent a722552 commit dc0e295
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

import org.jboss.jandex.ClassInfo;
import org.jboss.jandex.DotName;
Expand Down Expand Up @@ -94,7 +93,7 @@ void registerForReflection(PrimeFacesExtensionsRecorder recorder,

// methods and fields
reflectiveClass.produce(
ReflectiveClassBuildItem.builder(classNames.toArray(new String[classNames.size()])).methods(true)
ReflectiveClassBuildItem.builder(classNames.toArray(new String[0])).methods(true)
.fields(true).build());

// neither
Expand All @@ -111,9 +110,9 @@ public List<String> collectClassesInPackage(CombinedIndexBuildItem combinedIndex
.getClassesInPackage(aPackage)
.stream()
.map(ClassInfo::toString)
.collect(Collectors.toList());
.toList();
classes.addAll(packageClasses);
}
return classes;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void indexTransitiveDependencies(BuildProducer<IndexDependencyBuildItem> index)
"owasp-java-html-sanitizer"));
index.produce(new IndexDependencyBuildItem("io.nayuki", "qrcodegen"));
index.produce(new IndexDependencyBuildItem("org.primefaces.extensions", "barcode4j-light"));
index.produce(new IndexDependencyBuildItem("org.overviewproject", "mime-types"));
}

@BuildStep
Expand Down Expand Up @@ -91,6 +92,9 @@ void substrateResourceBuildItems(BuildProducer<NativeImageResourceBuildItem> nat
resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_sv"));
resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_tr"));
resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("org.primefaces.Messages_zh"));

// mime types
resourceBundleBuildItem.produce(new NativeImageResourceBundleBuildItem("mime.cache"));
}

@BuildStep
Expand Down

0 comments on commit dc0e295

Please sign in to comment.