toggiee / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

Responses not read? #229

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I was trying to mock Apple's servers and return an error for a push 
notification. As I was not able to make it work, I looked into the code and it 
seems that the responses are not read at all? 

In PushNotificationManager.sendNotification() on line 389 there is this:

BufferedReader in = new BufferedReader(new 
InputStreamReader(this.socket.getInputStream()));

however the reader is never used. Other methods are only delegating to 
PushNotificationManager.sendNotification(). I also searched for references on 
PushedNotification.setError() and PushedNotification.setResponse() and nothing 
was found...

It seems strange that this wouldn't be discovered sooner so I guess I'm missing 
something nevertheless couldn't figure it out.

What version of the product are you using? On what operating system?
JavaPNS 2.2, Windows

Original issue reported on code.google.com by jani...@seznam.cz on 28 Jan 2015 at 4:28

GoogleCodeExporter commented 8 years ago
The line you are referring has been disabled in the latest code because it was 
indeed not used.  The responses are read by the 
PushNotificationManager.processedFailedNotifications, which is invoked in 
various situations.  

Original comment by sype...@gmail.com on 31 Jan 2015 at 6:23