+
Skip to content

Conversation

tim-hoffman
Copy link
Member

No description provided.

*/
private Map<Unit, Collection<ExceptionDest>> addDestToMap(Map<Unit, Collection<ExceptionDest>> map, Unit u, Trap t,
ThrowableSet caught) {
protected Map<Unit, Collection<ExceptionDest>> addDestToMap(Map<Unit, Collection<ExceptionDest>> map, Unit u,
Copy link
Member Author

@tim-hoffman tim-hoffman Jun 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it protected to allow a subclass to use and/or override it.

Collection<ExceptionDest> result = unitToExceptionDests.get(u);
if (result == null) {
ExceptionDest e = new ExceptionDest(null, null) {
private ThrowableSet throwables;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExceptionDest already defines this field, it was just private so it was not accessible. So I removed the private from that field and remove this field so there would be no duplication.

* ignore completely <code>Unit</code>s which are outside the scope of all <code>Trap</code>s.)
* </p>
*/
protected Map<Unit, Collection<ExceptionDest>> buildExceptionDests(ThrowAnalysis throwAnalysis) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restructured this method a bit to avoid unnecessary work when body.getTraps() is empty and to avoid obtaining ThrowableSet.Manager.v().EMPTY repeatedly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载