diff options
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNode.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNode.java | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNode.java b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNode.java index 5c0aba2e0e..7196502112 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNode.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesNode.java @@ -49,7 +49,6 @@ import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.ListIterator; import org.eclipse.jgit.lib.Constants; @@ -122,40 +121,4 @@ public class AttributesNode { return Collections.unmodifiableList(rules); } - /** - * Returns the matching attributes for an entry path. - * - * @param entryPath - * the path to test. The path must be relative to this attribute - * node's own repository path, and in repository path format - * (uses '/' and not '\'). - * @param isDirectory - * true if the target item is a directory. - * @param attributes - * Map that will hold the attributes matching this entry path. If - * it is not empty, this method will NOT override any existing - * entry. - * @since 4.2 - */ - public void getAttributes(String entryPath, - boolean isDirectory, Attributes attributes) { - // Parse rules in the reverse order that they were read since the last - // entry should be used - ListIterator<AttributesRule> ruleIterator = rules.listIterator(rules - .size()); - while (ruleIterator.hasPrevious()) { - AttributesRule rule = ruleIterator.previous(); - if (rule.isMatch(entryPath, isDirectory)) { - ListIterator<Attribute> attributeIte = rule.getAttributes() - .listIterator(rule.getAttributes().size()); - // Parses the attributes in the reverse order that they were - // read since the last entry should be used - while (attributeIte.hasPrevious()) { - Attribute attr = attributeIte.previous(); - if (!attributes.containsKey(attr.getKey())) - attributes.put(attr); - } - } - } - } } |