private Collection<JID> getMembers(String groupName, boolean adminsOnly) {
        List<JID> members = new ArrayList<>();

        Connection con = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        try {
            con = getConnection();
            if (adminsOnly) {
                if (loadAdminsSQL == null) {
                    return members;
                }
                pstmt = con.prepareStatement(loadAdminsSQL);
            }
            else {
                pstmt = con.prepareStatement(loadMembersSQL);
            }

            pstmt.setString(1, groupName);
            rs = pstmt.executeQuery();
            while (rs.next()) {
                String user = rs.getString(1);
                if (user != null) {
                    JID userJID;
                    if (user.contains("@")) {
                        if ( !assumePersistedDataIsEscaped()) {
                            // OF-1837: When the database does not hold escaped data, escape values before processing them further.
                            final int splitIndex = user.lastIndexOf( "@" );
                            final String node = user.substring( 0, splitIndex );
                            userJID = new JID( JID.escapeNode( node ) + user.substring( splitIndex ) );
                        } else {
                            userJID = new JID(user);
                        }
                    }
                    else {
                        // OF-1837: When the database does not hold escaped data, escape values before processing them further.
                        final String processedNode = assumePersistedDataIsEscaped() ? user : JID.escapeNode( user );
                        userJID = server.createJID(processedNode, null);
                    }

                    if (userJID.getResource() != null) {
                        Log.warn("Group '{}' has a member that is persisted using its full JID, instead of a bare JID: '{}'. This is unexpected, and possibly a data consistency error. Groups should only contain bare JIDs.", groupName, userJID);
                        userJID = userJID.asBareJID();
                    }

                    members.add(userJID);
                }
            }
        }
        catch (SQLException e) {
            Log.error(e.getMessage(), e);
        }
        finally {
            DbConnectionManager.closeConnection(rs, pstmt, con);
        }
        return members;
    }
XMPP disallows some characters in identifiers, requiring them to be escaped.

This implementation assumes that the database returns properly escaped identifiers,
but can apply escaping by setting the value of the 'jdbcGroupProvider.isEscaped'
property to 'false'.

@return 'false' if this implementation needs to escape database content before processing.
xmppserver/src/main/java/org/jivesoftware/openfire/group/JDBCGroupProvider.java