boolean (@Nullable ProcessorConfigProfile profile1, @Nullable ProcessorConfigProfile profile2) { if (profile1 == null || profile2 == null) return false; ProcessorConfigProfileImpl p1 = new ProcessorConfigProfileImpl(profile1); p1.setName("tmp"); p1.setEnabled(true); p1.clearModuleNames(); ProcessorConfigProfileImpl p2 = new ProcessorConfigProfileImpl(profile2); p2.setName("tmp"); p2.setEnabled(true); p2.clearModuleNames(); return p1.equals(p2); }