Skip to content

Commit 72a38e1

Browse files
committed
clean up
1 parent 51d379d commit 72a38e1

File tree

4 files changed

+20
-35
lines changed

4 files changed

+20
-35
lines changed

pom.xml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@
233233

234234
<dependencies>
235235
<dependency>
236-
<groupId>vavi</groupId>
236+
<groupId>com.github.umjammer</groupId>
237237
<artifactId>vavi-commons</artifactId>
238-
<version>1.1.8-SNAPSHOT</version>
238+
<version>1.1.8</version>
239239
</dependency>
240240
<dependency>
241241
<groupId>com.github.umjammer</groupId>
@@ -255,12 +255,6 @@
255255
<version>2.1.3</version>
256256
<scope>test</scope>
257257
</dependency>
258-
<dependency>
259-
<groupId>commons-logging</groupId>
260-
<artifactId>commons-logging</artifactId>
261-
<version>1.2</version>
262-
<scope>test</scope>
263-
</dependency>
264258

265259
<dependency>
266260
<groupId>org.junit.jupiter</groupId>

src/main/java/vavi/awt/image/ico/ACON.java

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88

99
import java.io.IOException;
1010
import java.io.InputStream;
11+
import java.util.logging.Level;
1112

1213
import vavi.io.LittleEndianDataInputStream;
14+
import vavi.util.Debug;
1315
import vavi.util.win32.Chunk;
1416
import vavi.util.win32.RIFF;
1517

@@ -35,11 +37,6 @@ public static String getExtention() {
3537
return "ani";
3638
}
3739

38-
/** for debug */
39-
protected void printData() {
40-
System.err.println("---- data ----");
41-
}
42-
4340
/** */
4441
private anih header;
4542

@@ -87,30 +84,23 @@ protected void printData() {
8784

8885
/** */
8986
public class anih extends Chunk {
87+
9088
/** */
9189
int size;
92-
9390
/** */
9491
int frames;
95-
9692
/** */
9793
int steps;
98-
9994
/** */
10095
int x;
101-
10296
/** */
10397
int y;
104-
10598
/** */
10699
int bits;
107-
108100
/** */
109101
int plains;
110-
111102
/** */
112103
int jifrate;
113-
114104
/** */
115105
int flags;
116106

@@ -128,23 +118,23 @@ public void setData(InputStream is) throws IOException {
128118
plains = ledis.readInt();
129119
jifrate = ledis.readInt();
130120
flags = ledis.readInt();
131-
printData();
121+
Debug.println(Level.FINE, this);
132122
icons = new WindowsIcon[frames];
133123
count = 0;
134124

135125
header = this;
136126
}
137127

138-
protected void printData() {
139-
System.err.println("size: " + size);
140-
System.err.println("frames: " + frames);
141-
System.err.println("steps: " + steps);
142-
System.err.println("x: " + x);
143-
System.err.println("y: " + y);
144-
System.err.println("bits: " + bits);
145-
System.err.println("plains: " + plains);
146-
System.err.println("jifrate: " + jifrate);
147-
System.err.println("flags: " + flags);
128+
@Override public String toString() {
129+
return "size: " + size
130+
+ "frames: " + frames
131+
+ "steps: " + steps
132+
+ "x: " + x
133+
+ "y: " + y
134+
+ "bits: " + bits
135+
+ "plains: " + plains
136+
+ "jifrate: " + jifrate
137+
+ "flags: " + flags;
148138
}
149139
}
150140

src/test/java/vavi/awt/image/bmp/ACONTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.junit.jupiter.api.Test;
1616

1717
import vavi.awt.image.ico.ACON;
18+
import vavi.util.Debug;
1819

1920

2021
/**
@@ -29,7 +30,7 @@ class ACONTest {
2930
void test() throws Exception {
3031
InputStream is = new BufferedInputStream(ACON.class.getResourceAsStream("/test.ico"));
3132
ACON ani = ACON.readFrom(is, ACON.class);
32-
System.err.println("ACON: " + ani);
33+
Debug.println("ACON: " + ani);
3334
}
3435

3536
// ----
@@ -38,7 +39,7 @@ void test() throws Exception {
3839
public static void main(String[] args) throws Exception {
3940
InputStream is = new BufferedInputStream(Files.newInputStream(Paths.get(args[0])));
4041
ACON ani = ACON.readFrom(is, ACON.class);
41-
System.err.println("ACON: " + ani);
42+
Debug.println("ACON: " + ani);
4243
}
4344
}
4445

src/test/resources/logging.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ java.util.logging.ConsoleHandler.formatter=vavi.util.logging.VaviFormatter
77
#sun.awt.level=INFO
88
#sun.lwawt.level=INFO
99
#javax.swing.level=INFO
10-
vavi.util.level=FINE
10+
#vavi.util.level=FINE

0 commit comments

Comments
 (0)