Skip to content

[GTK] Program.findProgram() always returns null #3188

@HeikoKlare

Description

@HeikoKlare

Describe the bug
The Program.findProgram() implementation for GTK always returns null.
This was found when adding an according test in: #3187

To Reproduce
Extend the test Test_org_eclipse_swt_program_Program.test_findProgramLjava_lang_String to print the program found the registered extensions or just execute this according snippet:

public static void main (String [] args) {
	String[] extensions = Program.getExtensions();
	if (extensions != null) {
		for (String extension : extensions) {
			System.out.println(Program.findProgram(extension));
		}
	}
}

It just prints null.

Expected behavior
I expect the method to return the actual program representations registered for the mime type of the given extensions.

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)
    Ubuntu 22.04.5 LTS on WSL, Glib 2.72.4
    But also happens on other (in particular non-WSL) installations (as it was found via CI in [Cocoa] Replace deprecated LSGetApplicationForInfo in Program.findProgram #3187).

Version since
Found in current master state; I did not check when that started to happen (may rather be a change in GLib than in Eclipse code).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions