Autoupdate should get the default white label from its jar filename. #6838

only:explicit error message
This commit is contained in:
Andrey 2024-09-18 11:38:24 -04:00
parent f25772dc7d
commit 38067cacc6
1 changed files with 5 additions and 5 deletions

View File

@ -50,11 +50,11 @@ public class ConnectionAndMeta {
String jarPath = jarUrl.getPath();
String jarFileName = jarPath.substring(jarPath.lastIndexOf('/') + 1);
int startOfSuffix = jarFileName.lastIndexOf('_');
if (startOfSuffix > 0) {
String jarFilePrefix = jarFileName.substring(0, startOfSuffix);
log.info("jarFilePrefix = " + jarFilePrefix);
return jarFilePrefix;
}
if (startOfSuffix == -1)
throw new IllegalStateException("Unexpected jar file name: " + jarFileName);
String jarFilePrefix = jarFileName.substring(0, startOfSuffix);
log.info("jarFilePrefix = " + jarFilePrefix);
return jarFilePrefix;
}
} catch (Exception e) {
log.error("Unexpected " + e, e);