Package com.betfair.cougar.core.api.transcription

Examples of com.betfair.cougar.core.api.transcription.EnumDerialisationException


                                    JsonNode paramValue = rpc.getParams().isArray() ? rpc.getParams().get(i) : rpc.getParams().get(paramDefs[i].getName());
                                    JavaType javaType = paramDefs[i].getJavaType();
                                    args[i] = mapper.convertValue(paramValue, javaType);
                                    // complex types are handled by the mapper, but for some reason, direct enums are not
                                    if (javaType.isEnumType() && args[i] != null && ((Enum)args[i]).name().equals("UNRECOGNIZED_VALUE")) {
                                        throw new IllegalArgumentException(new Exception(new EnumDerialisationException("UNRECOGNIZED_VALUE is not allowed as an input")));
                                    }
                                }
                                commands.add(new ExecutionCommand() {//2nd: index 0, 3rd: index 1, 4th: index 2
                                    @Override
                                    public void onResult(ExecutionResult executionResult) {
View Full Code Here

TOP

Related Classes of com.betfair.cougar.core.api.transcription.EnumDerialisationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.