Why compareTo throws NPE using a comparator who doesn’t do that when user separatedly

I created a comparator that never throws NPE. However, when using it inside compareTo, it throws NPE. Why? public class Person implements Comparable { public static final Comparator&…

How to check if user defined entry in vector in java?

I have a vector of entries. Each entry is an instance of this class: public class Entry implements Comparable{ private String _key; private CustomSet _value; […] @…