Skip to content

Commit

Permalink
Sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Rich committed Jan 15, 2018
1 parent 07b3915 commit daf7d87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static Event eventLogFrom(final String eventName, final Long sequenceId,

final String name = metadata.name();
final String payload = jsonEnvelope.payloadAsJsonObject().toString();
final ZonedDateTime createdAt = metadata.createdAt().get();
final ZonedDateTime createdAt = metadata.createdAt().orElse(null);

return new Event(id, streamId, sequenceId, name, metadata.asJsonObject().toString(), payload, createdAt);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public class EventStreamTransformationService {
* @param event identified by the framework to be registered into the event map.
*/
public void register(@Observes final EventTransformationFoundEvent event) throws IllegalAccessException, InstantiationException {
logger.info(format("Loading Event Transformation %s", event.getClazz().getSimpleName()));
if (logger.isDebugEnabled()) {
logger.debug(format("Loading Event Transformation %s", event.getClazz().getSimpleName()));
}

final EventTransformation et = (EventTransformation) event.getClazz().newInstance();
et.setEnveloper(enveloper);
transformations.add(et);
Expand Down

0 comments on commit daf7d87

Please sign in to comment.