• Christian Schudt's avatar
    DefaultUserProvider: Rethrow exception instead of silently logging it. · 23a0cc49
    Christian Schudt authored
    The reason is, that when calling the createUser() method, the caller thinks user creation succeeded, even if it might not.
    This leads to unexpected behavior.
    
    I've experienced that, when trying to create a user with a name of > 100 length:
    
    com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'name' at row 1
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4230)
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
    	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
    	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
    	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)
    	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
    	at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1307)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
    	at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
    	at com.mysql.jdbc.Statement$$EnhancerByProxool$$cb3cdf02.execute(<generated>)
    	at org.jivesoftware.openfire.user.DefaultUserProvider.createUser(DefaultUserProvider.java:164)
    23a0cc49
Name
Last commit
Last update
..
DefaultUserProvider.java Loading commit data...
HybridUserProvider.java Loading commit data...
JDBCUserProvider.java Loading commit data...
NativeUserProvider.java Loading commit data...
POP3UserProvider.java Loading commit data...
PresenceEventDispatcher.java Loading commit data...
PresenceEventListener.java Loading commit data...
User.java Loading commit data...
UserAlreadyExistsException.java Loading commit data...
UserCollection.java Loading commit data...
UserManager.java Loading commit data...
UserNameManager.java Loading commit data...
UserNameProvider.java Loading commit data...
UserNotFoundException.java Loading commit data...
UserProvider.java Loading commit data...
package-info.java Loading commit data...