Search in sources :

Example 31 with FieldDefinition

use of com.hazelcast.nio.serialization.FieldDefinition in project hazelcast by hazelcast.

the class MorphingPortableReader method readCharArray.

@Override
public char[] readCharArray(String fieldName) throws IOException {
    FieldDefinition fd = cd.getField(fieldName);
    if (fd == null) {
        return null;
    }
    validateTypeCompatibility(fd, CHAR_ARRAY);
    return super.readCharArray(fieldName);
}
Also used : FieldDefinition(com.hazelcast.nio.serialization.FieldDefinition)

Example 32 with FieldDefinition

use of com.hazelcast.nio.serialization.FieldDefinition in project hazelcast by hazelcast.

the class MorphingPortableReader method readUTF.

@Override
public String readUTF(String fieldName) throws IOException {
    FieldDefinition fd = cd.getField(fieldName);
    if (fd == null) {
        return null;
    }
    validateTypeCompatibility(fd, UTF);
    return super.readUTF(fieldName);
}
Also used : FieldDefinition(com.hazelcast.nio.serialization.FieldDefinition)

Aggregations

FieldDefinition (com.hazelcast.nio.serialization.FieldDefinition)32 ParallelTest (com.hazelcast.test.annotation.ParallelTest)11 QuickTest (com.hazelcast.test.annotation.QuickTest)11 Test (org.junit.Test)11 ClassDefinition (com.hazelcast.nio.serialization.ClassDefinition)5 HazelcastSerializationException (com.hazelcast.nio.serialization.HazelcastSerializationException)2 PortableContext (com.hazelcast.internal.serialization.PortableContext)1 DefaultPortableReader (com.hazelcast.internal.serialization.impl.DefaultPortableReader)1 Data (com.hazelcast.nio.serialization.Data)1 Portable (com.hazelcast.nio.serialization.Portable)1 PortableReader (com.hazelcast.nio.serialization.PortableReader)1