Generic util method to convert in single map from list of array of Object generally result of JPQL/ hibernate
There is not much "generic" here, the code is as type safe as with raw types. Further, throws Exception usually isn't a good idea. Last but not least, method arguments should be written lower-case.

Here my attempt (off the top of my head, couldn't test it):

public static &lt;K,V&gt; Map&lt;K, V&gt; getMapFromObjectList(
       List&lt;? extends Object[]&gt; objects, 
       Class&lt;K&gt; keyClass, Class&lt;V&gt; valueClass, 
       int keyIndex, int valueIndex) 
    {
        if (object == null) {
          return Collections.EMPTY_MAP;
        }
        Map&lt;K, V&gt; map = new HashMap&lt;K,V&gt;(objects.size());
        for (Object[] array : objects) {
            if (Math.max(keyIndex, valueIndex) &gt; (array.length - 1)) {
                    throw new IndexOutOfBoundsException(keyIndex + " OR " + valueIndex + " out of bound for array");
            }
            if (array[keyIdex] != null) {
                map.put(keyClass.cast(array[keyIdex]), 
                        valueClass.cast(array[valueIndex]);
            }
        }
        return map;
    }


Of course this code will fail if the types are not the expected ones, but at least it will fail early, and it is already inherently "dangerous" code. On the other hand, it's reasonable to expect that Hibernate doesn't mess it up out of the blue, once the types are correct.

Note that HashMap supports null keys (although IMHO this design decision is questionable).