@Test public void testVersionNormalization() throws Exception { Handshake hs = new Handshake("11.2.3.a"); assertEquals("11.02.03.a", hs.getVersion()); }
public String getVersion() { if (this.version != null) { StringBuilder builder = new StringBuilder(); List<String> parts = StringUtil.split(this.version, "."); for (int i = 0; i < parts.size(); i++) { if (i > 0) { builder.append('.'); } String part = parts.get(i); if (part.length() < 2 && Character.isDigit(part.charAt(0))) { builder.append('0'); } builder.append(part); } return builder.toString(); } return this.version; }
Handshake implements Externalizable { public String getVersion() { if (this.version != null) { StringBuilder builder = new StringBuilder(); List<String> parts = StringUtil.split(this.version, "."); for (int i = 0; i < parts.size(); i++) { if (i > 0) { builder.append('.'); } String part = parts.get(i); if (part.length() < 2 && Character.isDigit(part.charAt(0))) { builder.append('0'); } builder.append(part); } return builder.toString(); } return this.version; } }
Handshake implements Externalizable { public String getVersion() { if (this.version != null) { StringBuilder builder = new StringBuilder(); List<String> parts = StringUtil.split(this.version, "."); for (int i = 0; i < parts.size(); i++) { if (i > 0) { builder.append('.'); } String part = parts.get(i); if (part.length() < 2 && Character.isDigit(part.charAt(0))) { builder.append('0'); } builder.append(part); } return builder.toString(); } return this.version; } Handshake();   Handshake(String version); }
Handshake implements Externalizable { public String getVersion() { if (this.version != null) { StringBuilder builder = new StringBuilder(); List<String> parts = StringUtil.split(this.version, "."); for (int i = 0; i < parts.size(); i++) { if (i > 0) { builder.append('.'); } String part = parts.get(i); if (part.length() < 2 && Character.isDigit(part.charAt(0))) { builder.append('0'); } builder.append(part); } return builder.toString(); } return this.version; } Handshake();   Handshake(String version); String getVersion(); void setVersion(); byte[] getPublicKey(); void setPublicKey(byte[] key); @Deprecated AuthenticationType getAuthType(); void setAuthType(AuthenticationType authType); byte[] getPublicKeyLarge(); void setPublicKeyLarge(byte[] publicKeyLarge); boolean isCbc(); void setCbc(boolean cbc); @Override void readExternal(ObjectInput in); @Override void writeExternal(ObjectOutput out); }
Handshake implements Externalizable { public String getVersion() { if (this.version != null) { StringBuilder builder = new StringBuilder(); List<String> parts = StringUtil.split(this.version, "."); for (int i = 0; i < parts.size(); i++) { if (i > 0) { builder.append('.'); } String part = parts.get(i); if (part.length() < 2 && Character.isDigit(part.charAt(0))) { builder.append('0'); } builder.append(part); } return builder.toString(); } return this.version; } Handshake();   Handshake(String version); String getVersion(); void setVersion(); byte[] getPublicKey(); void setPublicKey(byte[] key); @Deprecated AuthenticationType getAuthType(); void setAuthType(AuthenticationType authType); byte[] getPublicKeyLarge(); void setPublicKeyLarge(byte[] publicKeyLarge); boolean isCbc(); void setCbc(boolean cbc); @Override void readExternal(ObjectInput in); @Override void writeExternal(ObjectOutput out);  }