Fixed Java warnings.

This commit is contained in:
sk89q
2010-12-29 23:15:53 -08:00
parent 687260801f
commit 912468f8a1
29 changed files with 57 additions and 46 deletions

View File

@ -236,7 +236,8 @@ public class Chunk {
* @return child tag
* @throws InvalidFormatException
*/
public static Tag getChildTag(Map<String,Tag> items, String key, Class expected)
public static Tag getChildTag(Map<String,Tag> items, String key,
Class<? extends Tag> expected)
throws InvalidFormatException {
if (!items.containsKey(key)) {
throw new InvalidFormatException("Missing a \"" + key + "\" tag");

View File

@ -24,6 +24,8 @@ package com.sk89q.worldedit.data;
* @author sk89q
*/
public class ChunkStoreException extends DataException {
private static final long serialVersionUID = 1483900743779953289L;
public ChunkStoreException(String msg) {
super(msg);
}

View File

@ -25,6 +25,8 @@ package com.sk89q.worldedit.data;
* @author sk89q
*/
public class DataException extends Exception {
private static final long serialVersionUID = 5806521052111023788L;
public DataException(String msg) {
super(msg);
}

View File

@ -24,6 +24,8 @@ package com.sk89q.worldedit.data;
* @author sk89q
*/
public class InvalidFormatException extends DataException {
private static final long serialVersionUID = -3401820540902726145L;
public InvalidFormatException(String msg) {
super(msg);
}

View File

@ -26,6 +26,8 @@ import com.sk89q.worldedit.Vector2D;
* @author sk89q
*/
public class MissingChunkException extends ChunkStoreException {
private static final long serialVersionUID = 8013715483709973489L;
private Vector2D pos;
public MissingChunkException() {

View File

@ -22,7 +22,6 @@ package com.sk89q.worldedit.data;
import de.schlichtherle.io.*;
import de.schlichtherle.io.File;
import de.schlichtherle.io.FileInputStream;
import de.schlichtherle.io.FileOutputStream;
import java.io.*;
/**
@ -150,7 +149,7 @@ public class TrueZipAlphaChunkStore extends NestedFileChunkStore {
@Override
public void close() throws IOException {
try {
path.umount();
File.umount(new File(path));
} catch (ArchiveException e) {
throw new IOException(e);
}

View File

@ -32,6 +32,7 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore {
/**
* ZIP file.
*/
@SuppressWarnings("unused")
private File zipFile;
/**
* Actual ZIP.
@ -105,7 +106,9 @@ public class ZippedAlphaChunkStore extends NestedFileChunkStore {
// So not there either...
if (testEntry == null) {
for (Enumeration e = zip.entries(); e.hasMoreElements(); ) {
for (Enumeration<? extends ZipEntry> e = zip.entries();
e.hasMoreElements(); ) {
testEntry = (ZipEntry)e.nextElement();
// Whoo, found level.dat!