mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Removes assert() usage throughout project and replaces with Validate from apache commons.
This commit is contained in:
@@ -20,6 +20,7 @@ package sample.adapter;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import source.mixer.MixerChannel;
|
||||
|
||||
/**
|
||||
@@ -34,7 +35,7 @@ public class ChannelShortAdapter implements ISampleAdapter
|
||||
public ChannelShortAdapter( MixerChannel channel )
|
||||
{
|
||||
/* Only use with LEFT/RIGHT channels */
|
||||
assert( channel != MixerChannel.MONO );
|
||||
Validate.isTrue(channel != MixerChannel.MONO);
|
||||
|
||||
mMixerChannel = channel;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
******************************************************************************/
|
||||
package sample.complex;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import sample.Listener;
|
||||
|
||||
/**
|
||||
@@ -32,7 +33,7 @@ public class ComplexToComplexBufferAssembler implements ComplexSampleListener
|
||||
|
||||
public ComplexToComplexBufferAssembler( int bufferSize )
|
||||
{
|
||||
assert( bufferSize % 2 == 0 );
|
||||
Validate.isTrue(bufferSize % 2 == 0);
|
||||
|
||||
mBufferSize = bufferSize;
|
||||
mBuffer = new float[ mBufferSize ];
|
||||
|
||||
Reference in New Issue
Block a user