@Test public void setPassword() { NetworkProxy proxy = new NetworkProxy(); assertNull(proxy.getPassword()); proxy.setPassword("ucdx".toCharArray()); assertEquals("ucdx", new String(proxy.getPassword())); proxy = new NetworkProxy("test-proxy", "http", "test.apache.org", 80, "testuser", "xxxx".toCharArray()); assertEquals("xxxx", new String(proxy.getPassword())); char[] testPwd = {'a', 'b', 'c', 'd'}; proxy.setPassword(testPwd); assertEquals("abcd", new String(proxy.getPassword())); testPwd[0]='0'; assertEquals("abcd", new String(proxy.getPassword())); }
public void setPassword(char[] password ) { if (this.password!=null) { Arrays.fill(this.password, '0'); } this.password = Arrays.copyOf(password, password.length); }
NetworkProxy implements Serializable { public void setPassword(char[] password ) { if (this.password!=null) { Arrays.fill(this.password, '0'); } this.password = Arrays.copyOf(password, password.length); } }
NetworkProxy implements Serializable { public void setPassword(char[] password ) { if (this.password!=null) { Arrays.fill(this.password, '0'); } this.password = Arrays.copyOf(password, password.length); } NetworkProxy();  NetworkProxy(String id, String protocol, String host, int port, String username, char[] password ); }
NetworkProxy implements Serializable { public void setPassword(char[] password ) { if (this.password!=null) { Arrays.fill(this.password, '0'); } this.password = Arrays.copyOf(password, password.length); } NetworkProxy();  NetworkProxy(String id, String protocol, String host, int port, String username, char[] password ); String getId(); void setId( String id ); String getProtocol(); void setProtocol( String protocol ); String getHost(); void setHost( String host ); int getPort(); void setPort( int port ); String getUsername(); void setUsername( String username ); char[] getPassword(); void setPassword(char[] password ); boolean isUseNtlm(); void setUseNtlm( boolean useNtlm ); @Override boolean equals( Object o ); @Override int hashCode(); @Override String toString(); }
NetworkProxy implements Serializable { public void setPassword(char[] password ) { if (this.password!=null) { Arrays.fill(this.password, '0'); } this.password = Arrays.copyOf(password, password.length); } NetworkProxy();  NetworkProxy(String id, String protocol, String host, int port, String username, char[] password ); String getId(); void setId( String id ); String getProtocol(); void setProtocol( String protocol ); String getHost(); void setHost( String host ); int getPort(); void setPort( int port ); String getUsername(); void setUsername( String username ); char[] getPassword(); void setPassword(char[] password ); boolean isUseNtlm(); void setUseNtlm( boolean useNtlm ); @Override boolean equals( Object o ); @Override int hashCode(); @Override String toString();  }