Source:
private ChallangeRequest getChallangeRequest(final String redirectUri) { if (StringExtensions.IsNullOrBlank(redirectUri)) { throw new IllegalArgumentException("redirectUri"); } ChallangeRequest challange = new ChallangeRequest(); HashMap<String, String> parameters = StringExtensions.getUrlParameters(redirectUri); if (!parameters.containsKey(RequestField.Nonce.name())) { throw new IllegalArgumentException("Nonce"); } if (!parameters.containsKey(RequestField.CertAuthorities.name())) { throw new IllegalArgumentException("CertAuthorities"); } if (!parameters.containsKey(RequestField.Version.name())) { throw new IllegalArgumentException("Version"); } if (!parameters.containsKey(RequestField.SubmitUrl.name())) { throw new IllegalArgumentException("SubmitUrl"); } if (!parameters.containsKey(RequestField.Context.name())) { throw new IllegalArgumentException("Context"); } challange.mNonce = parameters.get(RequestField.Nonce.name()); String authorities = parameters.get(RequestField.CertAuthorities.name()); challange.mCertAuthorities = StringExtensions.getStringTokens(authorities, AuthenticationConstants.Broker.CHALLANGE_REQUEST_CERT_AUTH_DELIMETER); if (challange.mCertAuthorities == null || challange.mCertAuthorities.size() == 0) { throw new IllegalArgumentException("CertAuthorities"); } challange.mVersion = parameters.get(RequestField.Version.name()); challange.mSubmitUrl = parameters.get(RequestField.SubmitUrl.name()); challange.mContext = parameters.get(RequestField.Context.name()); return challange; }

Target:
private ChallangeRequest getChallangeRequest(final String redirectUri) { if (StringExtensions.IsNullOrBlank(redirectUri)) { throw new IllegalArgumentException("redirectUri"); } ChallangeRequest challange = new ChallangeRequest(); HashMap<String, String> parameters = StringExtensions.getUrlParameters(redirectUri); if (!parameters.containsKey(RequestField.Nonce.name())) { throw new AuthenticationException(ADALError.DEVICE_CERTIFICATE_REQUEST_INVALID, "Nonce"); } if (!parameters.containsKey(RequestField.CertAuthorities.name())) { throw new AuthenticationException(ADALError.DEVICE_CERTIFICATE_REQUEST_INVALID, "CertAuthorities"); } if (!parameters.containsKey(RequestField.Version.name())) { throw new AuthenticationException(ADALError.DEVICE_CERTIFICATE_REQUEST_INVALID, "Version"); } if (!parameters.containsKey(RequestField.SubmitUrl.name())) { throw new AuthenticationException(ADALError.DEVICE_CERTIFICATE_REQUEST_INVALID, "SubmitUrl"); } if (!parameters.containsKey(RequestField.Context.name())) { throw new AuthenticationException(ADALError.DEVICE_CERTIFICATE_REQUEST_INVALID, "Context"); } challange.mNonce = parameters.get(RequestField.Nonce.name()); String authorities = parameters.get(RequestField.CertAuthorities.name()); challange.mCertAuthorities = StringExtensions.getStringTokens(authorities, AuthenticationConstants.Broker.CHALLANGE_REQUEST_CERT_AUTH_DELIMETER); if (challange.mCertAuthorities == null || challange.mCertAuthorities.size() == 0) { throw new IllegalArgumentException("CertAuthorities"); } challange.mVersion = parameters.get(RequestField.Version.name()); challange.mSubmitUrl = parameters.get(RequestField.SubmitUrl.name()); challange.mContext = parameters.get(RequestField.Context.name()); return challange; }