Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThrowMissingRegistrationErrors: AWT Desktop i18N, SPI for ImageIO #45176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Disables AWT Desktop i18N, disables SPI for ImageIO
  • Loading branch information
Karm committed Dec 17, 2024
commit 9f2ea84939e9b283db2309fed00e5ea3a2e5c116
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,43 @@ protected void setOsNameAndVersion() {
}
}

/**
* We get rid of ResourceBundle.getBundle(...) for
* sun.awt.resources.awt
* sun/awt/resources/awt.properties
* sun.awt.resources.awt_en
* sun/awt/resources/awt_en.properties
* sun.awt.resources.awt_en_US
* sun/awt/resources/awt_en_US.properties
* we don't include those bundles anyway, so the search is in vain,
* and we don't need those as they contain strings for GUI elements,
* useless in our exclusively headless setup.
* See https://github.com/quarkusio/quarkus/issues/44622
*/
@TargetClass(className = "java.awt.Toolkit$4")
final class Target_java_awt_Toolkit$4 {
@Substitute
public Void run() {
return null;
}
}

/**
* TODO: This is perhaps too harsh, is it needed?
* See See https://github.com/quarkusio/quarkus/issues/44622
*/
@TargetClass(className = "javax.imageio.spi.IIORegistry")
final class Target_javax_imageio_spi_IIORegistry {
@Substitute
private void registerInstalledProviders() {
// Do nothing. We don't support ImageIO plugins via META-INF/services anyway.
}

@Substitute
private void registerApplicationClasspathSpis() {
// Do nothing. We don't support ImageIO plugins found on classpath.
}
}

public class JDKSubstitutions {
}
Loading