diff --git a/httpdlog/httpdlog-parser/src/main/java/nl/basjes/parse/httpdlog/dissectors/ModUniqueIdDissector.java b/httpdlog/httpdlog-parser/src/main/java/nl/basjes/parse/httpdlog/dissectors/ModUniqueIdDissector.java index fe926c3c..0345059a 100644 --- a/httpdlog/httpdlog-parser/src/main/java/nl/basjes/parse/httpdlog/dissectors/ModUniqueIdDissector.java +++ b/httpdlog/httpdlog-parser/src/main/java/nl/basjes/parse/httpdlog/dissectors/ModUniqueIdDissector.java @@ -34,7 +34,7 @@ /** * The documentation of mod_unique_id clearly states: - * http://httpd.apache.org/docs/current/mod/mod_unique_id.html + * https://httpd.apache.org/docs/current/mod/mod_unique_id.html * ... it should be emphasized that applications should not dissect the encoding. ... * Applications should treat the entire encoded UNIQUE_ID as an opaque token, * which can be compared against other UNIQUE_IDs for equality only. @@ -110,30 +110,30 @@ public void dissect(final Parsable parsable, final String inputname) throws D return; // Nothing to do here } - UniqueIdRec record = decode(fieldValue); - if (record == null) { + UniqueIdRec uniqueIdRec = decode(fieldValue); + if (uniqueIdRec == null) { return; } if (wantTime) { - parsable.addDissection(inputname, "TIME.EPOCH", "epoch", record.timestamp); + parsable.addDissection(inputname, "TIME.EPOCH", "epoch", uniqueIdRec.timestamp); } if (wantIp) { - parsable.addDissection(inputname, "IP", "ip", record.ipaddrStr); + parsable.addDissection(inputname, "IP", "ip", uniqueIdRec.ipaddrStr); } if (wantProcessId) { - parsable.addDissection(inputname, "PROCESSID", "processid", record.pid); + parsable.addDissection(inputname, "PROCESSID", "processid", uniqueIdRec.pid); } if (wantCounter) { - parsable.addDissection(inputname, "COUNTER", "counter", record.counter); + parsable.addDissection(inputname, "COUNTER", "counter", uniqueIdRec.counter); } if (wantThreadIndex) { - parsable.addDissection(inputname, "THREAD_INDEX", "threadindex", record.threadIndex); + parsable.addDissection(inputname, "THREAD_INDEX", "threadindex", uniqueIdRec.threadIndex); } } // -------------------------------------------- - private static class UniqueIdRec { + private static final class UniqueIdRec { long timestamp; long ipaddr; String ipaddrStr; diff --git a/httpdlog/httpdlog-parser/src/test/java/nl/basjes/parse/httpdlog/CookiesTest.java b/httpdlog/httpdlog-parser/src/test/java/nl/basjes/parse/httpdlog/CookiesTest.java index ca47752e..67e5ecf2 100644 --- a/httpdlog/httpdlog-parser/src/test/java/nl/basjes/parse/httpdlog/CookiesTest.java +++ b/httpdlog/httpdlog-parser/src/test/java/nl/basjes/parse/httpdlog/CookiesTest.java @@ -30,7 +30,7 @@ class CookiesTest { - private static class EmptyTestRecord { + private static final class EmptyTestRecord { } public static class TestRecord {