chuheridangwua opened a new pull request, #6546:
URL: https://github.com/apache/hop/pull/6546

   ## Problem
     When using Hop Web (RAP-based web interface) and changing locale or other 
GUI options, the application crashes with HTTP 500 error:
   
     java.lang.NoSuchMethodError: 'boolean 
org.eclipse.swt.widgets.Display.isSystemDarkTheme()'
         at 
org.apache.hop.ui.hopgui.perspective.configuration.tabs.ConfigGuiOptionsTab.saveValues(ConfigGuiOptionsTab.java:945)
   
     ## Root Cause
     `Display.isSystemDarkTheme()` is a desktop SWT API that is not available 
in Eclipse RAP (Web environment). The `ConfigGuiOptionsTab` class calls this 
method without checking if running in
      web mode.
   
     ## Solution
     Added `EnvironmentUtils.getInstance().isWeb()` check before calling 
`Display.isSystemDarkTheme()`:
     - In web environment or Windows: use the stored/selected dark mode 
preference
     - In desktop non-Windows (macOS/Linux): detect system theme as before
   
     ## Changes
     - `ui/src/main/java/.../ConfigGuiOptionsTab.java`
       - `reloadValues()` method
       - `saveValues()` method
   
     ## Testing
     - Tested on Hop Web 2.18.0-SNAPSHOT (Docker container with Tomcat 10)
     - Verified locale can be changed to Chinese without errors
     - Dark mode toggle works correctly in both Web and Desktop environments


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to