From feab76d5dd9a72a058297567eaebad4a0ded1420 Mon Sep 17 00:00:00 2001 From: Gavriil Sitnikov Date: Fri, 12 May 2017 15:44:08 +0300 Subject: [PATCH] Pair bug fixed --- gradle/jsonModelsGeneration.gradle | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gradle/jsonModelsGeneration.gradle b/gradle/jsonModelsGeneration.gradle index bac0bcf..e808218 100644 --- a/gradle/jsonModelsGeneration.gradle +++ b/gradle/jsonModelsGeneration.gradle @@ -30,7 +30,6 @@ buildscript { } import com.squareup.javapoet.* -import javafx.util.Pair import org.yaml.snakeyaml.Yaml import javax.lang.model.element.Modifier @@ -62,6 +61,18 @@ class Types { } +class Pair { + + public final TKey key; + public final TValue value; + + public Pair(final TKey key, final TValue value) { + this.key = key + this.value = value + } + +} + /** * Abstract object of scheme for generation. Includes: * - models of objects (classes); @@ -429,7 +440,7 @@ class TypeNameUtils { if (!result.key.isEmpty()) { throw new Exception("Useless symbols '" + result.key + "'") } - return result.getValue() + return result.value } catch (final Exception exception) { throw new Exception("Error resolving type of '" + typeString + "' : " + exception.getMessage()) }