diff --git a/src/main/java/org/nustaq/serialization/FSTObjectInput.java b/src/main/java/org/nustaq/serialization/FSTObjectInput.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/nustaq/serialization/FSTObjectInput.java
+++ b/src/main/java/org/nustaq/serialization/FSTObjectInput.java
@@ -17,10 +17,7 @@ package org.nustaq.serialization;
 
 import org.nustaq.serialization.util.FSTUtil;
 import java.io.*;
-import java.lang.reflect.Array;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.*;
 import java.util.*;
 
 /**
@@ -927,7 +924,8 @@ public class FSTObjectInput implements ObjectInput {
                         FSTObjectInput.this.pushBack(1);
                         for (int i = 0; i < constructors.length; i++) {
                             Constructor constructor = constructors[i];
-                            if (constructor.getParameterCount() == 1 && constructor.getParameterTypes()[0] == int.class) {
+                            TypeVariable[] typeParameters = constructor.getTypeParameters();
+                            if ( typeParameters != null && typeParameters.length == 1 && constructor.getParameterTypes()[0] == int.class) {
                                 constructor.setAccessible(true);
                                 OptionalDataException ode;
                                 try {
2cnd fix for #<I>, accidentally used <I> API, backported