Measurements of the magnetic field dependence of the critical current I-c(B) of Josephson junctions, involving high temperature superconductors, often give evidence that the supercurrents are spatially non-uniform. However, flux trapping can complicate the interpretation of I-c(B) curves. A model has been developed for the behavior of SNS type junctions in a trilayer geometry containing trapped flux. We have investigated, using this model, combined with simulations, how the features of the I-c(B) curve change as the number of trapped fluxlines increases. For a uniform junction, flux-trapping distorts the I-c(B) curve and suppresses the maximum critical current by 1/root N-f where N-f is the number of fluxlines. The effect of trapped flux on current density correlation functions derived using the Wiener-Khinchine theorem from I-c(B) curves has also been investigated and is described. In addition we discuss the relevance of the model to planar geometries.