File tree Expand file tree Collapse file tree
main/java/com/bugsnag/util
test/java/com/bugsnag/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,12 +74,23 @@ public Set<String> keySet() {
7474
7575 @ Override
7676 public Collection <Object > values () {
77- return map .values ();
77+ Collection <Object > objects = new ArrayList <Object >();
78+
79+ for (Entry <String , Object > entry : entrySet ()) {
80+ objects .add (entry .getValue ());
81+ }
82+ return objects ;
7883 }
7984
8085 @ Override
8186 public Set <Entry <String , Object >> entrySet () {
82- return map .entrySet ();
87+ Set <Entry <String , Object >> entries = map .entrySet ();
88+
89+ for (Entry <String , Object > entry : entries ) {
90+ String key = entry .getKey ();
91+ entry .setValue (transformEntry (key , entry .getValue ()));
92+ }
93+ return entries ;
8394 }
8495
8596 private Object transformEntry (Object key , Object value ) {
Original file line number Diff line number Diff line change @@ -111,9 +111,8 @@ public void testValues() throws Exception {
111111 assertEquals (3 , values .size ());
112112 assertTrue (values .contains (VAL_UNFILTERED ));
113113 assertTrue (values .contains (PLACEHOLDER_FILTERED ));
114- assertTrue (values .contains (KEY_NESTED ));
115114
116- values .remove (VAL_FILTERED );
115+ values .remove (PLACEHOLDER_FILTERED );
117116 values .remove (VAL_UNFILTERED );
118117
119118 Object nestedObj = values .toArray (new Object [1 ])[0 ];
You can’t perform that action at this time.
0 commit comments