Skip to content

v4.0.1

Choose a tag to compare

@jonelo jonelo released this 04 Oct 21:54
· 31 commits to main since this release
  • Bug fixes

    • issue #95: a wrong value for --style resp. --compat is reported by the raw message of a
      Java exception, without saying what kind of failure it is, and a mistyped keyword is
      reported as a file that is missing, because --style accepts a file name as well; such a
      value is a parameter error (exit code 2) now, and so is a file that is not a valid style
      or whose compat.syntaxVersion is too old, while a genuine I/O problem at an existing
      file keeps the exit code 4
    • issue #94: a wanted list (-w) in the text mode format of a tool such as sha256sum is
      read silently, so the leading space of such a line ends up in the name that is printed
      in brackets, without the hint at the style gnu-linux that -c gives; the text of that
      hint has one source now, Parser.getStyleHint()
    • issue #93: a wanted list (-w) that stores the same hash value more than once reports
      only the name of the entry that has been read last, although such duplicates are kept
      on purpose and the name in brackets is what the mode is for; the summary counted the
      entries rather than the hash values as the "total number of wanted hashes"
    • issue #92: the summary of a wanted list run (-w) calls the list a "check file", because
      ParserStatistics hardcodes that noun although the same parser reads a check list and a
      wanted list; option -e alone reports a number of wanted hashes and files that match
      wanted hashes although no wanted list has been read; ParserStatistics.reset() does not
      reset three of its fields, so a second run in the same JVM starts with the numbers of
      the first one; and -h -V does not mention that -w sets the verbose control set to "all"
    • issue #91: the options -V noerrors and -V noinfo (and therefore -V none) have no effect
      while files are being searched by wanted hashes (-w resp. -e) or hashed, because both
      of those message consumers write to standard error directly rather than through the
      Messenger, which is the class that applies the settings of option -V
    • issue #90: the wanted list (-w) is not validated like a check list (-c), so a list that
      is a directory or that does not exist is reported by the raw message of a Java
      exception, without the "Jacksum: Error: " prefix and without naming the option; the
      same unprefixed message could show up for a check list that cannot be read
    • issue #89: the exit code of the wanted list mode (-w resp. -e together with file
      parameters) does not reflect the result: a run that reads not even one file reports
      success, read errors never reach the exit code, an empty --match-filter turns the
      verdict upside down, and -e together with -w overwrites the exit code of the
      expectation; an unreachable branch that returned an undocumented exit code for an
      expectation has been removed from MessageConsumerForHashedFiles
    • issue #88: new Parameters(String[] args) ignores the arguments it is given
    • issue #87: an explicitly set number of threads is lost when a Parameters object is merged
      or turned back into a command line
    • issue #86: the value "max" is only recognized in lower case, and the errors of -r do not
      name the option
    • issue #85: the value range of --threads-hashing and --threads-reading is not enforced, and
      a large value for --threads-reading hangs Jacksum forever
    • issue #84: the bit width range of -a unknown: that -h documents, 1 to 1024, is not
      enforced
    • issue #83: -a unknown: with a length that does not fit into an int reports the
      message of a Java NumberFormatException
    • issue #81: the CRC finder and the CRC brute forcer of -a unknown: reject a length
      below 8 bits, so 15 well-known CRCs of the catalogue can never be found
    • issue #80: -a unknown:63 never ends its brute-force session, because the loop over all
      polynomials wraps around instead of stopping
    • issue #79: a mistyped sequence type of -q resp. -k is silently read as hex, so the error
      message talks about hex instead of about the unknown type
    • issue #78: every decoding error of -q and -k reaches the user without the "Jacksum:
      Parameter Error: " prefix, and without naming the option that was at fault
    • issue #77: the error message for an algorithm that cannot be used depends on the action, and an
      empty algorithm name produces a message that starts with a space
    • issue #76: -c and -w die with an uncaught NullPointerException if the algorithm cannot be
      instantiated
    • issue #75: An HMAC over an algorithm that does not support HMAC prints a Java stack trace and
      then a wrong message
    • issue #74: #CHECKSUM{,} needs the canonical algorithm name when one algorithm is
      selected, but the name as typed when several are
    • issue #73: Jacksum keeps run specific state in static fields, so one run influences the next one
      in the same JVM, and an HMAC key stays in the heap
    • issue #72: DefaultCompatibilityProperties sets a property that nothing reads
    • issue #71: Reading standard input closes System.in, although the code says it must not
    • issue #70: A reused Parameters object compares against a stale expectation and cannot be
      turned back into a complete command line
    • issue #69: An invalid encoding in a format aborts the resolution of all following tokens
    • issue #67: A custom CRC accepts an xorOut value that is wider than the CRC
    • issue #66: Several parameter errors are reported with a wrong, malformed or unprefixed
      message, one check is dead code
    • issue #65: Values substituted into a -F format are scanned again, so a file name
      like #QUOTE is replaced in the output
    • issue #64: --string-list ignores --charset-string-list when hashing, so the result
      depends on the JVM default charset
    • issue #63: Error messages for option arguments are used as a format string, so an
      argument containing % destroys the message
    • issue #62: -q dec: and -q oct: append 0x00 bytes at the end instead of honouring
      the position of an empty value
    • issue #61: --path-relative-to-entry with a number beyond the file list throws an
      uncaught IndexOutOfBoundsException
    • issue #60: HMAC ignores the number of processed bytes, and returns the previous
      HMAC when update() is called after the value has been taken
    • issue #59: Styles do not apply formatter.gnuescaping.enabled, and checked() marks
      GNU file name escaping as user-set although it is not
    • issue #58: -o and -u truncate or create their target file before the "file already
      exists" check aborts the run
    • Parameters.checked() rejects a Parameters object on every call after the first if
      --path-relative-to-entry has been used (found by HashGarten, issue #14)
  • Improved performance

    • issue #82: significant performance improvement for the CRC brute forcer of
      -a unknown: by building the CRC table only twice per polynomial rather than 16
      times, by deriving the remaining init/refOut/xorOut combinations arithmetically, and by
      creating a checksum object only for a candidate that matches (approx. 4x faster); the
      reported algorithms are unchanged
  • Updated documentation

    • messages were inconsistent in capitalization, final punctuation, hyphenation and
      terminology, e.g. "the file x already exists", "Option -P requires / or ", "symlink
      to a dir", "HMAC id", "Default Charset", and contractions such as "won't be hashed"
    • several messages were not correct English: comma splices, a wrong comparison
      ("less or equal than"), missing articles, and wording such as "allow to enable" or
      "not even one valid entry"
    • some messages carried a duplicated prefix, shouted in capitals, or contained a typo,
      among them the GPL sentence that Jacksum prints without arguments: it said "(at your
      opinion)" instead of "(at your option)"
    • the help text for --gnu-filename-escaping now states that the option controls the
      writing of file names only, and that a check list resp. a wanted list is recognized as
      escaped by the backslash such a line starts with, no matter how the option is set
    • issue #68: The EXIT STATUS section is incomplete, has a typo, and refers to a file that
      no longer exists; one sentence about -q txt: is broken
    • the description of the sequence type "txt" of option -q was missing its predicate
      ("the default character set of the platform used to represent the ")
    • the help text for -L/--file-list now mentions that empty lines in the file list are
      always ignored, and it refers to the option -I for ignoring lines that start with a
      particular string; both are documented in help_en.txt and help_de.txt
    • added docs/USE_CASES.md and its German translation docs/USE_CASES_de.md, a task oriented
      cookbook: while docs/EXAMPLES.md is organized by feature ("what does this option do"),
      USE_CASES.md is organized by goal ("I want to solve this problem")