aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/xmpp/JidConverter.java
blob: 96c9ca74088845213456acce46337778ead2d882 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package com.juick.server.xmpp;

import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.Nullable;
import rocks.xmpp.addr.Jid;

import javax.annotation.Nonnull;

public class JidConverter implements Converter<String, Jid> {
    @Nullable
    @Override
    public Jid convert(@Nonnull String jidStr) {
        return Jid.of(jidStr);
    }
}