This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 55064171dd1 use older pattern to work with java 11 (#4723)
55064171dd1 is described below
commit 55064171dd109c12ed939d09580aec15a6990f75
Author: Eric Pugh <[email protected]>
AuthorDate: Mon Aug 10 16:41:45 2026 -0400
use older pattern to work with java 11 (#4723)
---
.../solr/client/solrj/io/stream/metrics/StdMetric.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/metrics/StdMetric.java
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/metrics/StdMetric.java
index 697e638406f..4d8bc5fe7c6 100644
---
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/metrics/StdMetric.java
+++
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/stream/metrics/StdMetric.java
@@ -77,14 +77,14 @@ public class StdMetric extends Metric {
public void update(Tuple tuple) {
Object o = tuple.get(columnName);
double val;
- if (o instanceof Double d) {
- val = d;
- } else if (o instanceof Float f) {
- val = f.doubleValue();
- } else if (o instanceof Integer i) {
- val = i.doubleValue();
- } else if (o instanceof Long l) {
- val = l.doubleValue();
+ if (o instanceof Double) {
+ val = (Double) o;
+ } else if (o instanceof Float) {
+ val = ((Float) o).doubleValue();
+ } else if (o instanceof Integer) {
+ val = ((Integer) o).doubleValue();
+ } else if (o instanceof Long) {
+ val = ((Long) o).doubleValue();
} else {
return;
}