swig/swig-java-Avoid-using-deprecated-API-in-doxygen-example.patch
Jitka Plesnikova 13bd2333c5 Resolves: RHEL-32325
- 4.2.1 bump
- Fix gcc's -Wformat-security warning in R Raise function
- OCaml 5.2.0 ppc64le fix
- Add support for Python 3.13
2024-07-09 18:38:37 +02:00

30 lines
1.2 KiB
Diff

From 8a19cb77adfec168236e2c63d1a9d1a310f886cc Mon Sep 17 00:00:00 2001
From: Olly Betts <olly@survex.com>
Date: Fri, 1 Mar 2024 10:40:12 +1300
Subject: [PATCH] [java] Avoid using deprecated API in doxygen example
Passing a String command to Runtime.exec() has been deprecated since
Java 18.
---
Examples/java/doxygen/runme.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Examples/java/doxygen/runme.java b/Examples/java/doxygen/runme.java
index 6b7bb3d01..5970521c8 100644
--- a/Examples/java/doxygen/runme.java
+++ b/Examples/java/doxygen/runme.java
@@ -33,8 +33,8 @@ public class runme {
System.out.println(" perimeter = " + shapes[i].perimeter());
}
- String command = "javadoc -quiet -public -d javadocs example.java Shape.java Circle.java Square.java RectangleInt.java";
- System.out.println("\nRunning: " + command);
+ String[] command = {"javadoc", "-quiet", "-public", "-d", "javadocs", "example.java", "Shape.java", "Circle.java", "Square.java", "RectangleInt.java"};
+ System.out.println("\nRunning: " + String.join(" ", command));
Process p = Runtime.getRuntime().exec(command);
int exitCode = p.waitFor();
System.out.println("javadoc exited with code " + exitCode);
--
2.44.0