In this sentence, is there an error?

In the name of revamping the law, investigation and trial should not be altered in a way which undermines the principles on which the judicial system was founded.

My book says that 'which' should be replaced by 'that. If yes, why is that?


Solution 1:

First of all you have 'which' used twice, so maybe your book is telling you that you need to replace one of them with 'that' so as to avoid repetition.

...investigation and trial should not be altered in a way that undermines the principles on which the judicial system was founded.

The second 'which' cannot be replaced by 'that', one cannot say 'the principles on that something was founded.

Other than the problem of repetition, I do not see why your original sentence should not be correct.