diff --git a/logback-core/src/main/java/ch/qos/logback/core/joran/spi/SaxEventInterpretationContext.java b/logback-core/src/main/java/ch/qos/logback/core/joran/spi/SaxEventInterpretationContext.java index b6fa27a251..21b3f0d36e 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/joran/spi/SaxEventInterpretationContext.java +++ b/logback-core/src/main/java/ch/qos/logback/core/joran/spi/SaxEventInterpretationContext.java @@ -33,131 +33,20 @@ * @author Ceki Gülcü */ public class SaxEventInterpretationContext extends ContextAwareBase implements PropertyContainer { - // Stack xobjectStack; Stack modelStack; - // Stack implicitActionDataStack; - - // Map objectMap; - // Map propertiesMap; - // Map importMap; - -// final HashMap> dependenciesMap = new HashMap<>(); -// final List startedDependencies = new ArrayList<>(); SaxEventInterpreter saxEventInterpreter; -// DefaultNestedComponentRegistry defaultNestedComponentRegistry = new DefaultNestedComponentRegistry(); -// private BeanDescriptionCache beanDescriptionCache; public SaxEventInterpretationContext(Context context, SaxEventInterpreter saxEventInterpreter) { this.context = context; this.saxEventInterpreter = saxEventInterpreter; - // this.objectStack = new Stack<>(); this.modelStack = new Stack<>(); - // this.implicitActionDataStack = new Stack<>(); - - // objectMap = new HashMap<>(5); - // propertiesMap = new HashMap<>(5); - // importMap = new HashMap<>(5); } -// public BeanDescriptionCache getBeanDescriptionCache() { -// if (beanDescriptionCache == null) { -// beanDescriptionCache = new BeanDescriptionCache(getContext()); -// } -// return beanDescriptionCache; -// } -// -// public DefaultNestedComponentRegistry getDefaultNestedComponentRegistry() { -// return defaultNestedComponentRegistry; -// } - -// public Map getCopyOfPropertyMap() { -// return new HashMap(propertiesMap); -// } -// -// void setPropertiesMap(Map propertiesMap) { -// this.propertiesMap = propertiesMap; -// } - -// public HashMap> getDependenciesMap() { -// return dependenciesMap; -// } - -// public void addDependency(Model model, String ref) { -// List refList = dependenciesMap.get(model); -// if(refList == null) { -// refList = new ArrayList<>(); -// } -// refList.add(ref); -// dependenciesMap.put(model, refList); -// } - -// public List getDependencies(Model model) { -// return dependenciesMap.get(model); -// } - -// public String getLineNumber() { -// if(saxEventInterpreter == null) { -// return "NA"; -// } -// Locator locator = saxEventInterpreter.getLocator(); -// -// if (locator != null) { -// return Integer.toString(locator.getLineNumber()); -// } else { -// return "NA"; -// } -// } - public SaxEventInterpreter getSaxEventInterpreter() { return saxEventInterpreter; } -// public Stack getObjectStack() { -// return objectStack; -// } - -// /** -// * @deprecated Use {@link isObjectStackEmpty isObjectStackEmpty()} method -// * instead -// * @return -// */ -// public boolean isEmpty() { -// return isObjectStackEmpty(); -// } - -// /** -// * -// * @return whether the objectStack is empty or not -// */ -// public boolean isObjectStackEmpty() { -// return objectStack.isEmpty(); -// } -// -// public Object peekObject() { -// return objectStack.peek(); -// } -// -// public void pushObject(Object o) { -// objectStack.push(o); -// } -// -// public Object popObject() { -// return objectStack.pop(); -// } - - /** - * actionDataStack contains ActionData instances We use a stack of ActionData - * objects in order to support nested elements which are handled by the same - * NestedComplexPropertyIA instance. We push a ActionData instance in the - * isApplicable method (if the action is applicable) and pop it in the end() - * method. The XML well-formedness property will guarantee that a push will - * eventually be followed by a corresponding pop. - */ -// public Stack getImplcitActionDataStack() { -// return implicitActionDataStack; -// } -// /** * Return the Model at the top of the model stack, may return null. * @@ -188,38 +77,6 @@ public Stack getCopyOfModelStack() { return copy; } -// public Object getObject(int i) { -// return objectStack.get(i); -// } - -// public Map getObjectMap() { -// return objectMap; -// } - -// /** -// * Add a property to the properties of this execution context. If the property -// * exists already, it is overwritten. -// */ -// public void addSubstitutionProperty(String key, String value) { -// if (key == null || value == null) { -// return; -// } -// // values with leading or trailing spaces are bad. We remove them now. -// value = value.trim(); -// propertiesMap.put(key, value); -// } - -// public void addSubstitutionProperties(Properties props) { -// if (props == null) { -// return; -// } -// for (Object keyObject : props.keySet()) { -// String key = (String) keyObject; -// String val = props.getProperty(key); -// addSubstitutionProperty(key, val); -// } -// } - /** * If a key is found in propertiesMap then return it. Otherwise, delegate to the * context. @@ -246,42 +103,4 @@ public String subst(String value) { } } -// public void markStartOfNamedDependency(String name) { -// startedDependencies.add(name); -// } -// public boolean isNamedDependencyStarted(String name) { -// return startedDependencies.contains(name); -// } - -// /** -// * Add an import to the importMao -// * @param stem the class to import -// * @param fqcn the fully qualified name of the class -// * -// * @since 1.3 -// */ -// public void addImport(String stem, String fqcn) { -// importMap.put(stem, fqcn); -// } -// -// /** -// * Given a stem, get the fully qualified name of the class corresponding to the stem. -// * For unknown stems, returns the stem as is. If stem is null, null is returned. -// * -// * @param stem may be null -// * @return fully qualified name of the class corresponding to the stem. For unknown stems, returns the stem as is. -// * If stem is null, null is returned. -// * @since 1.3 -// */ -// public String getImport(String stem) { -// if(stem == null) -// return null; -// -// String result = importMap.get(stem); -// if(result == null) -// return stem; -// else -// return result; -// } - } diff --git a/logback-core/src/main/java/ch/qos/logback/core/model/processor/XMLIncludeModelHandler.java b/logback-core/src/main/java/ch/qos/logback/core/model/processor/XMLIncludeModelHandler.java new file mode 100644 index 0000000000..7ad44d51e3 --- /dev/null +++ b/logback-core/src/main/java/ch/qos/logback/core/model/processor/XMLIncludeModelHandler.java @@ -0,0 +1,2 @@ +package ch.qos.logback.core.model.processor;public class XMLIncludeModelHandler { +}