Source:
<code>public void addEventStreamDefinition(StreamDefinition streamDefinition) throws EventStreamConfigurationException { if (EventStreamServiceValueHolder.getConfigurationContextService() != null) { AxisConfiguration axisConfig = getAxisConfiguration(); String directoryPath = new File(axisConfig.getRepository().getPath()) .getAbsolutePath() + File.separator + EventStreamConstants.EVENT_STREAMS; File directory = new File(directoryPath); if (!directory.exists()) { if (!directory.mkdir()) { throw new EventStreamConfigurationException("Cannot create directory to add tenant specific Event Stream : " + streamDefinition.getStreamId()); } } String filePath = directoryPath + File.separator + streamDefinition.getName() + EventStreamConstants.STREAM_DEFINITION_FILE_DELIMITER + streamDefinition.getVersion() + EventStreamConstants.STREAM_DEFINITION_FILE_EXTENSION; StreamDefinition streamDefinitionOld = getStreamDefinition(streamDefinition.getStreamId()); if (streamDefinitionOld != null) { if (!(streamDefinitionOld.equals(streamDefinition))) { throw new StreamDefinitionAlreadyDefinedException("Different stream definition with same stream id " + streamDefinition.getStreamId() + " already exist " + streamDefinitionOld.toString() + ", cannot add stream definition " + streamDefinition.toString()); } else { return; } } try { validateEventStreamDefinition(streamDefinition); EventStreamConfigurationFileSystemInvoker.save(streamDefinition, filePath, axisConfig); } catch (EventStreamConfigurationException ex) { <START> throw ex; <END> } } else { synchronized (pendingStreams) { if (EventStreamServiceValueHolder.getConfigurationContextService() != null) { addEventStreamDefinition(streamDefinition); } else { pendingStreams.add(streamDefinition); } } } }</code><technical_language>is reason for catching throwing exception</technical_language>

Target:
public void addEventStreamDefinition(StreamDefinition streamDefinition) throws EventStreamConfigurationException { if (EventStreamServiceValueHolder.getConfigurationContextService() != null) { AxisConfiguration axisConfig = getAxisConfiguration(); String directoryPath = new File(axisConfig.getRepository().getPath()) .getAbsolutePath() + File.separator + EventStreamConstants.EVENT_STREAMS; File directory = new File(directoryPath); if (!directory.exists()) { if (!directory.mkdir()) { throw new EventStreamConfigurationException("Cannot create directory to add tenant specific Event Stream : " + streamDefinition.getStreamId()); } } String filePath = directoryPath + File.separator + streamDefinition.getName() + EventStreamConstants.STREAM_DEFINITION_FILE_DELIMITER + streamDefinition.getVersion() + EventStreamConstants.STREAM_DEFINITION_FILE_EXTENSION; StreamDefinition streamDefinitionOld = getStreamDefinition(streamDefinition.getStreamId()); if (streamDefinitionOld != null) { if (!(streamDefinitionOld.equals(streamDefinition))) { throw new StreamDefinitionAlreadyDefinedException("Different stream definition with same stream id " + streamDefinition.getStreamId() + " already exist " + streamDefinitionOld.toString() + ", cannot add stream definition " + streamDefinition.toString()); } else { return; } } validateEventStreamDefinition(streamDefinition); EventStreamConfigurationFileSystemInvoker.save(streamDefinition, filePath, axisConfig); } else { synchronized (pendingStreams) { if (EventStreamServiceValueHolder.getConfigurationContextService() != null) { addEventStreamDefinition(streamDefinition); } else { pendingStreams.add(streamDefinition); } } } }