@amcp thanks for finding all of these issues via Fortify!
The links you have with line numbers in all of these issues are very handy as direct pointers to the issues; however, if any of those files are modified, the line number may become invalid, because master is a moving target. Thus, by the time someone comes around to fix this issue, they may not be able to find which code this is/was referring to.
A way to address files in a way that will not change in the future is by using the latest git hash for the file in place of master in the URL spec, e.g.,
master in the link and add the line specification as followsNow you have a stable pointer to a file that will not change in the future, since we only move master forward and don't delete old commits.
If you want to do this globally / programmatically, the way to do it is to find the globally-latest commit to master for the repo, and just search-and-replace master with that hash in your links.
@mbrukman I will fix the links as you describe!
It's used to convert from char[] to String without copying the underlying array. It doesn't look like there's an alternative "no-copy" solution. We could remove it and force use of a "copy" implementation (e.g. new String(char[])). Not sure how significant and/or widespread the performance implications would be (if at all).
@sjudeng lets try and copy.
How widespread are the usages? If it's something used widely (such as when moving all data in/out of storage backend) it might be worthwhile to include some kind of performance assessment as part of the the proposed update.
Most helpful comment
@amcp thanks for finding all of these issues via Fortify!
The links you have with line numbers in all of these issues are very handy as direct pointers to the issues; however, if any of those files are modified, the line number may become invalid, because
masteris a moving target. Thus, by the time someone comes around to fix this issue, they may not be able to find which code this is/was referring to.A way to address files in a way that will not change in the future is by using the latest git hash for the file in place of
masterin the URL spec, e.g.,masterin the link and add the line specification as followsNow you have a stable pointer to a file that will not change in the future, since we only move
masterforward and don't delete old commits.If you want to do this globally / programmatically, the way to do it is to find the globally-latest commit to
masterfor the repo, and just search-and-replacemasterwith that hash in your links.