Pair bug fixed

This commit is contained in:
Gavriil Sitnikov 2017-05-12 15:44:08 +03:00
parent a48ea057f7
commit feab76d5dd
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())
}