Prevent unnecessary compile warnings

This commit is contained in:
AsamK 2023-10-22 18:27:57 +02:00
parent 800ff09a37
commit 7887a5a613
2 changed files with 15 additions and 1 deletions

View file

@ -79,6 +79,7 @@ public class KeyValueStore {
} }
} }
@SuppressWarnings("unchecked")
private static <T> T readValueFromResultSet( private static <T> T readValueFromResultSet(
final KeyValueEntry<T> key, final ResultSet resultSet final KeyValueEntry<T> key, final ResultSet resultSet
) throws SQLException { ) throws SQLException {

View file

@ -552,6 +552,7 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
@Deprecated
public void setGroupBlocked(final byte[] groupId, final boolean blocked) { public void setGroupBlocked(final byte[] groupId, final boolean blocked) {
try { try {
m.setGroupsBlocked(List.of(getGroupId(groupId)), blocked); m.setGroupsBlocked(List.of(getGroupId(groupId)), blocked);
@ -565,6 +566,7 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
@Deprecated
public List<byte[]> getGroupIds() { public List<byte[]> getGroupIds() {
var groups = m.getGroups(); var groups = m.getGroups();
return groups.stream().map(g -> g.groupId().serialize()).toList(); return groups.stream().map(g -> g.groupId().serialize()).toList();
@ -587,6 +589,7 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
@Deprecated
public String getGroupName(final byte[] groupId) { public String getGroupName(final byte[] groupId) {
var group = m.getGroup(getGroupId(groupId)); var group = m.getGroup(getGroupId(groupId));
if (group == null || group.title() == null) { if (group == null || group.title() == null) {
@ -597,6 +600,7 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
@Deprecated
public List<String> getGroupMembers(final byte[] groupId) { public List<String> getGroupMembers(final byte[] groupId) {
var group = m.getGroup(getGroupId(groupId)); var group = m.getGroup(getGroupId(groupId));
if (group == null) { if (group == null) {
@ -611,11 +615,16 @@ public class DbusSignalImpl implements Signal {
public byte[] createGroup( public byte[] createGroup(
final String name, final List<String> members, final String avatar final String name, final List<String> members, final String avatar
) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber { ) throws Error.AttachmentInvalid, Error.Failure, Error.InvalidNumber {
return updateGroup(new byte[0], name, members, avatar); return updateGroupInternal(new byte[0], name, members, avatar);
} }
@Override @Override
@Deprecated
public byte[] updateGroup(byte[] groupId, String name, List<String> members, String avatar) { public byte[] updateGroup(byte[] groupId, String name, List<String> members, String avatar) {
return updateGroupInternal(groupId, name, members, avatar);
}
public byte[] updateGroupInternal(byte[] groupId, String name, List<String> members, String avatar) {
try { try {
groupId = nullIfEmpty(groupId); groupId = nullIfEmpty(groupId);
name = nullIfEmpty(name); name = nullIfEmpty(name);
@ -650,6 +659,7 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
@Deprecated
public boolean isRegistered() { public boolean isRegistered() {
return true; return true;
} }
@ -770,6 +780,7 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
@Deprecated
public void quitGroup(final byte[] groupId) { public void quitGroup(final byte[] groupId) {
var group = getGroupId(groupId); var group = getGroupId(groupId);
try { try {
@ -809,6 +820,7 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
@Deprecated
public boolean isGroupBlocked(final byte[] groupId) { public boolean isGroupBlocked(final byte[] groupId) {
var group = m.getGroup(getGroupId(groupId)); var group = m.getGroup(getGroupId(groupId));
if (group == null) { if (group == null) {
@ -819,6 +831,7 @@ public class DbusSignalImpl implements Signal {
} }
@Override @Override
@Deprecated
public boolean isMember(final byte[] groupId) { public boolean isMember(final byte[] groupId) {
var group = m.getGroup(getGroupId(groupId)); var group = m.getGroup(getGroupId(groupId));
if (group == null) { if (group == null) {