Source:
<code>public <T> T injectedInstance(Class<? extends T> clazz, HttpRequest request, HttpResponse response) { <START> Constructor<?> constructor = PickConstructor.pickSingletonConstructor(clazz); <END> Object obj = null; if (isSingletonResource(clazz)) { SingletonResource factory = singletonResourceFactories.get(clazz); obj = factory.createResource(request, response, this); } else { if (constructor == null) { if (false) { constructor = clazz.getDeclaredConstructors()[0]; constructor.setAccessible(true); if (!Modifier.isStatic(clazz.getModifiers())) { Object[] args = {null}; try { obj = constructor.newInstance(args); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } } else { try { obj = constructor.newInstance(); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } } } else { throw new IllegalArgumentException(Messages.MESSAGES.unableToFindPublicConstructorForClass(clazz.getName())); } } else { ConstructorInjector constructorInjector = getInjectorFactory().createConstructor(constructor, this); obj = constructorInjector.construct(request, response); } } PropertyInjector propertyInjector = getInjectorFactory().createPropertyInjector(clazz, this); propertyInjector.inject(request, response, obj); return (T) obj; }</code><technical_language>creation of Constructor object moved _else_ part of _if_ added below, it</technical_language>

Target:
public <T> T injectedInstance(Class<? extends T> clazz, HttpRequest request, HttpResponse response) { Object obj = null; if (isSingletonResource(clazz)) { SingletonResource factory = singletonResourceFactories.get(clazz); obj = factory.createResource(request, response, this).toCompletableFuture().getNow(null); } else { Constructor<?> constructor = PickConstructor.pickSingletonConstructor(clazz); if (constructor == null) { if (false) { constructor = clazz.getDeclaredConstructors()[0]; constructor.setAccessible(true); if (!Modifier.isStatic(clazz.getModifiers())) { Object[] args = {null}; try { obj = constructor.newInstance(args); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } } else { try { obj = constructor.newInstance(); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } } } else { throw new IllegalArgumentException(Messages.MESSAGES.unableToFindPublicConstructorForClass(clazz.getName())); } } else { ConstructorInjector constructorInjector = getInjectorFactory().createConstructor(constructor, this); obj = constructorInjector.construct(request, response, false).toCompletableFuture().getNow(null); } } PropertyInjector propertyInjector = getInjectorFactory().createPropertyInjector(clazz, this); propertyInjector.inject(request, response, obj, false).toCompletableFuture().getNow(null); return (T)obj; }