/** {@inheritDoc} */ public synchronized Output getInstance(Input input) { Output output = get(input); if (output != null) { log.trace("Input key mapped to a non-null value, returning output"); return output; } else { log.trace("Input key mapped to a null value"); } log.trace("Creating new output instance and inserting to factory map"); output = createNewInstance(input); if (output == null) { log.error("New output instance was not created"); return null; } put(input, output); return output; }
/** {@inheritDoc} */ public synchronized Output getInstance(Input input) { Output output = get(input); if (output != null) { log.trace("Input key mapped to a non-null value, returning output"); return output; } else { log.trace("Input key mapped to a null value"); } log.trace("Creating new output instance and inserting to factory map"); output = createNewInstance(input); if (output == null) { log.error("New output instance was not created"); return null; } put(input, output); return output; }