@@ -73,9 +73,12 @@ public void testFull() {
7373 { org .scijava .event .DefaultEventService .class ,
7474 org .scijava .app .DefaultAppService .class ,
7575 org .scijava .app .DefaultStatusService .class ,
76+ org .scijava .console .DefaultConsoleService .class ,
7677 org .scijava .event .DefaultEventHistory .class ,
78+ org .scijava .io .DefaultIOService .class ,
7779 org .scijava .object .DefaultObjectService .class ,
7880 org .scijava .plugin .DefaultPluginService .class ,
81+ org .scijava .text .DefaultTextService .class ,
7982 org .scijava .thread .DefaultThreadService .class ,
8083 org .scijava .log .StderrLogService .class };
8184
@@ -179,7 +182,7 @@ public void testOptionalMissingTransitive() {
179182 @ SuppressWarnings ("unchecked" )
180183 @ Test
181184 public void testClassOrder () {
182- int expectedSize = 2 ;
185+ final int expectedSize = 2 ;
183186
184187 // Same order, Base first
185188 Context c =
@@ -213,14 +216,14 @@ public void testClassOrder() {
213216 @ SuppressWarnings ("unchecked" )
214217 @ Test
215218 public void testAbstractClasslist () {
216- Context cAbstract =
219+ final Context cAbstract =
217220 createContext (pluginIndex (BaseImpl .class , ExtensionImpl .class ), services (
218221 AbstractBase .class , AbstractExtension .class ));
219-
220- Context cService =
221- createContext (pluginIndex (BaseImpl .class , ExtensionImpl .class ), services (
222- BaseService .class , ExtensionService .class ));
223-
222+
223+ final Context cService =
224+ createContext (pluginIndex (BaseImpl .class , ExtensionImpl .class ), services (
225+ BaseService .class , ExtensionService .class ));
226+
224227 assertEquals (cService .getServiceIndex ().size (), cAbstract .getServiceIndex ()
225228 .size ());
226229 }
@@ -232,11 +235,12 @@ public void testAbstractClasslist() {
232235 @ Test
233236 public void testNoServicesCtor () {
234237 // create a 2-service context
235- PluginIndex index = pluginIndex (BaseImpl .class , ExtensionImpl .class );
238+ final PluginIndex index = pluginIndex (BaseImpl .class , ExtensionImpl .class );
236239 // Add another service, that is not indexed under Service.class
237240 index .add (new PluginInfo <SciJavaPlugin >(ThreadService .class .getName (),
238241 SciJavaPlugin .class ));
239- Context c = new Context (pluginIndex (BaseImpl .class , ExtensionImpl .class ));
242+ final Context c =
243+ new Context (pluginIndex (BaseImpl .class , ExtensionImpl .class ));
240244 assertEquals (2 , c .getServiceIndex ().size ());
241245 }
242246
@@ -292,7 +296,9 @@ public void testNonRequiredMissingService() {
292296 * Checks the expected order vs. the order in the provided Context's
293297 * ServiceIndex
294298 */
295- private void verifyServiceOrder (Class <?>[] expected , Context context ) {
299+ private void verifyServiceOrder (final Class <?>[] expected ,
300+ final Context context )
301+ {
296302 assertEquals (expected .length , context .getServiceIndex ().size ());
297303 int index = 0 ;
298304 for (final Service service : context .getServiceIndex ()) {
@@ -301,22 +307,22 @@ private void verifyServiceOrder(Class<?>[] expected, Context context) {
301307 }
302308
303309 /**
304- * Initializes and returns a Context given the provided PluginIndex and
305- * array of services.
310+ * Initializes and returns a Context given the provided PluginIndex and array
311+ * of services.
306312 */
307- private Context createContext (PluginIndex index ,
308- Class <? extends Service >[] services )
313+ private Context createContext (final PluginIndex index ,
314+ final Class <? extends Service >[] services )
309315 {
310316 return new Context (Arrays .<Class <? extends Service >> asList (services ),
311317 index );
312318 }
313-
319+
314320 /**
315321 * Convenience method since you can't instantiate a Class<? extends Service>
316322 * array.
317323 */
318324 private Class <? extends Service >[] services (
319- Class <? extends Service >... serviceClasses )
325+ final Class <? extends Service >... serviceClasses )
320326 {
321327 return serviceClasses ;
322328 }
@@ -325,9 +331,9 @@ private Class<? extends Service>[] services(
325331 * Creates a PluginIndex and adds all the provided classes as plugins, indexed
326332 * under Service.class
327333 */
328- private PluginIndex pluginIndex (Class <?>... plugins ) {
329- PluginIndex index = new PluginIndex (null );
330- for (Class <?> c : plugins ) {
334+ private PluginIndex pluginIndex (final Class <?>... plugins ) {
335+ final PluginIndex index = new PluginIndex (null );
336+ for (final Class <?> c : plugins ) {
331337 index .add (new PluginInfo <Service >(c .getName (), Service .class ));
332338 }
333339 return index ;
@@ -371,14 +377,14 @@ public static interface OptionalMissingService extends Service, Optional {
371377 /** Abstract implementation of {@link BaseService}. */
372378 public static abstract class AbstractBase extends AbstractService implements
373379 BaseService
374- {
380+ {
375381 // NB: No implementation needed.
376382 }
377383
378384 /** Abstract implementation of {@link ExtensionService}. */
379385 public static abstract class AbstractExtension extends AbstractService
380386 implements ExtensionService
381- {
387+ {
382388 // NB: No implementation needed.
383389 }
384390
0 commit comments