Merge pull request #11 from TouchInstinct/json_model_features

Pair bug fixed
This commit is contained in:
Gavriil 2017-05-12 15:44:55 +03:00 committed by GitHub
commit 33e5005de2
1 changed files with 13 additions and 2 deletions

View File

@ -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<TKey, TValue> {
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())
}