CPD Results

The following document contains the results of PMD's CPD 5.5.1.

Duplications

File Line
net\sf\michaelo\tomcat\realm\ActiveDirectoryRealm.java 225
net\sf\michaelo\tomcat\realm\GSSUserDatabaseRealm.java 50
		return getPrincipal(gssName, gssCredential);
	}

	@Override
	public Principal authenticate(GSSContext gssContext, boolean storeCreds) {
		if (gssContext.isEstablished()) {
			GSSName gssName = null;
			try {
				gssName = gssContext.getSrcName();
			} catch (GSSException e) {
				logger.error(sm.getString("activeDirectoryRealm.gssNameFailed"), e);
			}

			if (gssName != null) {
				GSSCredential gssCredential = null;
				if (storeCreds) {
					if (gssContext.getCredDelegState()) {
						try {
							gssCredential = gssContext.getDelegCred();
						} catch (GSSException e) {
							logger.warn(sm.getString(
									"activeDirectoryRealm.delegatedCredentialFailed", gssName), e);
						}
					} else {
						if (logger.isDebugEnabled())
							logger.debug(sm.getString("activeDirectoryRealm.credentialNotDelegable",
									gssName));
					}
				}

				return getPrincipal(gssName, gssCredential);