debugging OfflineModeTest

This commit is contained in:
peter
2014-04-10 14:52:52 +02:00
parent 0d6181521e
commit c4c0770ba6
@@ -51,6 +51,9 @@ public class LastUnchangedContentTracker {
Integer oldContentId = getSavedContentId(file);
if (oldContentId != null && oldContentId > 0) {
if (LOG.isDebugEnabled()) {
LOG.debug("releasing content for " + file + ", id = " + oldContentId);
}
getFS().releaseContent(oldContentId);
}
@@ -88,13 +91,16 @@ public class LastUnchangedContentTracker {
private static void saveContentReference(VirtualFile file, int contentId) {
if (contentId == 0) {
if (LOG.isDebugEnabled()) {
LOG.debug("saveContentReference without content for file = " + file);
}
return; // content not loaded yet, nothing to save
}
LOG.assertTrue(contentId > 0, contentId);
if (LOG.isDebugEnabled()) {
LOG.debug("saveContentReference file = " + file);
LOG.debug("saveContentReference file = " + file + ", id = " + contentId);
}
long stamp = file.getTimeStamp();
@@ -139,6 +145,9 @@ public class LastUnchangedContentTracker {
Integer oldContentId = null;
try {
final DataInputStream stream = ACQUIRED_CONTENT_ATTR.readAttribute(file);
if (LOG.isDebugEnabled()) {
LOG.debug("getSavedContentId for " + file + "; stream=" + stream);
}
if (stream != null) {
try {
oldContentId = stream.readInt();
@@ -146,6 +155,9 @@ public class LastUnchangedContentTracker {
finally {
stream.close();
}
if (LOG.isDebugEnabled()) {
LOG.debug("oldContentId=" + oldContentId);
}
LOG.assertTrue(oldContentId > 0, oldContentId);
}
}