]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/JcrUtils.java
Fix typo in date path generation
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jcr / src / main / java / org / argeo / jcr / JcrUtils.java
index f530f170b7fe4a0637d2eb72b75b4470dba07199..cf0d2d74aa9bc7adf0b273ef0b0d9b845d6f4b71 100644 (file)
@@ -160,25 +160,26 @@ public class JcrUtils implements ArgeoJcrConstants {
         */
        public static String dateAsPath(Calendar cal, Boolean addHour) {
                StringBuffer buf = new StringBuffer(14);
-               buf.append('Y').append(cal.get(Calendar.YEAR));// 5
-               buf.append('/');// 1
+               buf.append('Y').append(cal.get(Calendar.YEAR));
+               buf.append('/');
                int month = cal.get(Calendar.MONTH) + 1;
                buf.append('M');
                if (month < 10)
                        buf.append(0);
-               buf.append(month);// 3
-               buf.append('/');// 1
+               buf.append(month);
+               buf.append('/');
                int day = cal.get(Calendar.DAY_OF_MONTH);
                if (day < 10)
                        buf.append(0);
-               buf.append('D').append(day);// 3
-               buf.append('/');// 1
+               buf.append('D').append(day);
+               buf.append('/');
                if (addHour) {
                        int hour = cal.get(Calendar.HOUR_OF_DAY);
+                       buf.append('H');
                        if (hour < 10)
                                buf.append(0);
-                       buf.append('H').append(hour);// 3
-                       buf.append('/');// 1
+                       buf.append(hour);
+                       buf.append('/');
                }
                return buf.toString();
 
@@ -327,6 +328,11 @@ public class JcrUtils implements ArgeoJcrConstants {
 
        /** Recursively outputs the contents of the given node. */
        public static void debug(Node node) {
+               debug(node, log);
+       }
+
+       /** Recursively outputs the contents of the given node. */
+       public static void debug(Node node, Log log) {
                try {
                        // First output the node path
                        log.debug(node.getPath());