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

TrueLayer / truelayer-java / #101

13 Jan 2025 11:16AM UTC coverage: 89.888% (-0.7%) from 90.566%
#101

push

github

web-flow
[ACL-264] CI, dependencies, example project and changelog updates (#338)

480 of 534 relevant lines covered (89.89%)

0.9 hits per line

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

84.62
/src/main/java/com/truelayer/java/versioninfo/LibraryInfoLoader.java
1
package com.truelayer.java.versioninfo;
2

3
import com.truelayer.java.Constants;
4
import com.truelayer.java.TrueLayerException;
5
import java.io.IOException;
6
import java.util.Properties;
7

8
/**
9
 * Class the loads the version of the library during the client initialization.
10
 */
11
public class LibraryInfoLoader {
1✔
12
    private static final String CONFIG_FILE_PREXIF = "truelayer-java";
13

14
    public VersionInfo load() {
15
        Properties libraryVersionProps = getVersionInfoProperties();
1✔
16

17
        return VersionInfo.builder()
1✔
18
                .libraryName(libraryVersionProps.getProperty(Constants.VersionInfo.NAME))
1✔
19
                .libraryVersion(libraryVersionProps.getProperty(Constants.VersionInfo.VERSION))
1✔
20
                .build();
1✔
21
    }
22

23
    private Properties getVersionInfoProperties() {
24
        try {
25
            Properties versionInfoProps = new Properties();
1✔
26
            versionInfoProps.load(getClass()
1✔
27
                    .getClassLoader()
1✔
28
                    .getResourceAsStream(CONFIG_FILE_PREXIF + "." + "version" + ".properties"));
1✔
29
            return versionInfoProps;
1✔
30
        } catch (IOException e) {
×
31
            throw new TrueLayerException("Unable to load library version file", e);
×
32
        }
33
    }
34
}
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