Skip to content

Commit

Permalink
Merge branch 'feature/#49-node-factories-with-common-configs' of gith…
Browse files Browse the repository at this point in the history
…ub.com:Knotx/knotx-fragments into feature/#49-node-factories-with-common-configs
  • Loading branch information
tomaszmichalak committed Nov 26, 2019
2 parents bda5642 + 8519da3 commit e408ba7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

public class FragmentsHandler implements Handler<RoutingContext> {

private static final Logger LOGGER = LoggerFactory.getLogger(TaskProvider.class);
private static final Logger LOGGER = LoggerFactory.getLogger(FragmentsHandler.class);

private final RequestContextEngine requestContextEngine;

Expand Down Expand Up @@ -120,7 +120,7 @@ private List<Fragment> retrieveFragments(List<FragmentEvent> events,

private List<FragmentEventContextTaskAware> toEvents(List<Fragment> fragments,
ClientRequest clientRequest) {
LOGGER.debug("Processing fragments [{}]", fragments);
LOGGER.trace("Processing fragments [{}]", fragments);
return fragments.stream()
.map(
fragment -> {
Expand All @@ -129,7 +129,7 @@ private List<FragmentEventContextTaskAware> toEvents(List<Fragment> fragments,

return taskProvider.newInstance(fragmentEventContext)
.map(task -> {
LOGGER.info("Created task [{}] for fragment [{}]", task,
LOGGER.trace("Created task [{}] for fragment [{}]", task,
fragmentEventContext.getFragmentEvent().getFragment().getId());
return task;
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class NodeFactoryNotFoundException extends ConfigurationException {
private String factory;

public NodeFactoryNotFoundException(String factory) {
super("Factory not registered for [" + factory + "]");
super("Node factory not registered for [" + factory + "]");
this.factory = factory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ private NodeFactory findNodeFactory(ServiceLoader<NodeFactory> factories, String
false);

return factoryStream.filter(f -> f.getName().equals(factory)).findFirst()
.orElseThrow(() -> new IllegalStateException("Node not decfined"));
.orElseThrow(() -> new IllegalStateException("Node not defined"));
}
}
}

0 comments on commit e408ba7

Please sign in to comment.