Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Adding Log and javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
secondsun committed Sep 15, 2016
1 parent b33d820 commit 0961fe1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public Response crossOriginForInstallations(@Context HttpHeaders headers) {
*
* Details about JSON format can be found HERE!
*
* @param oldToken The previously registered deviceToken or an empty String. Provided by the header x-ag-old-token.
* @param entity {@link Installation} for Device registration
* @return registered {@link Installation}
*
Expand Down Expand Up @@ -179,6 +180,7 @@ public Response registerInstallation(

//The token has changed, remove the old one
if (!oldToken.isEmpty() && !oldToken.equals(entity.getDeviceToken())) {
logger.info(String.format("Deleting old device token %s", oldToken));
clientInstallationService.removeInstallationForVariantByDeviceToken(variant.getVariantID(), oldToken);
}

Expand Down

0 comments on commit 0961fe1

Please sign in to comment.