| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Coverage decreased (-0.3%) to 79.237% when pulling a2c0172 on qistoph:master into 1dc4427 on tcalmant:master. |
Sorry, something went wrong.
|
Thank you for your contribution 👍 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR adds support for instances of
Test cases created with:
import java.io.FileOutputStream; import java.io.ObjectOutputStream; import java.util.HashMap; public class Creator { public static void main(String[] args) throws Exception { HashMap hm1 = new HashMap(); hm1.put("key1", "value1"); hm1.put("key2", "value2"); hm1.put("int", 9); hm1.put("ing2", new Integer(10)); hm1.put("bool", true); hm1.put("bool2", new Boolean(true)); FileOutputStream fs = new FileOutputStream("hashmap-1.ser"); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(hm1); os.close(); HashMap hm2 = new HashMap(); hm2.put("key1", hm1); fs = new FileOutputStream("hashmap-2.ser"); os = new ObjectOutputStream(fs); os.writeObject(hm2); os.close(); } }Tested with:
#!/usr/bin/python3 import sys import logging logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) import javaobj #filename = 'creator/hashmap-1.ser' filename = 'creator/hashmap-2.ser' with open(filename, 'rb') as fd: jobj = fd.read() pobj = javaobj.loads(jobj) print(pobj)