Skip to content

Commit e4eafa6

Browse files
committed
added silly tweaks to abstract kotlin generator class
1 parent b3abdf2 commit e4eafa6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/io/swagger/codegen/v3/generators/kotlin/AbstractKotlinCodegen.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public AbstractKotlinCodegen() {
3939
super();
4040
supportsInheritance = true;
4141

42-
languageSpecificPrimitives = new HashSet<String>(Arrays.asList(
42+
languageSpecificPrimitives = new HashSet<>(Arrays.asList(
4343
"kotlin.Any",
4444
"kotlin.Byte",
4545
"kotlin.Short",
@@ -58,7 +58,7 @@ public AbstractKotlinCodegen() {
5858

5959
// this includes hard reserved words defined by https://github.com/JetBrains/kotlin/blob/master/core/descriptors/src/org/jetbrains/kotlin/renderer/KeywordStringsGenerated.java
6060
// as well as keywords from https://kotlinlang.org/docs/reference/keyword-reference.html
61-
reservedWords = new HashSet<String>(Arrays.asList(
61+
reservedWords = new HashSet<>(Arrays.asList(
6262
"abstract",
6363
"actual",
6464
"annotation",
@@ -126,7 +126,7 @@ public AbstractKotlinCodegen() {
126126
"while"
127127
));
128128

129-
defaultIncludes = new HashSet<String>(Arrays.asList(
129+
defaultIncludes = new HashSet<>(Arrays.asList(
130130
"kotlin.Byte",
131131
"kotlin.Short",
132132
"kotlin.Int",
@@ -141,12 +141,12 @@ public AbstractKotlinCodegen() {
141141
"kotlin.collections.Map"
142142
));
143143

144-
instantiationLibraryFunction = new HashSet<String>(Arrays.asList(
144+
instantiationLibraryFunction = new HashSet<>(Arrays.asList(
145145
"arrayOf",
146146
"mapOf"
147147
));
148148

149-
typeMapping = new HashMap<String, String>();
149+
typeMapping = new HashMap<>();
150150
typeMapping.put("string", "kotlin.String");
151151
typeMapping.put("boolean", "kotlin.Boolean");
152152
typeMapping.put("integer", "kotlin.Int");
@@ -169,7 +169,7 @@ public AbstractKotlinCodegen() {
169169
instantiationTypes.put("list", "arrayOf");
170170
instantiationTypes.put("map", "mapOf");
171171

172-
importMapping = new HashMap<String, String>();
172+
importMapping = new HashMap<>();
173173
importMapping.put("BigDecimal", "java.math.BigDecimal");
174174
importMapping.put("UUID", "java.util.UUID");
175175
importMapping.put("File", "java.io.File");

0 commit comments

Comments
 (0)