[HER-1668] support '-' SURT directives in seed files analogous to '+' (if a REJECTing SurtPrefixedDecideRule is present)

* SurtPrefixedDecideRule.java
    pass only portion after directive ('+' or '-') to SurtPrefixSet
* SurtPrefixSet.java
    better comment/param name
This commit is contained in:
gojomo
2009-09-16 01:05:23 +00:00
parent ee1c9e2ce4
commit 142c72fc04
2 changed files with 6 additions and 6 deletions
@@ -132,14 +132,14 @@ public class SurtPrefixSet extends PrefixSet {
/**
* Interpret the given line as a directive, returning true if it
* was meaningful.
* Interpret the given SURT/URI/host as a directive, returning true
* if it was meaningful.
*
* @param line potential directive
* @param suri potential directive
* @return boolean true if applied as directive, false otherwise
*/
public boolean considerAsAddDirective(String line) {
String u = line.trim();
public boolean considerAsAddDirective(String suri) {
String u = suri.trim();
if(u.length()==0) {
// empty string: consider a mistake
return false;
@@ -274,7 +274,7 @@ implements
public boolean nonseedLine(String line) {
String effectiveDirective = getEffectiveAddDirective();
if(line.startsWith(effectiveDirective)) {
return surtPrefixes.considerAsAddDirective(line);
return surtPrefixes.considerAsAddDirective(line.substring(effectiveDirective.length()));
} else {
// not a line this instance is interested in
return false;