Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions java/bazel/rules/java_stub_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down