Skip to content

Commit 3f02495

Browse files
committed
dmix: Code style.
1 parent 8e631b2 commit 3f02495

File tree

4 files changed

+48
-21
lines changed

4 files changed

+48
-21
lines changed

JMPDComm/src/main/java/org/a0z/mpd/Sticker.java

+43-16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
/*
2+
* Copyright (C) 2004 Felipe Gustavo de Almeida
3+
* Copyright (C) 2010-2014 The MPDroid Project
4+
*
5+
* All Rights Reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without
8+
* modification, are permitted provided that the following conditions are met:
9+
*
10+
* 1. Redistributions of source code must retain the above copyright
11+
* notice,this list of conditions and the following disclaimer.
12+
* 2. Redistributions in binary form must reproduce the above copyright
13+
* notice, this list of conditions and the following disclaimer in the
14+
* documentation and/or other materials provided with the distribution.
15+
*
16+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
20+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26+
*/
27+
128
package org.a0z.mpd;
229

330
import org.a0z.mpd.connection.MPDConnection;
@@ -143,6 +170,22 @@ private static CommandQueue getMusicCommand(final Collection<String> response) {
143170
return commandQueue;
144171
}
145172

173+
/**
174+
* Sanity check for the sticker manager methods.
175+
*
176+
* @param entry The entry to process.
177+
*/
178+
private static void onlyMusicSupported(final FilesystemTreeEntry entry) {
179+
if (entry == null) {
180+
throw new IllegalArgumentException("Failed on a null argument.");
181+
}
182+
183+
if (!(entry instanceof Music)) {
184+
throw new IllegalArgumentException("Stickers are only supported with Music objects: " +
185+
"Class: " + entry.getClass() + " Entry: " + entry.getFullPath());
186+
}
187+
}
188+
146189
/**
147190
* Deletes a sticker.
148191
*
@@ -278,22 +321,6 @@ private Map<String, Music> getMusicPair(final Collection<String> response)
278321
return musicPair;
279322
}
280323

281-
/**
282-
* Sanity check for the sticker manager methods.
283-
*
284-
* @param entry The entry to process.
285-
*/
286-
private static void onlyMusicSupported(final FilesystemTreeEntry entry) {
287-
if (entry == null) {
288-
throw new IllegalArgumentException("Failed on a null argument.");
289-
}
290-
291-
if (!(entry instanceof Music)) {
292-
throw new IllegalArgumentException("Stickers are only supported with Music objects: " +
293-
"Class: " + entry.getClass() + " Entry: " + entry.getFullPath());
294-
}
295-
}
296-
297324
/**
298325
* Retrieves rating of a entry.
299326
*

JMPDComm/src/main/java/org/a0z/mpd/connection/MPDConnection.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ public final CommandResult call() {
466466
* Used after a server error, sleeps for a small time then tries to reconnect.
467467
*
468468
* @param result The {@code CommandResult} which stores the connection failure.
469-
* @param e The exception to set.
469+
* @param e The exception to set.
470470
*/
471471
private void handleFailure(final CommandResult result, final IOException e) {
472472
if (isFailureHandled(result)) {
@@ -478,7 +478,7 @@ private void handleFailure(final CommandResult result, final IOException e) {
478478
* Used after a server error, sleeps for a small time then tries to reconnect.
479479
*
480480
* @param result The {@code CommandResult} which stores the connection failure.
481-
* @param e The exception to set.
481+
* @param e The exception to set.
482482
*/
483483
private void handleFailure(final CommandResult result, final MPDException e) {
484484
if (isFailureHandled(result)) {

JMPDComm/src/main/java/org/a0z/mpd/item/Item.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static <T extends Item> List<T> merged(final List<T> albumArtists,
4848
for (int j = jStart; j >= 0; j--) { // album artists
4949
if (albumArtists.get(j).getName().equals("")) {
5050
albumArtists.remove(j);
51-
jStart --;
51+
jStart--;
5252
}
5353
}
5454
for (int i = artists.size() - 1; i >= 0; i--) { // artists

MPDroid/src/main/res/layout-v21/notification.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
android:ellipsize="marquee"
4646
android:maxLines="1"
4747
android:singleLine="true"
48-
android:textColor="@android:color/white"
49-
android:textAppearance="?android:textAppearanceMedium" />
48+
android:textAppearance="?android:textAppearanceMedium"
49+
android:textColor="@android:color/white" />
5050

5151
<TextView
5252
android:id="@+id/notificationArtist"

0 commit comments

Comments
 (0)