Skip to content

Commit

Permalink
pmd:ImmutableField - Immutable Field
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed Ezzat committed Jun 10, 2016
1 parent 3974a97 commit e64888e
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public class AlacFile

protected LeadingZeros lz = new LeadingZeros();

private int buffer_size = 16384;
private static final int BUFFER_SIZE = 16384;
/* buffers */
protected int[] predicterror_buffer_a = new int[buffer_size];
protected int[] predicterror_buffer_b = new int[buffer_size];
protected int[] predicterror_buffer_a = new int[BUFFER_SIZE];
protected int[] predicterror_buffer_b = new int[BUFFER_SIZE];

protected int[] outputsamples_buffer_a = new int[buffer_size];
protected int[] outputsamples_buffer_b = new int[buffer_size];
protected int[] outputsamples_buffer_a = new int[BUFFER_SIZE];
protected int[] outputsamples_buffer_b = new int[BUFFER_SIZE];

protected int[] uncompressed_bytes_buffer_a = new int[buffer_size];
protected int[] uncompressed_bytes_buffer_b = new int[buffer_size];
protected int[] uncompressed_bytes_buffer_a = new int[BUFFER_SIZE];
protected int[] uncompressed_bytes_buffer_b = new int[BUFFER_SIZE];

/* stuff from setinfo */
public int setinfo_max_samples_per_frame; // 0x1000 = 4096
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public abstract class DeviceCommand
{
private static Logger logger = Logger.getLogger(DeviceCommand.class.getName());

private Map<String, String> parameterMap = new HashMap<>();
private final Map<String, String> parameterMap = new HashMap<>();

protected String requestType = "POST";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

public class PlayCommand extends DeviceCommand
{
private String contentURL;
private double startPosition;
private final String contentURL;
private final double startPosition;

public PlayCommand(String contentURL, double startPosition)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
public class Device
{
private String id;
private String name;
private InetAddress inetAddress;
private int port;
private final String name;
private final InetAddress inetAddress;
private final int port;

public Device(String name, InetAddress inetAddress, int port)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class DeviceConnection
{
private static Logger logger = Logger.getLogger(DeviceConnection.class.getName());

private Device device;
private final Device device;
private Socket socket;

public DeviceConnection(Device device)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

public class DeviceResponse
{
private int responseCode;
private String responseMessage;
private Map<String, String> headerMap = new HashMap<>();
private final int responseCode;
private final String responseMessage;
private final Map<String, String> headerMap = new HashMap<>();
private final Map<String, String> contentParameterMap = new HashMap<>();
private String content;
private Map<String, String> contentParameterMap = new HashMap<>();

public DeviceResponse(String headers, String content)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
*/
public class RaopRtspPipelineFactory implements ChannelPipelineFactory
{
final private byte[] hardwareAddressBytes;
final private ExecutionHandler channelExecutionHandler;
final private ExecutorService executorService;
private SimpleChannelUpstreamHandler channel;
final private IPlayingInformation playingInformation;
private final byte[] hardwareAddressBytes;
private final ExecutionHandler channelExecutionHandler;
private final ExecutorService executorService;
private final SimpleChannelUpstreamHandler channel;
private final IPlayingInformation playingInformation;

public RaopRtspPipelineFactory(byte[] hardwareAddressBytes, ExecutionHandler channelExecutionHandler, ExecutorService executorService, SimpleChannelUpstreamHandler channel, IPlayingInformation playingInformation)
{
Expand Down
18 changes: 9 additions & 9 deletions jolivia.example/src/main/java/org/dyndns/jkiddo/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ public class Window

private static Logger logger = LoggerFactory.getLogger(Window.class);

final private JFrame mainFormJolivia;
final private JTextField txtUsername = new JTextField();
final private JPasswordField pwdPassword = new JPasswordField();
final private JTextField textField;
final private JButton btnNewButton;
final private JFileChooser fc;
final private JButton btnNewButton_1;
private final JFrame mainFormJolivia;
private final JTextField txtUsername = new JTextField();
private final JPasswordField pwdPassword = new JPasswordField();
private final JTextField textField;
private final JButton btnNewButton;
private final JFileChooser fc;
private final JButton btnNewButton_1;
private final JCheckBox chckbxUseGoogleMusic;
private final ExecutorService executor;
private File path = new File(System.getProperty("user.home"));
private JCheckBox chckbxUseGoogleMusic;
private ExecutorService executor;
private Jolivia jolivia;

/**
Expand Down

0 comments on commit e64888e

Please sign in to comment.