• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

TrueLayer / truelayer-java / #102

14 Jan 2025 08:54AM UTC coverage: 89.662% (-0.2%) from 89.888%
#102

Pull #337

github

dili91
simplification
Pull Request #337: [ACL-263] Caching improvements

20 of 21 new or added lines in 5 files covered. (95.24%)

20 existing lines in 2 files now uncovered.

477 of 532 relevant lines covered (89.66%)

0.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/main/java/com/truelayer/java/http/auth/cache/CredentialsCacheHelper.java
1
package com.truelayer.java.http.auth.cache;
2

3
import com.truelayer.java.entities.RequestScopes;
4
import java.text.MessageFormat;
5
import java.util.ArrayList;
6
import java.util.Collections;
7
import java.util.List;
8

NEW
9
public class CredentialsCacheHelper {
×
10
    private static final String CACHE_KEY_PREFIX = "tl-auth-token";
11

12
    public static String buildKey(String clientId, RequestScopes requestScopes) {
13
        List<String> scopes = new ArrayList<>(requestScopes.getScopes());
1✔
14
        Collections.sort(scopes);
1✔
15
        return MessageFormat.format("{0}:{1}:{2}", CACHE_KEY_PREFIX, clientId, scopes.hashCode());
1✔
16
    }
17
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc