Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[e4-dev] minimum execution environment for the "org.eclipse.e4.core.services"


In the past we maintained that the minimum execution environment (EE) for the "org.eclipse.e4.core.services" bundle will be Foundation 1.1 / J2SE1.4.

Overtime, we discovered that there were problems in keeping 1.4 as a minimum execution environment for dependency injection. Some problems were more on the convenience side ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=284940 ), but some were rather fundamental.

In Java 1.5 we can use annotations to match values in the contexts to injected fields and method arguments. In Java 1.4 we have to rely on tricks like adding special prefixes to field names and requiring injected methods to have special names. There is no good way to describe things like optional injections or providers. Moreover, the original code supporting 1.4, not being used, deteriorated over time and will require some effort to be fixed. While it can be made to work, there is a substantial extra cost to developing and maintaining two code paths.

Recently the minimum EE for the bundle was bumped to 1.5 for other unrelated changes, so, this seems like a good time to revisit the question of minimum EE.

My vote would be to say that dependency injection really needs Java 1.5+. That would allow us to merge back the services fragment, remove duplicate and deteriorated code, and provide cleaner, easier to understand API side to consumers.

Any opinions?

Sincerely,
Oleg Besedin

Back to the top