sbtourist / Journal.IO

Journal.IO is a zero-dependency, fast and easy-to-use journal storage implementation.
Apache License 2.0
260 stars 39 forks source link

README: unused variable `sync` #59

Open stuartsierra opened 9 years ago

stuartsierra commented 9 years ago

In the README, under "Write some records", the boolean variable sync is unused:

for (int i = 0; i < writes; i++) {
    boolean sync = i % 2 == 0 ? true : false;
    journal.write(new String("DATA" + i), WriteType.SYNC);
}

This might have originated with this example in the HawtJournal README:

for (int i = 0; i < writes; i++) {
    boolean sync = i % 2 == 0 ? true : false;
    journal.write(ByteBuffer.wrap(new String("DATA" + i).getBytes("UTF-8")), sync);
}