You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/07/01 13:51:30 UTC

[GitHub] [lucene] uschindler commented on a diff in pull request #978: Remove/deprecate obsolete constants in oal.util.Constants; remove code which is no longer executed after Java 9

uschindler commented on code in PR #978:
URL: https://github.com/apache/lucene/pull/978#discussion_r911982756


##########
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:
   I removed the obsolete information from the diagnostics data



-- 
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-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org