Skip to content

Commit d1df75c

Browse files
authored
[Java] Remove unnecessary String.format from jersey2, jersey3, native (#21870)
1 parent 20d5126 commit d1df75c

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/jersey2/anyof_model.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
9595

9696
{{/anyOf}}
9797
{{/composedSchemas}}
98-
throw new IOException(String.format("Failed deserialization for {{classname}}: no match found"));
98+
throw new IOException("Failed deserialization for {{classname}}: no match found");
9999
}
100100

101101
/**

modules/openapi-generator/src/main/resources/Java/libraries/jersey3/anyof_model.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
9595

9696
{{/anyOf}}
9797
{{/composedSchemas}}
98-
throw new IOException(String.format("Failed deserialization for {{classname}}: no match found"));
98+
throw new IOException("Failed deserialization for {{classname}}: no match found");
9999
}
100100

101101
/**

modules/openapi-generator/src/main/resources/Java/libraries/native/anyof_model.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
7979
}
8080

8181
{{/anyOf}}
82-
throw new IOException(String.format("Failed deserialization for {{classname}}: no match found"));
82+
throw new IOException("Failed deserialization for {{classname}}: no match found");
8383
}
8484

8585
/**

samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/GmFruit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public GmFruit deserialize(JsonParser jp, DeserializationContext ctxt) throws IO
113113
log.log(Level.FINER, "Input data does not match 'GmFruit'", e);
114114
}
115115

116-
throw new IOException(String.format("Failed deserialization for GmFruit: no match found"));
116+
throw new IOException("Failed deserialization for GmFruit: no match found");
117117
}
118118

119119
/**

samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/model/MammalAnyof.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public MammalAnyof deserialize(JsonParser jp, DeserializationContext ctxt) throw
141141
log.log(Level.FINER, "Input data does not match 'MammalAnyof'", e);
142142
}
143143

144-
throw new IOException(String.format("Failed deserialization for MammalAnyof: no match found"));
144+
throw new IOException("Failed deserialization for MammalAnyof: no match found");
145145
}
146146

147147
/**

samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/GmFruit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public GmFruit deserialize(JsonParser jp, DeserializationContext ctxt) throws IO
109109
log.log(Level.FINER, "Input data does not match 'GmFruit'", e);
110110
}
111111

112-
throw new IOException(String.format("Failed deserialization for GmFruit: no match found"));
112+
throw new IOException("Failed deserialization for GmFruit: no match found");
113113
}
114114

115115
/**

samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/GmFruit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public GmFruit deserialize(JsonParser jp, DeserializationContext ctxt) throws IO
111111
log.log(Level.FINER, "Input data does not match 'GmFruit'", e);
112112
}
113113

114-
throw new IOException(String.format("Failed deserialization for GmFruit: no match found"));
114+
throw new IOException("Failed deserialization for GmFruit: no match found");
115115
}
116116

117117
/**

samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/GmFruit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public GmFruit deserialize(JsonParser jp, DeserializationContext ctxt) throws IO
111111
log.log(Level.FINER, "Input data does not match 'GmFruit'", e);
112112
}
113113

114-
throw new IOException(String.format("Failed deserialization for GmFruit: no match found"));
114+
throw new IOException("Failed deserialization for GmFruit: no match found");
115115
}
116116

117117
/**

samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/MammalAnyof.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public MammalAnyof deserialize(JsonParser jp, DeserializationContext ctxt) throw
139139
log.log(Level.FINER, "Input data does not match 'MammalAnyof'", e);
140140
}
141141

142-
throw new IOException(String.format("Failed deserialization for MammalAnyof: no match found"));
142+
throw new IOException("Failed deserialization for MammalAnyof: no match found");
143143
}
144144

145145
/**

0 commit comments

Comments
 (0)