Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Salesforce by (11.9k points)

I have written an Apex class in a Salesforce managed package which uses the managed version of the apex-lang library package:

global class MySorter implements al.Objectcomparator

I am considering eliminating the dependency on the managed package by distributing apex-lang with my package. Having installed the unmanaged version of apex-lang, I try changing my class:

global class MySorter implements Objectcomparator
Upon trying to save, I get an error:
Error: Compile Error: Required class relationships must be maintained: MySorter Implements al.ObjectComparator[Previously Managed] at line 1 column 8
Why would such a restriction be in place? Any ideas on getting around it?

1 Answer

0 votes
by (32.1k points)
A drawback which this has is that it stops you from changing your contract with code which is outside your package. Since you marked your code as global, there could be callers of this code from outside as well that actually relies on the implementation of al.ObjectComparator interface.
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94.1k users

Browse Categories