mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
Fix javaJaxRS template: remove deprecated in JDK9 method usage (#18728)
* Fix javaJaxRS template: remove deprecated in JDK9 method usage * Fix javaJaxRS api template: regenerate samples
This commit is contained in:
committed by
GitHub
parent
728abafdfa
commit
0daf9ffa5b
@@ -47,7 +47,7 @@ public class {{classname}} {
|
||||
String implClass = servletContext.getInitParameter("{{classname}}.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = ({{classname}}Service) Class.forName(implClass).newInstance();
|
||||
delegate = ({{classname}}Service) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class AnotherFakeApi {
|
||||
String implClass = servletContext.getInitParameter("AnotherFakeApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (AnotherFakeApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (AnotherFakeApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class FakeApi {
|
||||
String implClass = servletContext.getInitParameter("FakeApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class FakeClassnameTestApi {
|
||||
String implClass = servletContext.getInitParameter("FakeClassnameTestApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeClassnameTestApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeClassnameTestApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class PetApi {
|
||||
String implClass = servletContext.getInitParameter("PetApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (PetApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (PetApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class StoreApi {
|
||||
String implClass = servletContext.getInitParameter("StoreApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (StoreApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (StoreApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UserApi {
|
||||
String implClass = servletContext.getInitParameter("UserApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (UserApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (UserApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class AnotherFakeApi {
|
||||
String implClass = servletContext.getInitParameter("AnotherFakeApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (AnotherFakeApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (AnotherFakeApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class FakeApi {
|
||||
String implClass = servletContext.getInitParameter("FakeApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class FakeClassnameTestApi {
|
||||
String implClass = servletContext.getInitParameter("FakeClassnameTestApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeClassnameTestApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeClassnameTestApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class FooApi {
|
||||
String implClass = servletContext.getInitParameter("FooApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FooApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FooApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class PetApi {
|
||||
String implClass = servletContext.getInitParameter("PetApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (PetApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (PetApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class StoreApi {
|
||||
String implClass = servletContext.getInitParameter("StoreApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (StoreApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (StoreApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UserApi {
|
||||
String implClass = servletContext.getInitParameter("UserApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (UserApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (UserApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class AnotherFakeApi {
|
||||
String implClass = servletContext.getInitParameter("AnotherFakeApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (AnotherFakeApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (AnotherFakeApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class FakeApi {
|
||||
String implClass = servletContext.getInitParameter("FakeApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class FakeClassnameTags123Api {
|
||||
String implClass = servletContext.getInitParameter("FakeClassnameTags123Api.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeClassnameTags123ApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeClassnameTags123ApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class PetApi {
|
||||
String implClass = servletContext.getInitParameter("PetApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (PetApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (PetApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class StoreApi {
|
||||
String implClass = servletContext.getInitParameter("StoreApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (StoreApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (StoreApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UserApi {
|
||||
String implClass = servletContext.getInitParameter("UserApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (UserApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (UserApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class AnotherFakeApi {
|
||||
String implClass = servletContext.getInitParameter("AnotherFakeApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (AnotherFakeApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (AnotherFakeApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class FakeApi {
|
||||
String implClass = servletContext.getInitParameter("FakeApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class FakeClassnameTestApi {
|
||||
String implClass = servletContext.getInitParameter("FakeClassnameTestApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (FakeClassnameTestApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (FakeClassnameTestApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class PetApi {
|
||||
String implClass = servletContext.getInitParameter("PetApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (PetApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (PetApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class StoreApi {
|
||||
String implClass = servletContext.getInitParameter("StoreApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (StoreApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (StoreApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class UserApi {
|
||||
String implClass = servletContext.getInitParameter("UserApi.implementation");
|
||||
if (implClass != null && !"".equals(implClass.trim())) {
|
||||
try {
|
||||
delegate = (UserApiService) Class.forName(implClass).newInstance();
|
||||
delegate = (UserApiService) Class.forName(implClass).getDeclaredConstructor().newInstance();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user