File tree 26 files changed +26
-26
lines changed
modules/openapi-generator/src/main/resources/JavaJaxRS
jersey2/src/gen/java/org/openapitools/api
jersey2-useTags/src/gen/java/org/openapitools/api
jaxrs-datelib-j8/src/gen/java/org/openapitools/api
jaxrs-jersey/src/gen/java/org/openapitools/api
26 files changed +26
-26
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public class {{classname}} {
47
47
String implClass = servletContext.getInitParameter(" {{classname}}.implementation" );
48
48
if (implClass != null && ! " " .equals(implClass.trim())) {
49
49
try {
50
- delegate = ({{classname} }Service) Class.forName(implClass).newInstance();
50
+ delegate = ({{classname} }Service) Class.forName(implClass).getDeclaredConstructor(). newInstance();
51
51
} catch (Exception e) {
52
52
throw new RuntimeException(e);
53
53
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public AnotherFakeApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("AnotherFakeApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (AnotherFakeApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (AnotherFakeApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public FakeApi(@Context ServletConfig servletContext) {
50
50
String implClass = servletContext .getInitParameter ("FakeApi.implementation" );
51
51
if (implClass != null && !"" .equals (implClass .trim ())) {
52
52
try {
53
- delegate = (FakeApiService ) Class .forName (implClass ).newInstance ();
53
+ delegate = (FakeApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
54
54
} catch (Exception e ) {
55
55
throw new RuntimeException (e );
56
56
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public FakeClassnameTestApi(@Context ServletConfig servletContext) {
40
40
String implClass = servletContext .getInitParameter ("FakeClassnameTestApi.implementation" );
41
41
if (implClass != null && !"" .equals (implClass .trim ())) {
42
42
try {
43
- delegate = (FakeClassnameTestApiService ) Class .forName (implClass ).newInstance ();
43
+ delegate = (FakeClassnameTestApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
44
44
} catch (Exception e ) {
45
45
throw new RuntimeException (e );
46
46
}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public PetApi(@Context ServletConfig servletContext) {
43
43
String implClass = servletContext .getInitParameter ("PetApi.implementation" );
44
44
if (implClass != null && !"" .equals (implClass .trim ())) {
45
45
try {
46
- delegate = (PetApiService ) Class .forName (implClass ).newInstance ();
46
+ delegate = (PetApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
47
47
} catch (Exception e ) {
48
48
throw new RuntimeException (e );
49
49
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public StoreApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("StoreApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (StoreApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (StoreApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public UserApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("UserApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (UserApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (UserApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public AnotherFakeApi(@Context ServletConfig servletContext) {
40
40
String implClass = servletContext .getInitParameter ("AnotherFakeApi.implementation" );
41
41
if (implClass != null && !"" .equals (implClass .trim ())) {
42
42
try {
43
- delegate = (AnotherFakeApiService ) Class .forName (implClass ).newInstance ();
43
+ delegate = (AnotherFakeApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
44
44
} catch (Exception e ) {
45
45
throw new RuntimeException (e );
46
46
}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ public FakeApi(@Context ServletConfig servletContext) {
55
55
String implClass = servletContext .getInitParameter ("FakeApi.implementation" );
56
56
if (implClass != null && !"" .equals (implClass .trim ())) {
57
57
try {
58
- delegate = (FakeApiService ) Class .forName (implClass ).newInstance ();
58
+ delegate = (FakeApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
59
59
} catch (Exception e ) {
60
60
throw new RuntimeException (e );
61
61
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public FakeClassnameTestApi(@Context ServletConfig servletContext) {
40
40
String implClass = servletContext .getInitParameter ("FakeClassnameTestApi.implementation" );
41
41
if (implClass != null && !"" .equals (implClass .trim ())) {
42
42
try {
43
- delegate = (FakeClassnameTestApiService ) Class .forName (implClass ).newInstance ();
43
+ delegate = (FakeClassnameTestApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
44
44
} catch (Exception e ) {
45
45
throw new RuntimeException (e );
46
46
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public FooApi(@Context ServletConfig servletContext) {
40
40
String implClass = servletContext .getInitParameter ("FooApi.implementation" );
41
41
if (implClass != null && !"" .equals (implClass .trim ())) {
42
42
try {
43
- delegate = (FooApiService ) Class .forName (implClass ).newInstance ();
43
+ delegate = (FooApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
44
44
} catch (Exception e ) {
45
45
throw new RuntimeException (e );
46
46
}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public PetApi(@Context ServletConfig servletContext) {
43
43
String implClass = servletContext .getInitParameter ("PetApi.implementation" );
44
44
if (implClass != null && !"" .equals (implClass .trim ())) {
45
45
try {
46
- delegate = (PetApiService ) Class .forName (implClass ).newInstance ();
46
+ delegate = (PetApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
47
47
} catch (Exception e ) {
48
48
throw new RuntimeException (e );
49
49
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public StoreApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("StoreApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (StoreApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (StoreApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public UserApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("UserApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (UserApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (UserApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public AnotherFakeApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("AnotherFakeApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (AnotherFakeApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (AnotherFakeApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public FakeApi(@Context ServletConfig servletContext) {
48
48
String implClass = servletContext .getInitParameter ("FakeApi.implementation" );
49
49
if (implClass != null && !"" .equals (implClass .trim ())) {
50
50
try {
51
- delegate = (FakeApiService ) Class .forName (implClass ).newInstance ();
51
+ delegate = (FakeApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
52
52
} catch (Exception e ) {
53
53
throw new RuntimeException (e );
54
54
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public FakeClassnameTags123Api(@Context ServletConfig servletContext) {
40
40
String implClass = servletContext .getInitParameter ("FakeClassnameTags123Api.implementation" );
41
41
if (implClass != null && !"" .equals (implClass .trim ())) {
42
42
try {
43
- delegate = (FakeClassnameTags123ApiService ) Class .forName (implClass ).newInstance ();
43
+ delegate = (FakeClassnameTags123ApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
44
44
} catch (Exception e ) {
45
45
throw new RuntimeException (e );
46
46
}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public PetApi(@Context ServletConfig servletContext) {
43
43
String implClass = servletContext .getInitParameter ("PetApi.implementation" );
44
44
if (implClass != null && !"" .equals (implClass .trim ())) {
45
45
try {
46
- delegate = (PetApiService ) Class .forName (implClass ).newInstance ();
46
+ delegate = (PetApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
47
47
} catch (Exception e ) {
48
48
throw new RuntimeException (e );
49
49
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public StoreApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("StoreApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (StoreApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (StoreApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public UserApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("UserApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (UserApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (UserApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public AnotherFakeApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("AnotherFakeApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (AnotherFakeApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (AnotherFakeApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public FakeApi(@Context ServletConfig servletContext) {
49
49
String implClass = servletContext .getInitParameter ("FakeApi.implementation" );
50
50
if (implClass != null && !"" .equals (implClass .trim ())) {
51
51
try {
52
- delegate = (FakeApiService ) Class .forName (implClass ).newInstance ();
52
+ delegate = (FakeApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
53
53
} catch (Exception e ) {
54
54
throw new RuntimeException (e );
55
55
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public FakeClassnameTestApi(@Context ServletConfig servletContext) {
40
40
String implClass = servletContext .getInitParameter ("FakeClassnameTestApi.implementation" );
41
41
if (implClass != null && !"" .equals (implClass .trim ())) {
42
42
try {
43
- delegate = (FakeClassnameTestApiService ) Class .forName (implClass ).newInstance ();
43
+ delegate = (FakeClassnameTestApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
44
44
} catch (Exception e ) {
45
45
throw new RuntimeException (e );
46
46
}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public PetApi(@Context ServletConfig servletContext) {
43
43
String implClass = servletContext .getInitParameter ("PetApi.implementation" );
44
44
if (implClass != null && !"" .equals (implClass .trim ())) {
45
45
try {
46
- delegate = (PetApiService ) Class .forName (implClass ).newInstance ();
46
+ delegate = (PetApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
47
47
} catch (Exception e ) {
48
48
throw new RuntimeException (e );
49
49
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public StoreApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("StoreApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (StoreApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (StoreApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public UserApi(@Context ServletConfig servletContext) {
41
41
String implClass = servletContext .getInitParameter ("UserApi.implementation" );
42
42
if (implClass != null && !"" .equals (implClass .trim ())) {
43
43
try {
44
- delegate = (UserApiService ) Class .forName (implClass ).newInstance ();
44
+ delegate = (UserApiService ) Class .forName (implClass ).getDeclaredConstructor (). newInstance ();
45
45
} catch (Exception e ) {
46
46
throw new RuntimeException (e );
47
47
}
You can’t perform that action at this time.
0 commit comments