Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix user-facing typos in Java code #28971

Merged
merged 1 commit into from May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -60,7 +60,7 @@
* The {@code properties} file can contain both roles and principals as keys, and a list of zero or more roles separated by comma
* as values. When the {@code {@link #map(String, Set)}} method is called, the implementation iterates through the set of roles
* that were extracted from the assertion and checks, for eache role, if a mapping exists. If the role maps to an empty role,
* it is discarded. If it maps to a set of one ore more different roles, then these roles are set in the result set. If no
* it is discarded. If it maps to a set of one or more different roles, then these roles are set in the result set. If no
* mapping is found for the role then it is included as is in the result set.
*
* Once the roles have been processed, the implementation checks if the principal extracted from the assertion contains an entry
Expand Down
Expand Up @@ -94,19 +94,19 @@ public interface IDP {
public interface SingleSignOnService {
/**
* Returns {@code true} if the requests to IdP need to be signed by SP key.
* @return see dscription
* @return see description
*/
boolean signRequest();
/**
* Returns {@code true} if the complete response message from IdP should
* be checked for valid signature.
* @return see dscription
* @return see description
*/
boolean validateResponseSignature();
/**
* Returns {@code true} if individual assertions in response from IdP should
* be checked for valid signature.
* @return see dscription
* @return see description
*/
boolean validateAssertionSignature();
Binding getRequestBinding();
Expand Down
Expand Up @@ -1012,7 +1012,7 @@ public static byte[] encodeBytesToBytes( byte[] source, int off, int len, int op
* anywhere along their length by specifying
* <var>srcOffset</var> and <var>destOffset</var>.
* This method does not check to make sure your arrays
* are large enough to accomodate <var>srcOffset</var> + 4 for
* are large enough to accommodate <var>srcOffset</var> + 4 for
* the <var>source</var> array or <var>destOffset</var> + 3 for
* the <var>destination</var> array.
* This method returns the actual number of bytes that
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/org/keycloak/common/util/Encode.java
Expand Up @@ -405,7 +405,7 @@ public static String encodeValue(String segment, String[] encoding)
}

/**
* Encode via <a href="http://ietf.org/rfc/rfc3986.txt">RFC 3986</a>. PCHAR is allowed allong with '/'
* Encode via <a href="http://ietf.org/rfc/rfc3986.txt">RFC 3986</a>. PCHAR is allowed along with '/'
* <p/>
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
Expand All @@ -431,7 +431,7 @@ public static String encodePathSaveEncodings(String segment)
}

/**
* Encode via <a href="http://ietf.org/rfc/rfc3986.txt">RFC 3986</a>. PCHAR is allowed allong with '/'
* Encode via <a href="http://ietf.org/rfc/rfc3986.txt">RFC 3986</a>. PCHAR is allowed along with '/'
* <p/>
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
Expand Down
Expand Up @@ -57,11 +57,11 @@ public static String formatPossibleIpv6Address(String address) {
}

/**
* <p>Convert IPv6 adress into RFC 5952 form.
* <p>Convert IPv6 address into RFC 5952 form.
* E.g. 2001:db8:0:1:0:0:0:1 -> 2001:db8:0:1::1</p>
*
* <p>Method is null safe, and if IPv4 address or host name is passed to the
* method it is returned wihout any processing.</p>
* method it is returned without any processing.</p>
*
* <p>Method also supports IPv4 in IPv6 (e.g. 0:0:0:0:0:ffff:192.0.2.1 ->
* ::ffff:192.0.2.1), and zone ID (e.g. fe80:0:0:0:f0f0:c0c0:1919:1234%4
Expand Down
Expand Up @@ -54,7 +54,7 @@ public final class StringPropertyReplacer
private static final Properties systemEnvProperties = new SystemEnvProperties();

/**
* Go through the input string and replace any occurance of ${p} with
* Go through the input string and replace any occurrence of ${p} with
* the System.getProperty(p) value. If there is no such property p defined,
* then the ${p} reference will remain unchanged.
*
Expand All @@ -78,7 +78,7 @@ public static String replaceProperties(final String string)
}

/**
* Go through the input string and replace any occurance of ${p} with
* Go through the input string and replace any occurrence of ${p} with
* the props.getProperty(p) value. If there is no such property p defined,
* then the ${p} reference will remain unchanged.
*
Expand Down
Expand Up @@ -705,12 +705,12 @@ public static boolean containsWildcards(Type[] types) {
}

/**
* Check the assignability of one type to another, taking into account the actual type arguements
* Check the assignability of one type to another, taking into account the actual type arguments
*
* @param rawType1 the raw type of the class to check
* @param actualTypeArguments1 the actual type arguements to check, or an empty array if not a parameterized type
* @param actualTypeArguments1 the actual type arguments to check, or an empty array if not a parameterized type
* @param rawType2 the raw type of the class to check
* @param actualTypeArguments2 the actual type arguements to check, or an empty array if not a parameterized type
* @param actualTypeArguments2 the actual type arguments to check, or an empty array if not a parameterized type
*
* @return
*/
Expand Down Expand Up @@ -1048,4 +1048,4 @@ public static Class<?> resolveListType(Field field, Object instance) throws Ille

return Object.class;
}
}
}
4 changes: 2 additions & 2 deletions core/src/main/java/org/keycloak/jose/jwk/JWKUtil.java
Expand Up @@ -23,7 +23,7 @@
public class JWKUtil {

/**
* Coverts {@code BigInteger} to 64-byte array removing the sign byte if
* Converts {@code BigInteger} to 64-byte array removing the sign byte if
* necessary.
*
* @param bigInt {@code BigInteger} to be converted
Expand All @@ -34,7 +34,7 @@ public static byte[] toIntegerBytes(final BigInteger bigInt) {
}

/**
* Coverts {@code BigInteger} to 64-byte array but maintaining the length
* Converts {@code BigInteger} to 64-byte array but maintaining the length
* to bitlen as specified in rfc7518 for certain fields (X and Y parameter
* for EC keys).
*
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/keycloak/sdjwt/SdJwt.java
Expand Up @@ -77,7 +77,7 @@ private List<DecoyClaim> createdDecoyClaims(DisclosureSpec disclosureSpec) {
/**
* Prepare to a nested payload to this SD-JWT.
* <p>
* droping the algo claim.
* dropping the algo claim.
*
* @param nestedSdJwt
* @return
Expand Down
Expand Up @@ -48,7 +48,7 @@
*
* Warning: in orther to produce the same disclosure strings and hashes like in
* the spect, i had to produce
* the same print. This is by no way reliable enougth to be used to test
* the same print. This is by no way reliable enough to be used to test
* conformity to the spec.
*
* @author <a href="mailto:francis.pouatcha@adorsys.com">Francis Pouatcha</a>
Expand Down
Expand Up @@ -953,7 +953,7 @@ public void close() {
*
* @param realm realm
* @param kerberosPrincipal kerberos principal of the authenticated user
* @return finded or newly created user
* @return found or newly created user
*/
protected UserModel findOrCreateAuthenticatedUser(RealmModel realm, KerberosPrincipal kerberosPrincipal) {
String kerberosPrincipalAttrName = kerberosConfig.getKerberosPrincipalAttribute();
Expand Down
Expand Up @@ -62,7 +62,7 @@ public class LDAPUtils {
private static final Logger log = Logger.getLogger(LDAPUtils.class);

/**
* Method to crate a user in the LDAP. The user will be created when all
* Method to create a user in the LDAP. The user will be created when all
* mandatory attributes specified by the mappers are set. The method
* onRegisterUserToLDAP is first called in each mapper to set any default or
* initial value.
Expand Down
Expand Up @@ -160,8 +160,8 @@ public R withMethodReturnThreadCount(int _threads) {
}

/**
* Set the endianess for the connection
* Default is based on system endianess.
* Set the endianness for the connection
* Default is based on system endianness.
*
* @param _endianess {@link Endian#BIG} or {@value Endian#LITTLE}
* @return this
Expand Down
Expand Up @@ -48,7 +48,7 @@
/**
* Handles a connection to DBus.
* <p>
* This is a Singleton class, only 1 connection to the SYSTEM or SESSION busses can be made. Repeated calls to
* This is a Singleton class, only 1 connection to the SYSTEM or SESSION buses can be made. Repeated calls to
* getConnection will return the same reference.
* </p>
* <p>
Expand Down Expand Up @@ -469,7 +469,7 @@ public DBusInterface getPeerRemoteObject(String _busname, String _objectpath) th
* Return a reference to a remote object. This method will always refer to the well known name (if given) rather
* than resolving it to a unique bus name. In particular this means that if a process providing the well known name
* disappears and is taken over by another process proxy objects gained by this method will make calls on the new
* proccess.
* process.
*
* This method will use bus introspection to determine the interfaces on a remote object and so <b>may block</b> and
* <b>may fail</b>. The resulting proxy object will, however, be castable to any interface it implements. It will
Expand Down Expand Up @@ -551,7 +551,7 @@ public <I extends DBusInterface> I getPeerRemoteObject(String _busname, String _
* Return a reference to a remote object. This method will always refer to the well known name (if given) rather
* than resolving it to a unique bus name. In particular this means that if a process providing the well known name
* disappears and is taken over by another process proxy objects gained by this method will make calls on the new
* proccess.
* process.
*
* @param <I>
* class extending {@link DBusInterface}
Expand All @@ -578,7 +578,7 @@ public <I extends DBusInterface> I getRemoteObject(String _busname, String _obje
* Return a reference to a remote object. This method will always refer to the well known name (if given) rather
* than resolving it to a unique bus name. In particular this means that if a process providing the well known name
* disappears and is taken over by another process proxy objects gained by this method will make calls on the new
* proccess.
* process.
*
* @param <I>
* class extending {@link DBusInterface}
Expand Down
Expand Up @@ -107,7 +107,7 @@ public interface DBus extends DBusInterface {
UInt32 GetConnectionUnixUser(String _connectionName);

/**
* Returns the proccess ID associated with a connection.
* Returns the process ID associated with a connection.
* @param _connectionName The name of the connection
* @return The PID of the connection.
*/
Expand Down
Expand Up @@ -74,7 +74,7 @@ public synchronized boolean hasReply() {
}

/**
* Block (if neccessary) for a reply.
* Block (if necessary) for a reply.
* @return The reply to this MethodCall, or null if a timeout happens.
* @param _timeout The length of time to block before timing out (ms).
*/
Expand All @@ -93,7 +93,7 @@ public synchronized Message getReply(long _timeout) {
}

/**
* Block (if neccessary) for a reply.
* Block (if necessary) for a reply.
* Default timeout is 20s, or can be configured with setDefaultTimeout()
* @return The reply to this MethodCall, or null if a timeout happens.
*/
Expand Down
Expand Up @@ -66,7 +66,7 @@ public static Element toElement(Node _node) {
}

/**
* Applys a xpathExpression to a xml-Document and return a {@link NodeList} with the results.
* Applies a xpathExpression to a xml-Document and return a {@link NodeList} with the results.
*
* @param _xpathExpression xpath expression
* @param _xmlDocumentOrNode document or node
Expand Down
2 changes: 1 addition & 1 deletion federation/sssd/src/main/java/org/jvnet/libpam/PAM.java
Expand Up @@ -47,7 +47,7 @@
* PAM authenticator.
* <p>
* <p>
* Instances are thread unsafe and non reentrant. An instace cannot be reused
* Instances are thread unsafe and non reentrant. An instance cannot be reused
* to authenticate multiple users.
* <p>
* <p>
Expand Down
Expand Up @@ -74,7 +74,7 @@ protected List getFieldOrder() {
class pam_response extends Structure {
/**
* This is really a string, but this field needs to be malloc-ed by the conversation
* method, and to be freed by the caler, so I bind it to {@link Pointer} here.
* method, and to be freed by the caller, so I bind it to {@link Pointer} here.
* <p>
* The man page doesn't say that, but see
* http://www.netbsd.org/docs/guide/en/chap-pam.html#pam-sample-conv
Expand Down
Expand Up @@ -181,7 +181,7 @@ List<UserRepresentation> search(@QueryParam("username") String username,
*
* @param search the value to search. It can be the username, email or any of the supported options to query based on user attributes
* @param firstResult the position of the first result to retrieve
* @param maxResults the maximum number of results to retreive
* @param maxResults the maximum number of results to retrieve
* @return a list of {@link UserRepresentation}
*/
@GET
Expand All @@ -200,7 +200,7 @@ List<UserRepresentation> search(@QueryParam("search") String search,
*
* @param search the value to search. It can be the username, email or any of the supported options to query based on user attributes
* @param firstResult the position of the first result to retrieve
* @param maxResults the maximum number of results to retreive
* @param maxResults the maximum number of results to retrieve
* @param briefRepresentation Only return basic information (only guaranteed to return id, username, created, first and last name,
* email, enabled state, email verification state, federation link, and access.
* Note that it means that namely user attributes, required actions, and not before are not returned.)
Expand Down
Expand Up @@ -64,7 +64,7 @@
* ClientList caches:
* - lists of clients are cached in a specific cache entry i.e. realm clients, find client by clientId
* - realm client lists need to be invalidated and evited whenever a client is added or removed from a realm. RealmProvider
* now has addClient/removeClient at its top level. All adapaters should use these methods so that the appropriate invalidations
* now has addClient/removeClient at its top level. All adapters should use these methods so that the appropriate invalidations
* can be registered.
* - whenever a client is added/removed the realm of the client is added to a listInvalidations set
* this set must be checked before sending back or caching a cached query. This check is required to
Expand All @@ -83,7 +83,7 @@
* DBs with Repeatable Read:
* - DBs like MySQL are Repeatable Read by default. So, if you query a Client for instance, it will always return the same result in the same transaction even if the DB
* was updated in between these queries. This makes it possible to store stale cache entries. To avoid this problem, this class stores the current local version counter
* at the beginningof the transaction. Whenever an entry is added to the cache, the current coutner is compared against the counter at the beginning of the tx. If the current
* at the beginning of the transaction. Whenever an entry is added to the cache, the current counter is compared against the counter at the beginning of the tx. If the current
* is greater, then don't cache.
*
* Groups and Roles:
Expand Down
Expand Up @@ -30,7 +30,7 @@ public AbstractExtendableRevisioned(Long revision, String id) {
}

/**
* Cache things along with this cachable object
* Cache things along with this cacheable object
*
* @return
*/
Expand Down
Expand Up @@ -234,7 +234,7 @@ public void setEnabled(boolean enabled) {
}

/**
* This method should not be overriden
* This method should not be overridden
*
* @return
*/
Expand All @@ -244,7 +244,7 @@ public String getFederationLink() {
}

/**
* This method should not be overriden
* This method should not be overridden
*
* @return
*/
Expand All @@ -255,7 +255,7 @@ public void setFederationLink(String link) {
}

/**
* This method should not be overriden
* This method should not be overridden
*
* @return
*/
Expand All @@ -265,7 +265,7 @@ public String getServiceAccountClientLink() {
}

/**
* This method should not be overriden
* This method should not be overridden
*
* @return
*/
Expand Down
Expand Up @@ -241,7 +241,7 @@ public void setEnabled(boolean enabled) {
}

/**
* This method should not be overriden
* This method should not be overridden
*
* @return
*/
Expand All @@ -251,7 +251,7 @@ public String getFederationLink() {
}

/**
* This method should not be overriden
* This method should not be overridden
*
* @return
*/
Expand All @@ -261,7 +261,7 @@ public void setFederationLink(String link) {
}

/**
* This method should not be overriden
* This method should not be overridden
*
* @return
*/
Expand All @@ -271,7 +271,7 @@ public String getServiceAccountClientLink() {
}

/**
* This method should not be overriden
* This method should not be overridden
*
* @return
*/
Expand Down
Expand Up @@ -26,7 +26,7 @@
import java.util.stream.Collectors;

/**
* Key locator for a bunch of keys. It can be initializaed with or without
* Key locator for a bunch of keys. It can be initialized with or without
* key names.
*
* @author <a href="mailto:hmlnarik@redhat.com">Hynek Mlnařík</a>
Expand Down