1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 00:59:39 +02:00

Update errorprone(-plugin) and make Unused(Variable|Method) an error

This commit is contained in:
Florian Schmaus 2019-05-07 22:58:02 +02:00
parent 68d7d738b6
commit 7f0dc72dab
46 changed files with 81 additions and 126 deletions

View file

@ -28,7 +28,7 @@ import org.jivesoftware.smackx.jingleold.packet.Jingle;
* @author Jeff Williams
* @see JingleSessionState
*/
@SuppressWarnings("UnusedVariable")
public class JingleSessionStatePending extends JingleSessionState {
private static final Logger LOGGER = Logger.getLogger(JingleSessionStatePending.class.getName());

View file

@ -40,6 +40,7 @@ import org.jivesoftware.smackx.jingleold.packet.JingleTransport;
* @author Jeff Williams
* @see JingleSessionState
*/
@SuppressWarnings("UnusedVariable")
public class JingleSessionStateUnknown extends JingleSessionState {
private static final Logger LOGGER = Logger.getLogger(JingleSessionStateUnknown.class.getName());

View file

@ -45,6 +45,7 @@ import org.jivesoftware.smackx.jingleold.packet.JingleError;
*
* @author Thiago Camargo
*/
@SuppressWarnings("UnusedVariable")
public class MediaNegotiator extends JingleNegotiator {
private static final Logger LOGGER = Logger.getLogger(MediaNegotiator.class.getName());

View file

@ -17,8 +17,6 @@
package org.jivesoftware.smackx.jingleold.mediaimpl;
import java.awt.Frame;
import java.awt.TextArea;
import java.awt.Toolkit;
import java.util.Vector;
import java.util.logging.Logger;
@ -30,6 +28,7 @@ import javax.media.format.AudioFormat;
import com.sun.media.ExclusiveUse;
import com.sun.media.util.Registry;
@SuppressWarnings("UnusedVariable")
public class JMFInit extends Frame implements Runnable {
private static final long serialVersionUID = 6476412003260641680L;
@ -278,24 +277,6 @@ public class JMFInit extends Frame implements Runnable {
LOGGER.fine(mesg);
}
private void createGUI() {
TextArea textBox = new TextArea(5, 50);
add("Center", textBox);
textBox.setEditable(false);
addNotify();
pack();
int scrWidth = (int) Toolkit.getDefaultToolkit().getScreenSize()
.getWidth();
int scrHeight = (int) Toolkit.getDefaultToolkit().getScreenSize()
.getHeight();
setLocation((scrWidth - getWidth()) / 2, (scrHeight - getHeight()) / 2);
setVisible(visible);
}
public static void start(boolean visible) {
new JMFInit(null, visible);
}

View file

@ -34,7 +34,7 @@ import org.jivesoftware.smackx.jingleold.nat.TransportCandidate;
*
* @author Thiago Camargo
*/
@SuppressWarnings("UnusedVariable")
public class ScreenShareMediaManager extends JingleMediaManager {
public static final String MEDIA_NAME = "ScreenShare";

View file

@ -36,6 +36,7 @@ import java.util.logging.Logger;
*
* @author Thiago Rocha Camargo
*/
@SuppressWarnings("UnusedVariable")
public class ImageTransmitter implements Runnable {
private static final Logger LOGGER = Logger.getLogger(ImageTransmitter.class.getName());

View file

@ -27,6 +27,7 @@ import java.util.logging.Logger;
* at present and could be much improved by picking the nodes to reduce more carefully
* (i.e. not completely at random) when I get the time.
*/
@SuppressWarnings("UnusedVariable")
public class OctTreeQuantizer implements Quantizer {
private static final Logger LOGGER = Logger.getLogger(OctTreeQuantizer.class.getName());

View file

@ -25,6 +25,7 @@ import java.awt.image.WritableRaster;
* A filter which acts as a superclass for filters which need to have the whole image in memory
* to do their stuff.
*/
@SuppressWarnings("UnusedVariable")
public abstract class WholeImageFilter extends AbstractBufferedImageOp {
/**

View file

@ -32,6 +32,7 @@ import org.jivesoftware.smackx.jingleold.media.PayloadType;
*
* @author Thiago Camargo
*/
@SuppressWarnings("UnusedVariable")
public class BridgedTransportManager extends JingleTransportManager implements JingleSessionListener, CreatedJingleSessionListener {
XMPPConnection xmppConnection;

View file

@ -32,6 +32,7 @@ import org.jivesoftware.smack.util.StringUtils;
/**
* A very Simple HTTP Server.
*/
@SuppressWarnings("UnusedVariable")
public class HttpServer {
private static final Logger LOGGER = Logger.getLogger(HttpServer.class.getName());

View file

@ -219,6 +219,7 @@ public final class ICECandidate extends TransportCandidate implements Comparable
*
* ICE Candidate can check connectivity using UDP echo Test.
*/
@SuppressWarnings("UnusedVariable")
@Override
public void check(final List<TransportCandidate> localCandidates) {
// TODO candidate is being checked trigger

View file

@ -30,6 +30,7 @@ import org.jivesoftware.smackx.jingleold.listeners.JingleSessionListener;
import org.jivesoftware.smackx.jingleold.media.PayloadType;
import org.jivesoftware.smackx.jingleold.nat.ICECandidate.Type;
@SuppressWarnings("UnusedVariable")
public class ICETransportManager extends JingleTransportManager implements JingleSessionListener, CreatedJingleSessionListener {
private static final Logger LOGGER = Logger.getLogger(ICETransportManager.class.getName());

View file

@ -31,6 +31,7 @@ import java.util.logging.Logger;
* It Creates a TCP Socket That Connects to another TCP Socket Listener and forwards every packets received to an UDP Listener.
* And forwards every packets received in UDP Socket, to the TCP Server
*/
@SuppressWarnings("UnusedVariable")
public class TcpUdpBridgeClient {
private static final Logger LOGGER = Logger.getLogger(TcpUdpBridgeClient.class.getName());

View file

@ -33,6 +33,7 @@ import java.util.logging.Logger;
* It Creates a TCP Socket Listeners for Connections and forwards every packets received to an UDP Listener.
* And forwards every packets received in UDP Socket, to the TCP Client
*/
@SuppressWarnings("UnusedVariable")
public class TcpUdpBridgeServer {
private static final Logger LOGGER = Logger.getLogger(TcpUdpBridgeServer.class.getName());

View file

@ -350,6 +350,7 @@ public abstract class TransportCandidate {
*
* Subclasses should provide better methods if they can...
*/
@SuppressWarnings("UnusedVariable")
public void check(final List<TransportCandidate> localCandidates) {
// TODO candidate is being checked trigger
// candidatesChecking.add(cand);
@ -669,6 +670,7 @@ public abstract class TransportCandidate {
}
@SuppressWarnings("UnusedVariable")
@Override
public void run() {
try {

View file

@ -51,6 +51,7 @@ import org.jivesoftware.smackx.jingleold.packet.JingleTransport.JingleTransportC
*
* @author Alvaro Saurin
*/
@SuppressWarnings("UnusedVariable")
public abstract class TransportNegotiator extends JingleNegotiator {
private static final Logger LOGGER = Logger.getLogger(TransportNegotiator.class.getName());

View file

@ -34,7 +34,6 @@ public class JingleContentProvider extends ExtensionElementProvider<JingleConten
*/
@Override
public JingleContent parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) {
String elementName = parser.getName();
String creator = parser.getAttributeValue("", JingleContent.CREATOR);
String name = parser.getAttributeValue("", JingleContent.NAME);

View file

@ -53,7 +53,7 @@ public class JingleProvider extends IQProvider<Jingle> {
public Jingle parse(XmlPullParser parser, int intialDepth, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException, SmackParsingException {
Jingle jingle = new Jingle();
String sid = "";
String sid;
JingleActionEnum action;
Jid initiator, responder;
boolean done = false;