Permalink
Browse files

Fix issue #80, don't automatically connect non-primary input ports to…

… the default readable port
  • Loading branch information...
ndw committed Mar 8, 2013
1 parent 9f295f7 commit 898f69f509026c802662e21b1347d5b31839eb9b
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/com/xmlcalabash/model/Step.java
@@ -664,7 +664,17 @@ protected boolean checkBinding(Input input) {
}
}
if (port == null) {
if (input.getPrimary() && port != null) {
String stepName = port.getStep().getName();
String portName = port.getPort();
PipeNameBinding binding = new PipeNameBinding(runtime, node);
binding.setStep(stepName);
binding.setPort(portName);
//errhandler.warning(node, "Manufactured binding for " + input.getPort() + " to " + portName + " on " + stepName);
input.addBinding(binding);
} else {
// If there's a default binding, use it. FIXME: Is it safe to copy the binding like this?
Input declIn = declaration.getInput(input.getPort());
if (declIn.getBinding().size() != 0) {
@@ -676,16 +686,6 @@ protected boolean checkBinding(Input input) {
valid = false;
error("Input " + input.getPort() + " unbound on " + getType() + " step named " + getName() + " and no default binding available.", XProcConstants.staticError(32));
}
} else {
String stepName = port.getStep().getName();
String portName = port.getPort();
PipeNameBinding binding = new PipeNameBinding(runtime, node);
binding.setStep(stepName);
binding.setPort(portName);
//errhandler.warning(node, "Manufactured binding for " + input.getPort() + " to " + portName + " on " + stepName);
input.addBinding(binding);
}
}
}

0 comments on commit 898f69f

Please sign in to comment.