Source code of javafx.scene.control.TextInputControl.TextProperty#doSet of "javafx-controls-21-win.jar"

Oliver Kopp kopp.dev at gmail.com
Sun Jul 7 07:44:17 UTC 2024


Dear all,

I have a strange thing here in JavaFX - and I seek some guidance, what to
do.

I am searching for the source code of
javafx.scene.control.TextInputControl.TextProperty#doSet of
"javafx-controls-21-win.jar".

Using a decompiler, the method reads as follows (shortended):


private void doSet(String var1) {
...
    if (TextInputControl.this.filterAndSet(var1)) {
...
        TextInputControl.this.textUpdated();
        TextInputControl.this.resetUndoRedoState();
    }
}


I checked the source on GitHub at
https://github.com/openjdk/jfx/blob/72701e6cb4095b8f5042f54ae6bb2c0cec446bcf/modules/javafx.controls/src/main/java/javafx/scene/control/TextInputControl.java#L1511
:


private void doSet(String value) {
...
if (!filterAndSet(value)) return;
...
textUpdated();
...
resetUndoRedoState();
}


I assume that the Java compiler does not do some "smart" optimizations.
Thus, the binary is different from the source somehow.


Can someone explain me what is happening here? Why is the decompiled source
different from the Java source?


TYIA and cheers,

Oliver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-discuss/attachments/20240707/798263b2/attachment.htm>


More information about the openjfx-discuss mailing list