Open biaji opened 1 year ago
Use 1.2.1 instead to avoid following error:
MqttConnectOptions.setUserName in 1.2.0 has a empty string check(removed by commit ):
public void setUserName(String userName) { if ((userName != null) && (userName.trim().equals(""))) { throw new IllegalArgumentException(); } this.userName = userName; }
while the connect method in MqttClient will give "" as default value for username:
connect
MqttClient
connOpts.setUserName(options.hasKey("username") ? options.getString("username") : "");
Which result to an IllegalArgumentException
IllegalArgumentException
Use 1.2.1 instead to avoid following error:
MqttConnectOptions.setUserName in 1.2.0 has a empty string check(removed by commit ):
while the
connect
method inMqttClient
will give "" as default value for username:connOpts.setUserName(options.hasKey("username") ? options.getString("username") : "");
Which result to an
IllegalArgumentException