From d5c2fa6c8dbe018fb2fe2075676094e524b438b7 Mon Sep 17 00:00:00 2001 From: "lubomir.marinov" Date: Fri, 3 Jan 2014 12:13:52 +0000 Subject: [PATCH] Fixes the Ant target rebuild, warnings. --- .classpath | 1 + src/org/ice4j/ice/Candidate.java | 3 +- test/test/Ice.java | 9 +++-- test/test/IcePseudoTcp.java | 56 +++++++++++++++++----------- test/test/SdpUtils.java | 4 +- test/test/TrickleIce.java | 10 ++--- test/test/signalling/Signalling.java | 14 +++---- 7 files changed, 56 insertions(+), 41 deletions(-) diff --git a/.classpath b/.classpath index be08529..8c17093 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,7 @@ + diff --git a/src/org/ice4j/ice/Candidate.java b/src/org/ice4j/ice/Candidate.java index 3f97c59..349d37b 100644 --- a/src/org/ice4j/ice/Candidate.java +++ b/src/org/ice4j/ice/Candidate.java @@ -26,8 +26,7 @@ import org.ice4j.*; * @author Emil Ivov * @author Lyubomir Marinov */ -public abstract class Candidate - > +public abstract class Candidate> implements Comparable { /** diff --git a/test/test/Ice.java b/test/test/Ice.java index 856a315..dd9bc8a 100644 --- a/test/test/Ice.java +++ b/test/test/Ice.java @@ -245,14 +245,15 @@ public class Ice Component remoteComponent) { List remoteCandidates - = remoteComponent.getLocalCandidates(); + = remoteComponent.getLocalCandidates(); localComponent.setDefaultRemoteCandidate( - remoteComponent.getDefaultCandidate()); + remoteComponent.getDefaultCandidate()); - for(Candidate rCand : remoteCandidates) + for(Candidate rCand : remoteCandidates) { - localComponent.addRemoteCandidate(new RemoteCandidate( + localComponent.addRemoteCandidate( + new RemoteCandidate( rCand.getTransportAddress(), localComponent, rCand.getType(), diff --git a/test/test/IcePseudoTcp.java b/test/test/IcePseudoTcp.java index e069cba..1f21a4e 100755 --- a/test/test/IcePseudoTcp.java +++ b/test/test/IcePseudoTcp.java @@ -9,13 +9,13 @@ package test; import java.beans.*; import java.io.*; import java.net.*; -import java.util.*; import java.util.logging.*; + import org.ice4j.*; import org.ice4j.ice.*; import org.ice4j.ice.harvest.*; -import org.ice4j.security.*; import org.ice4j.pseudotcp.*; +import org.ice4j.security.*; /** * Sample program which first uses ICE to discover UDP connectivity. After that @@ -143,13 +143,16 @@ public class IcePseudoTcp Object iceProcessingState = evt.getNewValue(); - logger.log(Level.INFO, - "Local agent entered the " + iceProcessingState + " state."); + logger.log( + Level.INFO, + "Local agent entered the " + iceProcessingState + + " state."); if (iceProcessingState == IceProcessingState.COMPLETED) { - logger.log(Level.INFO, - "Local - Total ICE processing time: " - + (processingEndTime - startTime) + "ms"); + logger.log( + Level.INFO, + "Local - Total ICE processing time: " + + (processingEndTime - startTime) + "ms"); Agent agent = (Agent) evt.getSource(); logger.log(Level.INFO, "Local: Create pseudo tcp stream"); IceMediaStream dataStream = agent.getStream("data"); @@ -157,8 +160,10 @@ public class IcePseudoTcp CandidatePair selectedPair = udpComponent.getSelectedPair(); if (selectedPair != null) { - LocalCandidate localCandidate = selectedPair.getLocalCandidate(); - Candidate remoteCandidate = selectedPair.getRemoteCandidate(); + LocalCandidate localCandidate + = selectedPair.getLocalCandidate(); + Candidate remoteCandidate + = selectedPair.getRemoteCandidate(); logger.log(Level.INFO, "Local: " + localCandidate); logger.log(Level.INFO, "Remote: " + remoteCandidate); try @@ -175,7 +180,9 @@ public class IcePseudoTcp } else { - logger.log(Level.INFO, "Failed to select any candidate pair"); + logger.log( + Level.INFO, + "Failed to select any candidate pair"); } } else @@ -188,8 +195,9 @@ public class IcePseudoTcp * that Agent instances are to be explicitly prepared for * garbage collection. */ - if (localJob != null - && iceProcessingState == IceProcessingState.TERMINATED) + if ((localJob != null) + && (iceProcessingState + == IceProcessingState.TERMINATED)) { localJob.start(); } @@ -217,8 +225,10 @@ public class IcePseudoTcp Object iceProcessingState = evt.getNewValue(); - logger.log(Level.INFO, - "Remote agent entered the " + iceProcessingState + " state."); + logger.log( + Level.INFO, + "Remote agent entered the " + iceProcessingState + + " state."); if (iceProcessingState == IceProcessingState.COMPLETED) { logger.log(Level.INFO, @@ -232,8 +242,10 @@ public class IcePseudoTcp CandidatePair usedPair = udpComponent.getSelectedPair(); if (usedPair != null) { - LocalCandidate localCandidate = usedPair.getLocalCandidate(); - Candidate remoteCandidate = usedPair.getRemoteCandidate(); + LocalCandidate localCandidate + = usedPair.getLocalCandidate(); + Candidate remoteCandidate + = usedPair.getRemoteCandidate(); logger.log(Level.INFO, "Remote: Local address " + localCandidate); logger.log(Level.INFO, @@ -267,8 +279,9 @@ public class IcePseudoTcp * that Agent instances are to be explicitly prepared for * garbage collection. */ - if (remoteJob != null - && iceProcessingState == IceProcessingState.TERMINATED) + if ((remoteJob != null) + && (iceProcessingState + == IceProcessingState.TERMINATED)) { remoteJob.start(); } @@ -294,8 +307,10 @@ public class IcePseudoTcp Agent remotePeer = createAgent(remotePort); - localAgent.addStateChangeListener(new IcePseudoTcp.LocalIceProcessingListener()); - remotePeer.addStateChangeListener(new IcePseudoTcp.RemoteIceProcessingListener()); + localAgent.addStateChangeListener( + new IcePseudoTcp.LocalIceProcessingListener()); + remotePeer.addStateChangeListener( + new IcePseudoTcp.RemoteIceProcessingListener()); //let them fight ... fights forge character. localAgent.setControlling(true); @@ -450,5 +465,4 @@ public class IcePseudoTcp logger.log(Level.FINEST, "Remote pseudotcp worker finished"); } } - } diff --git a/test/test/SdpUtils.java b/test/test/SdpUtils.java index 4ae05da..f8862fa 100644 --- a/test/test/SdpUtils.java +++ b/test/test/SdpUtils.java @@ -125,13 +125,13 @@ public class SdpUtils Component rtpComponent = stream.getComponent(Component.RTP); Component rtcpComponent = stream.getComponent(Component.RTCP); - Candidate defaultRtpCandidate + Candidate defaultRtpCandidate = rtpComponent.findRemoteCandidate(defaultRtpAddress); rtpComponent.setDefaultRemoteCandidate(defaultRtpCandidate); if(rtcpComponent != null) { - Candidate defaultRtcpCandidate + Candidate defaultRtcpCandidate = rtcpComponent.findRemoteCandidate(defaultRtcpAddress); rtcpComponent.setDefaultRemoteCandidate(defaultRtcpCandidate); } diff --git a/test/test/TrickleIce.java b/test/test/TrickleIce.java index ab63bac..eb050a7 100644 --- a/test/test/TrickleIce.java +++ b/test/test/TrickleIce.java @@ -6,15 +6,15 @@ */ package test; +import java.util.*; +import java.util.logging.*; + +import javax.sdp.*; + import org.ice4j.ice.*; import org.ice4j.ice.harvest.*; import org.ice4j.ice.sdp.*; -import javax.sdp.*; -import java.io.*; -import java.util.*; -import java.util.logging.*; - /** * An example of using trickle ICE. *

diff --git a/test/test/signalling/Signalling.java b/test/test/signalling/Signalling.java index 95074ad..c5a419e 100644 --- a/test/test/signalling/Signalling.java +++ b/test/test/signalling/Signalling.java @@ -20,9 +20,9 @@ public class Signalling /** * The socket where we send and receive signalling */ - private Socket signallingSocket = null; + private Socket signallingSocket; - private SignallingCallback signallingCallback = null; + private SignallingCallback signallingCallback; /** * Creates a signalling instance over the specified socket. @@ -49,12 +49,12 @@ public class Signalling * socket stuff). */ public static Signalling createServerSignalling( - InetSocketAddress socketAddress, - SignallingCallback signallingCallback) + InetSocketAddress socketAddress, + SignallingCallback signallingCallback) throws Throwable { - ServerSocket serverSocket = new ServerSocket(socketAddress); - - Signalling signalling = new Signalling(socketAddress, signallingCallback); +// ServerSocket serverSocket = new ServerSocket(socketAddress); +// Signalling signalling = new Signalling(socketAddress, signallingCallback); + return null; } }