palantir / stash-codesearch-plugin

Provides global repository, commit, and file content search for Atlassian Stash instances
Apache License 2.0
62 stars 20 forks source link

Search links were returning decomposed URI. #3

Closed ultimav closed 9 years ago

ultimav commented 9 years ago

It seems like something changed with the URI toString behavior when concatenating to a string(java version, or maybe it was the applicationService.getBaseURL(). I Had to explicitly call URI.toAsciiString() now for baseUrl. Otherwise my a href would end up like a decomposed version of the URI plus the project/repo/commit that it already should be there

So i got this ----

a href="{absolute: true, authority: stash.domain.com, fragment: null, host: scm.principal.com, opaque: false, path: , port: -1, query: null, rawAuthority: stash.domain.com, rawFragment: null, rawPath: , rawQuery: null, rawSchemeSpecificPart: //stash.domain.com, rawUserInfo: null, scheme: https, schemeSpecificPart: //stash.domain.com, userInfo: null} /projects/REPO">

instead of ----

terabyte commented 9 years ago

@ultimav Thanks for this contribution! It looks pretty simple so I'm just going to accept it for now, and I'll test it before the next release.