Skip to content

Commit 6600f9f

Browse files
committed
Context: remove obsolete warnings from javadoc
Now, when there are @eventhandler annotated methods, the EventService is treated as a dependency. So it is no longer necessary to explicitly list EventService.class before other services when constructing a Context with an explicit list of service interfaces.
1 parent 68cb9ef commit 6600f9f

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

src/main/java/org/scijava/Context.java

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ public Context(final boolean empty) {
119119
* @param serviceClasses A list of types that implement the {@link Service}
120120
* interface (e.g., {@code DisplayService.class}). Compatible
121121
* services will be loaded in the order given,
122-
* <em>regardless of their relative priorities</em>. In particular,
123-
* take care to specify the {@link EventService} first if you need
124-
* proper event handling for the other services.
122+
* <em>regardless of their relative priorities</em>.
125123
* @see #Context(Collection, PluginIndex, boolean)
126124
* @throws ClassCastException If any of the given arguments do not implement
127125
* the {@link Service} interface.
@@ -137,9 +135,7 @@ public Context(@SuppressWarnings("rawtypes") final Class... serviceClasses) {
137135
* @param serviceClasses A collection of types that implement the
138136
* {@link Service} interface (e.g., {@code DisplayService.class}).
139137
* Compatible services will be loaded according to the order of the
140-
* collection, <em>regardless of their relative priorities</em>. In
141-
* particular, take care to specify the {@link EventService} first if
142-
* you need proper event handling for the other services.
138+
* collection, <em>regardless of their relative priorities</em>.
143139
* @see #Context(Collection, PluginIndex, boolean)
144140
*/
145141
public Context(final Collection<Class<? extends Service>> serviceClasses) {
@@ -153,9 +149,7 @@ public Context(final Collection<Class<? extends Service>> serviceClasses) {
153149
* @param serviceClasses A collection of types that implement the
154150
* {@link Service} interface (e.g., {@code DisplayService.class}).
155151
* Compatible services will be loaded according to the order of the
156-
* collection, <em>regardless of their relative priorities</em>. In
157-
* particular, take care to specify the {@link EventService} first if
158-
* you need proper event handling for the other services.
152+
* collection, <em>regardless of their relative priorities</em>.
159153
* @param strict Whether context creation will fail fast when there is
160154
* an error instantiating a required service.
161155
* @see #Context(Collection, PluginIndex, boolean)
@@ -194,9 +188,7 @@ public Context(final PluginIndex pluginIndex) {
194188
* @param serviceClasses A collection of types that implement the
195189
* {@link Service} interface (e.g., {@code DisplayService.class}).
196190
* Compatible services will be loaded according to the order of the
197-
* collection, <em>regardless of their relative priorities</em>. In
198-
* particular, take care to specify the {@link EventService} first if
199-
* you need proper event handling for the other services.
191+
* collection, <em>regardless of their relative priorities</em>.
200192
* @param pluginIndex The plugin index to use when discovering and indexing
201193
* plugins. If you wish to completely control how services are
202194
* discovered (i.e., use your own
@@ -229,9 +221,7 @@ public Context(final Collection<Class<? extends Service>> serviceClasses,
229221
* @param serviceClasses A collection of types that implement the
230222
* {@link Service} interface (e.g., {@code DisplayService.class}).
231223
* Compatible services will be loaded according to the order of the
232-
* collection, <em>regardless of their relative priorities</em>. In
233-
* particular, take care to specify the {@link EventService} first if
234-
* you need proper event handling for the other services.
224+
* collection, <em>regardless of their relative priorities</em>.
235225
* @param pluginIndex The plugin index to use when discovering and indexing
236226
* plugins. If you wish to completely control how services are
237227
* discovered (i.e., use your own

src/main/java/org/scijava/event/DefaultEventService.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ public class DefaultEventService extends AbstractService implements
6464
/**
6565
* The default event service's priority.
6666
* <p>
67-
* It is paramount that the event service be created and initialized before
68-
* other services. Any service created before the event service may not have
69-
* its event handling methods registered correctly.
70-
* </p>
71-
* <p>
7267
* Alternative event service implementations that wish to prioritize
7368
* themselves above this one can still ensure preferential usage via
7469
* {@code priority = DefaultEventService.PRIORITY + 1} or similar.

0 commit comments

Comments
 (0)