beanshell / beanshell

Beanshell scripting language
Apache License 2.0
815 stars 183 forks source link

[bsh-v3 Start Failed]version.properties file name is duplicated with existing component #736

Open uni-beta opened 1 year ago

uni-beta commented 1 year ago

in bsh.Interpreter.java

Meeting error like below and start failed, while try to get beanshell version from version.properties "Can't find resource for bundle java.util.PropertyResourceBundle, key release"

The reason is pre-defined version.properties name is duplicated with existing component. get 'release' and 'build' failed. ResourceBundle b = ResourceBundle.getBundle("version"); VERSION = b.getString("release") + "." + b.getString("build");

Maybe need fix this issue in master branch. The quick solution is renaming 'version.properties' to 'bsh-version.properties'

change code like below: ResourceBundle b = ResourceBundle.getBundle("bsh-version");

nickl- commented 1 year ago

Sounds fair enough, do you mind rolling a PR?

Note: it will need to be changed in the pom file too

https://github.com/beanshell/beanshell/blob/47cbe833b7709fe0c5b6c67ee51b731746a7bfe5/pom.xml#L154-L165