Skip to content

Commit 577fa5e

Browse files
committed
fix: appease the cop
1 parent 3d2ff26 commit 577fa5e

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

instrumentation/net_ldap/lib/opentelemetry/instrumentation/net/ldap/attribute_mapper.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ def self.redact(_value)
1717
end
1818

1919
def self.map_json(json_string)
20-
begin
21-
parsed = JSON.parse(json_string)
22-
redacted = deep_map(parsed)
23-
JSON.generate(redacted)
24-
rescue JSON::ParserError
25-
json_string
26-
end
20+
parsed = JSON.parse(json_string)
21+
redacted = deep_map(parsed)
22+
JSON.generate(redacted)
23+
rescue JSON::ParserError
24+
json_string
2725
end
2826

2927
def self.map(attributes)

instrumentation/net_ldap/test/opentelemetry/instrumentation/net/ldap/instrumentation_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def modify(args)
126126
it 'tracks the attributes with correct name & redacts sensitive information' do
127127
ldap.connection = FakeConnection.new
128128
ops = [
129-
[:replace, :unicodePwd, ['P@ssw0rd']],
129+
[:replace, :unicodePwd, ['P@ssw0rd']]
130130
]
131131
assert ldap.modify(dn: 'CN=test,OU=test,DC=com', operations: ops)
132132

0 commit comments

Comments
 (0)