It is not clear if Jonathan or David was the one who swore the oath. The Masoretic Text suggests that it was David, in which case David was confirming that he would look after Jonathan and his family when he arose to the throne. The Septuagint (LXX) suggests that it was Jonathan who reaffirmed his oath to David (see 1 Samuel 18:3), once again declaring his allegiance or loyalty.1
17 And Jonathan made David swear again by his love for him, for he loved him as he loved his own soul.