Autoupdate should get the default white label from its jar filename. #6838
only:explicit error message
This commit is contained in:
parent
f25772dc7d
commit
38067cacc6
|
@ -50,11 +50,11 @@ public class ConnectionAndMeta {
|
||||||
String jarPath = jarUrl.getPath();
|
String jarPath = jarUrl.getPath();
|
||||||
String jarFileName = jarPath.substring(jarPath.lastIndexOf('/') + 1);
|
String jarFileName = jarPath.substring(jarPath.lastIndexOf('/') + 1);
|
||||||
int startOfSuffix = jarFileName.lastIndexOf('_');
|
int startOfSuffix = jarFileName.lastIndexOf('_');
|
||||||
if (startOfSuffix > 0) {
|
if (startOfSuffix == -1)
|
||||||
String jarFilePrefix = jarFileName.substring(0, startOfSuffix);
|
throw new IllegalStateException("Unexpected jar file name: " + jarFileName);
|
||||||
log.info("jarFilePrefix = " + jarFilePrefix);
|
String jarFilePrefix = jarFileName.substring(0, startOfSuffix);
|
||||||
return jarFilePrefix;
|
log.info("jarFilePrefix = " + jarFilePrefix);
|
||||||
}
|
return jarFilePrefix;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Unexpected " + e, e);
|
log.error("Unexpected " + e, e);
|
||||||
|
|
Loading…
Reference in New Issue