core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/FifoCache.java [42:99]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (maxSize < 1) {
            throw new IllegalArgumentException("maxSize " + maxSize
                                               + " must be at least 1");
        }
        map = new BoundedLinkedHashMap<>(maxSize);
        ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
        rlock = lock.readLock();
        wlock = lock.writeLock();
    }

    /**
     * Adds an entry to the cache, evicting the earliest entry if necessary.
     */
    public T add(String key, T value) {
        wlock.lock();
        try {
            return map.put(key, value);
        } finally {
            wlock.unlock();
        }
    }

    /** Returns the value of the given key; or null of no such entry exists. */
    public T get(String key) {
        rlock.lock();
        try {
            return map.get(key);
        } finally {
            rlock.unlock();
        }
    }

    /**
     * Returns the current size of the cache.
     */
    public int size() {
        rlock.lock();
        try {
            return map.size();
        } finally {
            rlock.unlock();
        }
    }

    /**
     * Returns the maximum size of the cache.
     */
    public int getMaxSize() {
        return map.getMaxSize();
    }

    @Override
    public String toString() {
        rlock.lock();
        try {
            return map.toString();
        } finally {
            rlock.unlock();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



core/http-auth-aws/src/main/java/software/amazon/awssdk/http/auth/aws/internal/signer/util/FifoCache.java [40:99]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        if (maxSize < 1) {
            throw new IllegalArgumentException("maxSize " + maxSize
                                               + " must be at least 1");
        }
        map = new BoundedLinkedHashMap<>(maxSize);
        ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
        rlock = lock.readLock();
        wlock = lock.writeLock();
    }

    /**
     * Adds an entry to the cache, evicting the earliest entry if necessary.
     */
    public T add(String key, T value) {
        wlock.lock();
        try {
            return map.put(key, value);
        } finally {
            wlock.unlock();
        }
    }

    /**
     * Returns the value of the given key; or null of no such entry exists.
     */
    public T get(String key) {
        rlock.lock();
        try {
            return map.get(key);
        } finally {
            rlock.unlock();
        }
    }

    /**
     * Returns the current size of the cache.
     */
    public int size() {
        rlock.lock();
        try {
            return map.size();
        } finally {
            rlock.unlock();
        }
    }

    /**
     * Returns the maximum size of the cache.
     */
    public int getMaxSize() {
        return map.getMaxSize();
    }

    @Override
    public String toString() {
        rlock.lock();
        try {
            return map.toString();
        } finally {
            rlock.unlock();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



