Skip to content

Commit

Permalink
7480: Trim method descriptor value
Browse files Browse the repository at this point in the history
Reviewed-by: hirt
  • Loading branch information
gunnarmorling authored and thegreystone committed Dec 21, 2021
1 parent a8b3614 commit 1c6ccc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ private static Method parseMethod(
if ("name".equals(key)) { //$NON-NLS-1$
name = value;
} else if ("descriptor".equals(key)) { //$NON-NLS-1$
descriptor = value;
descriptor = value != null ? value.trim() : null;
}
}
} else if (streamReader.isEndElement()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import java.io.IOException;
Expand Down Expand Up @@ -127,7 +126,7 @@ public void testModifyInvalidXml() throws XMLStreamException, IOException, XMLVa
final String invalidSnippet = XML_EVENT_DESCRIPTION;
boolean exceptionThrown = false;
try {
Set<String> modifiedClassNames = registry.modify(invalidSnippet);
registry.modify(invalidSnippet);
} catch (Exception e) {
e.printStackTrace(System.err);
exceptionThrown = true;
Expand Down

0 comments on commit 1c6ccc9

Please sign in to comment.