From 7b831ff7356725b9872a9635d1e0eeb035f2790b Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 3 Oct 2006 14:30:21 +0000 Subject: test and fixes for 152366: support AND in include/exclude/dump --- .../aspectj/weaver/loadtime/definition/DocumentParser.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'loadtime/src/org') diff --git a/loadtime/src/org/aspectj/weaver/loadtime/definition/DocumentParser.java b/loadtime/src/org/aspectj/weaver/loadtime/definition/DocumentParser.java index 2800ebece..2e109527a 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/definition/DocumentParser.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/definition/DocumentParser.java @@ -193,17 +193,17 @@ public class DocumentParser extends DefaultHandler { } else if (ASPECTS_ELEMENT.equals(qName)) { m_inAspects = true; } else if (INCLUDE_ELEMENT.equals(qName) && m_inWeaver) { - String typePattern = attributes.getValue(WITHIN_ATTRIBUTE); + String typePattern = getWithinAttribute(attributes); if (!isNull(typePattern)) { m_definition.getIncludePatterns().add(typePattern); } } else if (EXCLUDE_ELEMENT.equals(qName) && m_inWeaver) { - String typePattern = attributes.getValue(WITHIN_ATTRIBUTE); + String typePattern = getWithinAttribute(attributes); if (!isNull(typePattern)) { m_definition.getExcludePatterns().add(typePattern); } } else if (DUMP_ELEMENT.equals(qName) && m_inWeaver) { - String typePattern = attributes.getValue(WITHIN_ATTRIBUTE); + String typePattern = getWithinAttribute(attributes); if (!isNull(typePattern)) { m_definition.getDumpPatterns().add(typePattern); } @@ -212,12 +212,12 @@ public class DocumentParser extends DefaultHandler { m_definition.setDumpBefore(true); } } else if (EXCLUDE_ELEMENT.equals(qName) && m_inAspects) { - String typePattern = attributes.getValue(WITHIN_ATTRIBUTE); + String typePattern = getWithinAttribute(attributes); if (!isNull(typePattern)) { m_definition.getAspectExcludePatterns().add(typePattern); } } else if (INCLUDE_ELEMENT.equals(qName) && m_inAspects) { - String typePattern = attributes.getValue(WITHIN_ATTRIBUTE); + String typePattern = getWithinAttribute(attributes); if (!isNull(typePattern)) { m_definition.getAspectIncludePatterns().add(typePattern); } @@ -227,6 +227,10 @@ public class DocumentParser extends DefaultHandler { super.startElement(uri, localName, qName, attributes); } + private String getWithinAttribute(Attributes attributes) { + return replaceXmlAnd(attributes.getValue(WITHIN_ATTRIBUTE)); + } + public void endElement(String uri, String localName, String qName) throws SAXException { if (CONCRETE_ASPECT_ELEMENT.equals(qName)) { m_lastConcreteAspect = null; -- cgit v1.2.3