#44: Assume extra messages only needed when DEBUG flag is set

This commit is contained in:
Brendan Robert 2024-07-10 13:37:05 -05:00
parent 455151abf7
commit 88cd03a9e6

View File

@ -155,15 +155,21 @@ public class FloppyDisk {
if (sectorOrder == SectorOrder.UNKNOWN) { if (sectorOrder == SectorOrder.UNKNOWN) {
if (isProdosVolumeBlock(nibbles, 0x0400)) { if (isProdosVolumeBlock(nibbles, 0x0400)) {
System.out.println("Prodos volume block found at 0x0400"); if (DEBUG) {
System.out.println("Prodos volume block found at 0x0400");
}
sectorOrder = SectorOrder.PRODOS; sectorOrder = SectorOrder.PRODOS;
} else if (isProdosVolumeBlock(nibbles, 0x0B00)) { } else if (isProdosVolumeBlock(nibbles, 0x0B00)) {
System.out.println("Prodos volume block found at 0x0A00"); if (DEBUG) {
System.out.println("Prodos volume block found at 0x0B00");
}
sectorOrder = SectorOrder.DOS; sectorOrder = SectorOrder.DOS;
} }
} }
if (sectorOrder == SectorOrder.UNKNOWN) { if (sectorOrder == SectorOrder.UNKNOWN) {
System.out.println("Assuming sector order based on file extension"); if (DEBUG) {
System.out.println("Assuming sector order based on file extension");
}
sectorOrder = assumedOrder; sectorOrder = assumedOrder;
} }
System.out.println(null == sectorOrder ? "Sector order is null" : "Sector order is " + sectorOrder.name()); System.out.println(null == sectorOrder ? "Sector order is null" : "Sector order is " + sectorOrder.name());