a66c3ed83f8683750df141df7b3cad84a7b942bc
Files Diff
- Added: 9
- Removed: 7
- Renamed: 0
- Modified: 17
Refactorings reported:
| Refactoring Name | Occurences | ||
|---|---|---|---|
| Rename Method | 3 | ||
| Rename Method public saveToken(token ReusableToken) : boolean renamed to public saveSession(session ReusableSession) : boolean in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Rename Method public genToken(info SessionInfo) : ReusableToken renamed to public genSession(info SessionInfo) : ReusableSession in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Rename Method public getToken(tokenId String) : ReusableToken renamed to public getSession(sessionId String) : ReusableSession in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Change Parameter Type | 2 | ||
| Change Parameter Type token : ReusableToken to session : ReusableSession in method public saveSession(session ReusableSession) : boolean in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Change Parameter Type desKey : String to sessionKey : byte[] in method public SessionInfo(osName String, osVersion String, clientVersion String, deviceId String, sessionKey byte[], iv byte[]) in class com.shinemo.mpush.api.SessionInfo | From | To | |
| Rename Variable | 3 | ||
| Rename Variable version : byte to lrc : byte in method private readPacket(in ByteBuf, bodyLength int) : Packet in class com.shinemo.mpush.connection.netty.codec.PacketDecoder | From | To | |
| Rename Variable token : ReusableToken to session : ReusableSession in method public handle(body FastConnectMessage, request Request) : void in class com.shinemo.mpush.core.handler.FastConnectHandler | From | To | |
| Rename Variable msgId : int to sessionId : int in method private readPacket(in ByteBuf, bodyLength int) : Packet in class com.shinemo.mpush.connection.netty.codec.PacketDecoder | From | To | |
| Change Return Type | 3 | ||
| Change Return Type ReusableToken to ReusableSession in method public genSession(info SessionInfo) : ReusableSession in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Change Return Type HeartBeatMessage to Void in method public decodeBody(packet Packet) : Void in class com.shinemo.mpush.core.handler.HeartBeatHandler | From | To | |
| Change Return Type ReusableToken to ReusableSession in method public getSession(sessionId String) : ReusableSession in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Move Attribute | 1 | ||
| Move Attribute private iv : byte[] from class com.shinemo.mpush.tools.crypto.DESUtils to private iv : byte[] from class com.shinemo.mpush.connection.ClientHandler | From | To | |
| Rename Class | 4 | ||
| Rename Class com.shinemo.mpush.core.security.CredentialManager renamed to com.shinemo.mpush.core.security.CipherManager | From | To | |
| Rename Class com.shinemo.mpush.tools.crypto.DESUtilsTest renamed to com.shinemo.mpush.tools.crypto.AESUtilsTest | From | To | |
| Rename Class com.shinemo.mpush.core.security.ReusableTokenManager renamed to com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Rename Class com.shinemo.mpush.core.message.HandShakeMessage renamed to com.shinemo.mpush.core.message.HandshakeMessage | From | To | |
| Move And Rename Class | 1 | ||
| Move And Rename Class com.shinemo.mpush.core.security.ReusableToken moved and renamed to com.shinemo.mpush.core.request.HandshakeRequest | From | To | |
| Rename Attribute | 6 | ||
| Rename Attribute msgId : int to sessionId : int in class com.shinemo.mpush.api.protocol.Packet | From | To | |
| Rename Attribute MAGIC_NUM1 : byte to HB : byte in class com.shinemo.mpush.api.Constants | From | To | |
| Rename Attribute command : byte to cmd : byte in class com.shinemo.mpush.api.protocol.Packet | From | To | |
| Rename Attribute desKey : String to sessionKey : byte[] in class com.shinemo.mpush.api.SessionInfo | From | To | |
| Rename Attribute version : byte to sessionId : int in class com.shinemo.mpush.api.protocol.Packet | From | To | |
| Rename Attribute version : byte to lrc : byte in class com.shinemo.mpush.api.protocol.Packet | From | To | |
| Change Variable Type | 3 | ||
| Change Variable Type token : ReusableToken to session : ReusableSession in method public handle(body FastConnectMessage, request Request) : void in class com.shinemo.mpush.core.handler.FastConnectHandler | From | To | |
| Change Variable Type message : HandShakeMessage to message : HandshakeMessage in method public channelActive(ctx ChannelHandlerContext) : void in class com.shinemo.mpush.connection.ClientHandler | From | To | |
| Change Variable Type v : ReusableToken to v : ReusableSession in method public genSession(info SessionInfo) : ReusableSession in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Inline Variable | 1 | ||
| Inline Variable channel : Channel in method public testClient() : void from class com.shinemo.mpush.connection.ClientTest | From | To | |
| Change Attribute Type | 7 | ||
| Change Attribute Type tokenCache : Map<String,ReusableToken> to tokenCache : Map<String,ReusableSession> in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Change Attribute Type INSTANCE : ReusableTokenManager to INSTANCE : ReusableSessionManager in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Change Attribute Type desKey : String to sessionKey : byte[] in class com.shinemo.mpush.api.SessionInfo | From | To | |
| Change Attribute Type clientKey : String to clientKey : byte[] in class com.shinemo.mpush.core.message.HandshakeMessage | From | To | |
| Change Attribute Type clientKey : String to clientKey : byte[] in class com.shinemo.mpush.connection.ClientHandler | From | To | |
| Change Attribute Type version : byte to sessionId : int in class com.shinemo.mpush.api.protocol.Packet | From | To | |
| Change Attribute Type INSTANCE : CredentialManager to INSTANCE : CipherManager in class com.shinemo.mpush.core.security.CipherManager | From | To | |
| Rename Parameter | 3 | ||
| Rename Parameter token : ReusableToken to session : ReusableSession in method public saveSession(session ReusableSession) : boolean in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Rename Parameter tokenId : String to sessionId : String in method public getSession(sessionId String) : ReusableSession in class com.shinemo.mpush.core.security.ReusableSessionManager | From | To | |
| Rename Parameter desKey : String to sessionKey : byte[] in method public SessionInfo(osName String, osVersion String, clientVersion String, deviceId String, sessionKey byte[], iv byte[]) in class com.shinemo.mpush.api.SessionInfo | From | To |