You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:58:42 UTC

[sling-org-apache-sling-resource-inventory] annotated tag org.apache.sling.resource.inventory-1.0.4 created (now 17b01b5)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.resource.inventory-1.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-inventory.git.


      at 17b01b5  (tag)
 tagging 950ea6d7fe37b000fdc9b86711397237a005901c (commit)
      by Carsten Ziegeler
      on Wed Apr 15 10:16:40 2015 +0000

- Log -----------------------------------------------------------------
org.apache.sling.resource.inventory-1.0.4
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 12839ad  SLING-3018 :  Add an inventory printer which dumps a resource tree into json
     new b692003  Set svn:ignore
     new 6d2ad49  Add metatype info
     new 0f3f228  [maven-release-plugin] prepare release org.apache.sling.resource.inventory-0.5.0
     new 09ea917  [maven-release-plugin] rollback the release of org.apache.sling.resource.inventory-0.5.0
     new fa37b1f  Correct scm info
     new 773e549  [maven-release-plugin] prepare release org.apache.sling.resource.inventory-0.5.0
     new 8db6343  [maven-release-plugin] prepare for next development iteration
     new 81b2fa4  SLING-3197 : ClassCastException when serializing arrays of scalar types
     new a6fd992  SLING-3198 : JSON Tree Rendering should do tree depth first tree traversal
     new ab62e38  [maven-release-plugin] prepare release org.apache.sling.resource.inventory-1.0.0
     new 564a3ec  [maven-release-plugin] prepare for next development iteration
     new 01bf0a8  SLING-3507 : Potential NPE in JSON dump from JMX
     new 6428026  [maven-release-plugin] prepare release org.apache.sling.resource.inventory-1.0.2
     new b556e64  [maven-release-plugin] prepare for next development iteration
     new 3529b23  SLING-4625 : No resource inventory if mbean attribute value is a double
     new 365b839  [maven-release-plugin] prepare release org.apache.sling.resource.inventory-1.0.4
     new 950ea6d  [maven-release-plugin]  copy for tag org.apache.sling.resource.inventory-1.0.4

The 18 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-resource-inventory] 01/04: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.resource.inventory-1.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-inventory.git

commit b556e64e67de2f35fdabab159ccc581e1bbfefdf
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Tue Apr 22 10:47:15 2014 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/resource-inventory@1589083 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 91620fe..f90f741 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,15 +28,15 @@
 
     <groupId>org.apache.sling</groupId>
     <artifactId>org.apache.sling.resource.inventory</artifactId>
-    <version>1.0.2</version>
+    <version>1.0.3-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Inventory Printer Based on Resources</name>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.resource.inventory-1.0.2</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.resource.inventory-1.0.2</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.resource.inventory-1.0.2</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/resource-inventory</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/resource-inventory</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/resource-inventory</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-resource-inventory] 04/04: [maven-release-plugin] copy for tag org.apache.sling.resource.inventory-1.0.4

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.resource.inventory-1.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-inventory.git

commit 950ea6d7fe37b000fdc9b86711397237a005901c
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 15 10:16:40 2015 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.resource.inventory-1.0.4
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.resource.inventory-1.0.4@1673709 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-resource-inventory] 03/04: [maven-release-plugin] prepare release org.apache.sling.resource.inventory-1.0.4

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.resource.inventory-1.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-inventory.git

commit 365b8395cf7a7363fed35c67479b2d938cc95be5
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 15 10:16:20 2015 +0000

    [maven-release-plugin] prepare release org.apache.sling.resource.inventory-1.0.4
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/resource-inventory@1673708 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index f90f741..c452c40 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,15 +28,15 @@
 
     <groupId>org.apache.sling</groupId>
     <artifactId>org.apache.sling.resource.inventory</artifactId>
-    <version>1.0.3-SNAPSHOT</version>
+    <version>1.0.4</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Inventory Printer Based on Resources</name>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/resource-inventory</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/resource-inventory</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/resource-inventory</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.resource.inventory-1.0.4</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.resource.inventory-1.0.4</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.resource.inventory-1.0.4</url>
     </scm>
 
     <build>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-resource-inventory] 02/04: SLING-4625 : No resource inventory if mbean attribute value is a double

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.resource.inventory-1.0.4
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resource-inventory.git

commit 3529b237a8b031981d49beeda44beaa6c9ca7124
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Wed Apr 15 10:09:31 2015 +0000

    SLING-4625 : No resource inventory if mbean attribute value is a double
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/resource-inventory@1673706 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resource/inventory/impl/JsonObjectCreator.java | 50 ++++++++++++++--------
 .../impl/ResourceInventoryPrinterFactory.java      |  5 ++-
 2 files changed, 34 insertions(+), 21 deletions(-)

