aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alien11...@apache.org
Subject svn commit: r1781669 - in /aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model: Bean.java Blueprint.java
Date Sat, 04 Feb 2017 13:46:01 GMT
Author: alien11689
Date: Sat Feb  4 13:46:01 2017
New Revision: 1781669

URL: http://svn.apache.org/viewvc?rev=1781669&view=rev
Log:
[ARIES-1680] Write ext namespace only when bean needs field injection

Modified:
    aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java
    aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Blueprint.java

Modified: aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java?rev=1781669&r1=1781668&r2=1781669&view=diff
==============================================================================
--- aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java
(original)
+++ aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java
Sat Feb  4 13:46:01 2017
@@ -47,7 +47,7 @@ import static org.apache.aries.blueprint
 
 class Bean extends BeanRef implements BeanEnricher, XmlWriter {
 
-    static final String NS_EXT = "http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";
+    private static final String NS_EXT = "http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";
 
     SortedSet<Property> properties = new TreeSet<>();
     List<Argument> constructorArguments = new ArrayList<>();
@@ -257,6 +257,7 @@ class Bean extends BeanRef implements Be
         writer.writeAttribute("id", id);
         writer.writeAttribute("class", clazz.getName());
         if (needFieldInjection()) {
+            writer.writeNamespace("ext", NS_EXT);
             writer.writeAttribute("ext", NS_EXT, "field-injection", "true");
         }
         writeAttributes(writer);

Modified: aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Blueprint.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Blueprint.java?rev=1781669&r1=1781668&r2=1781669&view=diff
==============================================================================
--- aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Blueprint.java
(original)
+++ aries/trunk/blueprint/plugin/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Blueprint.java
Sat Feb  4 13:46:01 2017
@@ -35,8 +35,6 @@ import java.util.Map;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import static org.apache.aries.blueprint.plugin.model.Bean.NS_EXT;
-
 public class Blueprint implements BlueprintRegistry, ContextEnricher, XmlWriter {
     private static final String NS_BLUEPRINT = "http://www.osgi.org/xmlns/blueprint/v1.0.0";
 
@@ -167,7 +165,6 @@ public class Blueprint implements Bluepr
     private void writeBlueprint(XMLStreamWriter writer) throws XMLStreamException {
         writer.writeStartElement("blueprint");
         writer.writeDefaultNamespace(NS_BLUEPRINT);
-        writer.writeNamespace("ext", NS_EXT);
         if (blueprintConfiguration.getDefaultActivation() != null) {
             writer.writeAttribute("default-activation", blueprintConfiguration.getDefaultActivation().name().toLowerCase());
         }



Mime
View raw message