Skip to content

Commit 9dfc905

Browse files
hansonrhansonr
authored andcommitted
better error reporting; better &j2strace=xxxx
row sorting, JDesktopIconUI
1 parent 16f4314 commit 9dfc905

File tree

8 files changed

+6178
-6113
lines changed

8 files changed

+6178
-6113
lines changed
-86.2 KB
Binary file not shown.

sources/net.sf.j2s.java.core/src/java/awt/datatransfer/DataFlavor.java

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
import java.io.IOException;
3535
import java.io.InputStream;
3636
import java.io.InputStreamReader;
37-
import java.io.ObjectInput;
38-
import java.io.ObjectOutput;
37+
//import java.io.ObjectInput;
38+
//import java.io.ObjectOutput;
3939
import java.io.OptionalDataException;
4040
import java.io.Reader;
4141
import java.io.StringReader;
@@ -112,9 +112,9 @@
112112
* @author Jeff Dunn
113113
*/
114114
@SuppressWarnings({ "rawtypes", "unchecked" })
115-
public class DataFlavor implements Externalizable, Cloneable {
115+
public class DataFlavor implements /*Externalizable,*/ Cloneable {
116116

117-
private static final long serialVersionUID = 8367026044764648243L;
117+
// private static final long serialVersionUID = 8367026044764648243L;
118118
private static final Class ioInputStreamClass = java.io.InputStream.class;
119119

120120
/**
@@ -1304,52 +1304,52 @@ public boolean isFlavorTextType() {
13041304
return (DataTransferer.isFlavorCharsetTextType(this) || DataTransferer.isFlavorNoncharsetTextType(this));
13051305
}
13061306

1307-
/**
1308-
* Serializes this <code>DataFlavor</code>.
1309-
*/
1310-
1311-
public synchronized void writeExternal(ObjectOutput os) throws IOException {
1312-
if (mimeType != null) {
1313-
mimeType.setParameter("humanPresentableName", humanPresentableName);
1314-
os.writeObject(mimeType);
1315-
mimeType.removeParameter("humanPresentableName");
1316-
} else {
1317-
os.writeObject(null);
1318-
}
1319-
1320-
os.writeObject(representationClass);
1321-
}
1322-
1323-
/**
1324-
* Restores this <code>DataFlavor</code> from a Serialized state.
1325-
*/
1326-
1327-
public synchronized void readExternal(ObjectInput is) throws IOException, ClassNotFoundException {
1328-
String rcn = null;
1329-
mimeType = (MimeType) is.readObject();
1330-
1331-
if (mimeType != null) {
1332-
humanPresentableName = mimeType.getParameter("humanPresentableName");
1333-
mimeType.removeParameter("humanPresentableName");
1334-
rcn = mimeType.getParameter("class");
1335-
if (rcn == null) {
1336-
throw new IOException("no class parameter specified in: " + mimeType);
1337-
}
1338-
}
1339-
1340-
try {
1341-
representationClass = (Class) is.readObject();
1342-
} catch (OptionalDataException ode) {
1343-
if (!ode.eof || ode.length != 0) {
1344-
throw ode;
1345-
}
1346-
// Ensure backward compatibility.
1347-
// Old versions didn't write the representation class to the stream.
1348-
if (rcn != null) {
1349-
representationClass = DataFlavor.tryToLoadClass(rcn, getClass().getClassLoader());
1350-
}
1351-
}
1352-
}
1307+
// /**
1308+
// * Serializes this <code>DataFlavor</code>.
1309+
// */
1310+
//
1311+
// public synchronized void writeExternal(ObjectOutput os) throws IOException {
1312+
// if (mimeType != null) {
1313+
// mimeType.setParameter("humanPresentableName", humanPresentableName);
1314+
// os.writeObject(mimeType);
1315+
// mimeType.removeParameter("humanPresentableName");
1316+
// } else {
1317+
// os.writeObject(null);
1318+
// }
1319+
//
1320+
// os.writeObject(representationClass);
1321+
// }
1322+
//
1323+
// /**
1324+
// * Restores this <code>DataFlavor</code> from a Serialized state.
1325+
// */
1326+
//
1327+
// public synchronized void readExternal(ObjectInput is) throws IOException, ClassNotFoundException {
1328+
// String rcn = null;
1329+
// mimeType = (MimeType) is.readObject();
1330+
//
1331+
// if (mimeType != null) {
1332+
// humanPresentableName = mimeType.getParameter("humanPresentableName");
1333+
// mimeType.removeParameter("humanPresentableName");
1334+
// rcn = mimeType.getParameter("class");
1335+
// if (rcn == null) {
1336+
// throw new IOException("no class parameter specified in: " + mimeType);
1337+
// }
1338+
// }
1339+
//
1340+
// try {
1341+
// representationClass = (Class) is.readObject();
1342+
// } catch (OptionalDataException ode) {
1343+
// if (!ode.eof || ode.length != 0) {
1344+
// throw ode;
1345+
// }
1346+
// // Ensure backward compatibility.
1347+
// // Old versions didn't write the representation class to the stream.
1348+
// if (rcn != null) {
1349+
// representationClass = DataFlavor.tryToLoadClass(rcn, getClass().getClassLoader());
1350+
// }
1351+
// }
1352+
// }
13531353

13541354
/**
13551355
* Returns a clone of this <code>DataFlavor</code>.

0 commit comments

Comments
 (0)