|
1 | 1 | /* |
2 | | - * Copyright (C) 2023-2024 DiffPlug |
| 2 | + * Copyright (C) 2023-2025 DiffPlug |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -27,13 +27,16 @@ class SnapshotFileLayoutJUnit5(settings: SelfieSettingsAPI, override val fs: FS) |
27 | 27 | internal val smuggledError = |
28 | 28 | AtomicReference<Throwable?>( |
29 | 29 | if (settings is SelfieSettingsSmuggleError) settings.error else null) |
30 | | - override val rootFolder = TypedPath.ofFolder(settings.rootFolder.absolutePath) |
31 | | - private val otherSourceRoots = settings.otherSourceRoots |
| 30 | + internal val settings = settings |
| 31 | + override val rootFolder: TypedPath by lazy { |
| 32 | + TypedPath.ofFolder(settings.rootFolder.absolutePath) |
| 33 | + } |
| 34 | + private val otherSourceRoots: List<java.io.File> by lazy { settings.otherSourceRoots } |
32 | 35 | override val allowMultipleEquivalentWritesToOneLocation = |
33 | 36 | settings.allowMultipleEquivalentWritesToOneLocation |
34 | 37 | override val javaDontUseTripleQuoteLiterals = settings.javaDontUseTripleQuoteLiterals |
35 | 38 | val snapshotFolderName = settings.snapshotFolderName |
36 | | - internal val unixNewlines = inferDefaultLineEndingIsUnix(rootFolder, fs) |
| 39 | + internal val unixNewlines: Boolean by lazy { inferDefaultLineEndingIsUnix(rootFolder, fs) } |
37 | 40 | val extension: String = ".ss" |
38 | 41 | private val cache = |
39 | 42 | SourcePathCache(this::computePathForCall, Runtime.getRuntime().availableProcessors() * 4) |
|
0 commit comments