@@ -76,7 +76,7 @@ public static Map<String, SupportVariant> readSimple(Path path) {
76
76
var rootPath = getRootPathByParentConfigurations (path );
77
77
var supportMap = SUPPORT_SIMPLE_MAPS .get (rootPath );
78
78
if (supportMap == null && path .toFile ().exists ()) {
79
- readFile (path , rootPath );
79
+ readFile (path , rootPath , false );
80
80
supportMap = SUPPORT_SIMPLE_MAPS .get (rootPath );
81
81
}
82
82
@@ -97,7 +97,7 @@ public static Map<String, Map<SupportConfiguration, SupportVariant>> readFull(Pa
97
97
var rootPath = getRootPathByParentConfigurations (path );
98
98
var supportMap = SUPPORT_MAPS .get (rootPath );
99
99
if (supportMap == null && path .toFile ().exists ()) {
100
- readFile (path , rootPath );
100
+ readFile (path , rootPath , true );
101
101
supportMap = SUPPORT_MAPS .get (rootPath );
102
102
}
103
103
@@ -125,17 +125,19 @@ public static SupportVariant getSupportVariantByMDO(String uuid, Path path) {
125
125
return SupportVariant .NONE ;
126
126
}
127
127
128
- private void readFile (Path pathToBinFile , Path rootPath ) {
129
- LOGGER .debug ("Чтения файла поставки ParentConfigurations.bin" );
128
+ private void readFile (Path pathToBinFile , Path rootPath , boolean fullRead ) {
129
+ LOGGER .debug ("Чтения файла поставки ParentConfigurations.bin, полное чтение = " + fullRead );
130
130
131
131
try {
132
132
var supportMap = read (pathToBinFile );
133
- SUPPORT_MAPS .put (rootPath , supportMap );
134
-
135
- Map <String , SupportVariant > result = new HashMap <>();
136
- supportMap .forEach ((String uuid , Map <SupportConfiguration , SupportVariant > supportVariantMap )
137
- -> result .put (uuid , SupportVariant .max (supportVariantMap .values ())));
138
- SUPPORT_SIMPLE_MAPS .put (rootPath , result );
133
+ if (fullRead ) {
134
+ SUPPORT_MAPS .put (rootPath , supportMap );
135
+ } else {
136
+ Map <String , SupportVariant > result = new HashMap <>();
137
+ supportMap .forEach ((String uuid , Map <SupportConfiguration , SupportVariant > supportVariantMap )
138
+ -> result .put (uuid , SupportVariant .max (supportVariantMap .values ())));
139
+ SUPPORT_SIMPLE_MAPS .put (rootPath , result );
140
+ }
139
141
} catch (FileNotFoundException | NumberFormatException exception ) {
140
142
LOGGER .error (
141
143
String .format ("Ошибка чтения файла %s" , pathToBinFile .toFile ()));
0 commit comments