mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-30 10:36:41 +00:00
Fixed Java warnings.
This commit is contained in:
@ -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");
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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() {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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!
|
||||
|
Reference in New Issue
Block a user