uschindler commented on code in PR #978: URL: https://github.com/apache/lucene/pull/978#discussion_r908210561
########## lucene/core/src/java/org/apache/lucene/index/IndexWriter.java: ########## @@ -4775,14 +4775,14 @@ private static void setDiagnostics(SegmentInfo info, String source, Map<String, diagnostics.put("os", Constants.OS_NAME); diagnostics.put("os.arch", Constants.OS_ARCH); diagnostics.put("os.version", Constants.OS_VERSION); - diagnostics.put("java.version", Constants.JAVA_VERSION); + final var jv = Runtime.version().toString(); + diagnostics.put("java.version", jv); diagnostics.put("java.vendor", Constants.JAVA_VENDOR); - // On IBM J9 JVM this is better than java.version which is just 1.7.0 (no update level): - diagnostics.put( - "java.runtime.version", System.getProperty("java.runtime.version", "undefined")); - // Hotspot version, e.g. 2.8 for J9: - diagnostics.put("java.vm.version", System.getProperty("java.vm.version", "undefined")); - diagnostics.put("timestamp", Long.toString(new Date().getTime())); + diagnostics.put("timestamp", Long.toString(Instant.now().toEpochMilli())); + // TODO: Can we remove those duplicates? Review Comment: Maybe we just name this disagnostic property "java.runtime.version" (because that is what it is) and remove the other ones ("java.version", "java.vm.version"). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org