diff --git a/java/bazel/rules/java_stub_template.txt b/java/bazel/rules/java_stub_template.txt index 115b46e6..8dddd4a3 100644 --- a/java/bazel/rules/java_stub_template.txt +++ b/java/bazel/rules/java_stub_template.txt @@ -315,14 +315,14 @@ function create_classpath_jar() { for path in ${CLASSPATH}; do # Loop through the characters of the path and convert characters that are # not alphanumeric nor -_.~/ to their 2-digit hexadecimal representation - if [[ ! $path =~ ^[-_.~/a-zA-Z0-9]*$ ]]; then + if [[ ! $path =~ ^[-_.~/a-zA-Z0-9+]*$ ]]; then local i c buff local converted_path="" for ((i=0; i<${#path}; i++)); do c=${path:$i:1} case ${c} in - [-_.~/a-zA-Z0-9] ) buff=${c} ;; + [-_.~/a-zA-Z0-9+] ) buff=${c} ;; * ) printf -v buff '%%%02x' "'$c'" esac converted_path+="${buff}"