Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberpwnn committed Sep 28, 2021
1 parent 4cc4366 commit 5b4ae51
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 139 deletions.

This file was deleted.

This file was deleted.

20 changes: 1 addition & 19 deletions src/main/java/Amulet/extensions/java/lang/Object/XObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,15 @@

package Amulet.extensions.java.lang.Object;

import art.arcane.amulet.io.Writable;
import art.arcane.amulet.logging.LogListener;
import com.google.gson.Gson;
import manifold.ext.rt.api.Extension;
import manifold.ext.rt.api.This;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.logging.LogManager;

@Extension
public abstract class XObject implements Writable {
public abstract class XObject {
private static final Gson gson = new Gson();


public static void writeData(@This Object o, DataOutputStream dos) throws IOException
{
dos.writeUTF(o.getClass().getCanonicalName());
dos.writeUTF(o.toJson());
}

public static void readData(@This Object o, DataInputStream din) throws IOException
{
throw new UnsupportedOperationException();
}

public static String toJson(@This Object o) {
return gson.toJson(o);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/Amulet/extensions/java/util/Map/XMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public static <K, V> WeakHashMap<K, V> weak()
}

@Extension
public static <K, V> IdentityHashMap<K, V> identity()
public static <K, V> IdentityHashMap<K, V> identityHash()
{
return new IdentityHashMap<>();
}
Expand Down
49 changes: 0 additions & 49 deletions src/main/java/art/arcane/amulet/io/Writable.java

This file was deleted.

0 comments on commit 5b4ae51

Please sign in to comment.