[JavaClassName][easy] remove uneccesary whitespace strip

Summary:
As ngorogiannis pointed out, we never expect whitespaces in classname, so
stripping makes no sense here in best case, and hides a bug under rug in
worst case.

Reviewed By: jvillard

Differential Revision: D20417033

fbshipit-source-id: bc7449171
master
Mitya Lyubarskiy 5 years ago committed by Facebook GitHub Bot
parent a65176de22
commit 3ceb2efe9e

@ -55,7 +55,7 @@ let is_int s =
let strip_anonymous_suffixes_if_present classname =
let rec strip_recursively classname nesting_level =
match String.rsplit2 classname ~on:'$' with
| Some (outer, suffix) when is_int (String.strip suffix) ->
| Some (outer, suffix) when is_int suffix ->
(* Suffix is an integer - that was an anonymous class.
But it could be nested inside another anonymous class as well *)
strip_recursively outer (nesting_level + 1)

Loading…
Cancel
Save