buf.append('/');// 1
if (addHour) {
int hour = cal.get(Calendar.HOUR_OF_DAY);
+ buf.append('H').append(hour);// 3
if (hour < 10)
buf.append(0);
- buf.append('H').append(hour);// 3
buf.append('/');// 1
}
return buf.toString();
}
}
+ /**
+ * Discards the current changes in the session attached to this node. To be
+ * used typically in a catch block.
+ *
+ * @see #discardQuietly(Session)
+ */
+ public static void discardUnderlyingSessionQuietly(Node node) {
+ try {
+ discardQuietly(node.getSession());
+ } catch (RepositoryException e) {
+ log.warn("Cannot quietly discard session of node " + node + ": "
+ + e.getMessage());
+ }
+ }
+
/**
* Discards the current changes in a session by calling
* {@link Session#refresh(boolean)} with <code>false</code>, only logging