From 46dd61fc5d558dfec93be4388bee0e23e96f7764 Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 20 May 2020 20:45:24 +0100 Subject: [PATCH] Add PATH constant to ProfileProvider Signed-off-by: Graham --- deob/src/main/java/dev/openrs2/deob/ProfileProvider.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deob/src/main/java/dev/openrs2/deob/ProfileProvider.kt b/deob/src/main/java/dev/openrs2/deob/ProfileProvider.kt index 094c99a7..52b116b2 100644 --- a/deob/src/main/java/dev/openrs2/deob/ProfileProvider.kt +++ b/deob/src/main/java/dev/openrs2/deob/ProfileProvider.kt @@ -8,8 +8,12 @@ import javax.inject.Provider class ProfileProvider @Inject constructor(private val mapper: ObjectMapper) : Provider { override fun get(): Profile { - return Files.newBufferedReader(Paths.get("share/deob/profile.yaml")).use { reader -> + return Files.newBufferedReader(PATH).use { reader -> mapper.readValue(reader, Profile::class.java) } } + + companion object { + private val PATH = Paths.get("share/deob/profile.yaml") + } }