JaroslavTulach opened a new pull request, #806: URL: https://github.com/apache/poi/pull/806
I am currently working on project called [Enso](https://github.com/enso-org/enso). We are making [heavy use of Apache POI](https://github.com/enso-org/enso/blob/59eb1f2aeb6369fe2abde95f66385a3927064a9e/build.sbt#L1395) to parse Excel documents our users are processing. [](https://community.ensoanalytics.com/c/enso101/sections/245392/lessons/914097 "Excel in Enso") We are also using [GraalVM Native Image](http://graalvm.org) to compile our application to _native executable_. Recently we realized in https://github.com/enso-org/enso/pull/12843 that it is necessary to **avoid dependency on `java.desktop`** module. ### Why Avoiding `java.desktop` Dependency? Since Java9 the JDK offers tool called [jlink](https://openjdk.org/jeps/282). It can be used to create a smaller JDK ready for execution in the cloud and other restricted environments: - one can specify set of JDK modules to include - often it is useful to exclude `java.desktop` - in https://github.com/enso-org/enso/pull/12843 exclusion of `java.desktop` was necessary - as GraalVM was crashing when `java.desktop` was included Excluding `java.desktop` is a good practice anyway - reduces bloat of the final application by tens of megabytes. ### Patching `HSSFColor` - to resolve all the needs of https://github.com/enso-org/enso/pull/12843 - I had to [copy the code of HSSFColor](https://github.com/enso-org/enso/pull/12843/files#r2081091554) into our repository - and modify it to avoid instantiating `java.awt.Color` Such a solution was good short-term workaround, but I **don't want to maintain a fork** of POI! Hence my goal is to find a way to include the necessary fixes in your project in the long term. Hence the creation of this PR. Can you please consider its acceptance? ### Technicalities - this PR replaces the RGB handling code in `HSSFColor` - originally this code relied on `java.awt.Color` - however that creates _unnecessary dependency_ on `java.desktop` - the PR proposes direct manipulation with RGB `int` compatible with handling in `java.awt.Color` - the _behavior remains the same_ - dependency of `HSSFColor` on `java.desktop` is removed ### Other Fixes - there are [other places in POI where dependency](https://github.com/enso-org/enso/pull/12843) on `java.desktop` deserves to be removed - however that's a long term direction - I am starting with this simple `HSSFColor` proposal - if it is accepted, I create subsequent PRs addressing other `java.desktop` dependencies -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org