dragome/dragome-sdk

Compare Object.class bug

Opened this issue · 0 comments

There a bug in comparing class. (Object.class)

		Class nextClass = type;
		while (nextClass != Object.class) {
			classHierarchy.add(nextClass);
			nextClass = nextClass.getSuperclass();
			System.out.println("nextClass: " + nextClass);
		}

Output:
type: class com.badlogic.gdx.math.Vector3
helpers.js:148 nextClass: class java.lang.Object
helpers.js:148 nextClass: null

image

com.badlogic.gdx.math.Vector3 have been created using libgdx Json class which its by reflection.

Printing each super class you can see that it prints "java.lang.Object" but the compare with Object.class failed.