joeferner / node-java

Bridge API to connect with existing Java APIs.
MIT License
1.88k stars 283 forks source link

fix empty string promise suffix #572

Closed Informatic closed 1 year ago

Informatic commented 1 year ago

Only notable behaviour broken with empty string promise suffix was static method calls on imported classes. (java.import('...').staticMethod())

This is due to double-promisification of callStaticMethod function. This change extracts raw, pre-promisified methods used later in runtime by java bridge as local variables and uses that instead.

This also fixes a similar breakage if someone set "Sync" as promise suffix.