[Rev 09] RFR: 6677: Search to highlight cells in the flame view

Alex Macdonald aptmac at openjdk.java.net
Mon Feb 10 21:03:47 UTC 2020


On Mon, 10 Feb 2020 21:03:45 GMT, Miroslav Wengner <mwengner at openjdk.org> wrote:

>> ticket: https://bugs.openjdk.java.net/browse/JMC-6677
> 
> The pull request has been updated with 1 additional commit.

application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 138:

> 137: 	const resultText = map.call(text.trim().toLowerCase(), element => {
> 138: 		if(specialCharactersMap.has(element)){
> 139: 			return specialCharactersMap.get(element);

formatting: no space before `{`

application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 141:

> 140: 		} else {
> 141: 			return element;}
> 142: 		}).join('');

formatting: `}` is on the wrong line

application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 142:

> 141: 			return element;}
> 142: 		}).join('');
> 143: 	return resultText;

formatting: I think this line is tabbed one too far

application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 138:

> 137: 	const resultText = map.call(text.trim().toLowerCase(), element => {
> 138: 		if(specialCharactersMap.has(element)){
> 139: 			return specialCharactersMap.get(element);

formatting: no space after `if`

application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 136:

> 135: const removeSpecialCharacters = function(text) {
> 136: 	const map = Array.prototype.map;
> 137: 	const resultText = map.call(text.trim().toLowerCase(), element => {

if the map isn't used again, why not have the next line be:
`const resultText = Array.prototype.map.call[..]` ?

-------------

PR: https://git.openjdk.java.net/jmc/pull/45


More information about the jmc-dev mailing list