diff --git a/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java b/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java
index 2516edc..34d5d23 100644
--- a/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java
+++ b/src/main/java/org/apache/sling/resource/inventory/impl/JsonObjectCreator.java
@@ -32,6 +32,7 @@ import org.apache.sling.api.resource.ValueMap;
 import org.apache.sling.commons.json.JSONArray;
 import org.apache.sling.commons.json.JSONException;
 import org.apache.sling.commons.json.JSONObject;
+import org.slf4j.LoggerFactory;
 
 /**
  * Creates a JSONObject from a resource
@@ -128,8 +129,6 @@ public abstract class JsonObjectCreator {
             return value;
         } else if ( value instanceof Integer ) {
             return value;
-        } else if ( value instanceof Double ) {
-            return value;
         } else if ( value != null ) {
             return value.toString();
         } else {
@@ -149,8 +148,7 @@ public abstract class JsonObjectCreator {
     private static void createProperty(final JSONObject obj,
                                  final ValueMap valueMap,
                                  final String key,
-                                 final Object value)
-    throws JSONException {
+                                 final Object value) {
         Object[] values = null;
         if (value.getClass().isArray()) {
             if (value instanceof long[]) {
@@ -176,7 +174,11 @@ public abstract class JsonObjectCreator {
             }
             // write out empty array
             if ( values.length == 0 ) {
-                obj.put(key, new JSONArray());
+                try {
+                    obj.put(key, new JSONArray());
+                } catch ( final JSONException ignore ) {
+                    // we ignore this
+                }
                 return;
             }
         }
@@ -188,26 +190,36 @@ public abstract class JsonObjectCreator {
             // their name
             // (colon is not allowed as a JCR property name)
             // in the name, and the value should be the size of the binary data
-            if (values == null) {
-                obj.put(":" + key, getLength(valueMap, -1, key, (InputStream)value));
-            } else {
-                final JSONArray result = new JSONArray();
-                for (int i = 0; i < values.length; i++) {
-                    result.put(getLength(valueMap, i, key, (InputStream)values[i]));
+            try {
+                if (values == null) {
+                    obj.put(":" + key, getLength(valueMap, -1, key, (InputStream)value));
+                } else {
+                    final JSONArray result = new JSONArray();
+                    for (int i = 0; i < values.length; i++) {
+                        result.put(getLength(valueMap, i, key, (InputStream)values[i]));
+                    }
+                    obj.put(":" + key, result);
                 }
-                obj.put(":" + key, result);
+            } catch ( final JSONException ignore ) {
+                // we ignore this
+                LoggerFactory.getLogger(JsonObjectCreator.class).warn("Unable to create JSON value", ignore);
             }
             return;
         }
 
-        if (!value.getClass().isArray()) {
-            obj.put(key, getValue(value));
-        } else {
-            final JSONArray result = new JSONArray();
-            for (Object v : values) {
-                result.put(getValue(v));
+        try {
+            if (!value.getClass().isArray()) {
+                obj.put(key, getValue(value));
+            } else {
+                final JSONArray result = new JSONArray();
+                for (Object v : values) {
+                    result.put(getValue(v));
+                }
+                obj.put(key, result);
             }
-            obj.put(key, result);
+        } catch ( final JSONException ignore ) {
+            // we ignore this
+            LoggerFactory.getLogger(JsonObjectCreator.class).warn("Unable to create JSON value", ignore);
         }
     }
 
diff --git a/src/main/java/org/apache/sling/resource/inventory/impl/ResourceInventoryPrinterFactory.java b/src/main/java/org/apache/sling/resource/inventory/impl/ResourceInventoryPrinterFactory.java
index 4591274..77148ad 100644
--- a/src/main/java/org/apache/sling/resource/inventory/impl/ResourceInventoryPrinterFactory.java
+++ b/src/main/java/org/apache/sling/resource/inventory/impl/ResourceInventoryPrinterFactory.java
@@ -35,6 +35,7 @@ import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.commons.json.JSONException;
+import org.slf4j.LoggerFactory;
 
 @Component(configurationFactory=true, policy=ConfigurationPolicy.REQUIRE, metatype=true)
 @Service(value=InventoryPrinter.class)
@@ -78,8 +79,8 @@ public class ResourceInventoryPrinterFactory implements InventoryPrinter {
             }
         } catch (final LoginException e) {
             // ignore
-        } catch (JSONException e) {
-            // ignore
+        } catch (final JSONException ignore) {
+            LoggerFactory.getLogger(this.getClass()).warn("Unable to create resource json", ignore);
         } finally {
             if ( resolver != null ) {
                 resolver.close();

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.