Uploaded image for project: 'JBoss VFS'
  1. JBoss VFS
  2. JBVFS-17

NestedJarFromStream serialization contract is incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Beta10
    • 2.0.0.Beta9
    • None
    • None

      The serialization of the NestedJarFromStream is incorrect. Its using default serialization of these fields:

      private transient ZipInputStream zis;
      private URL jarURL;
      private URL entryURL;
      private long lastModified;
      private long size;
      private AtomicBoolean inited = new AtomicBoolean(false);

      The problem is that the inited flag should not be serialized as this implies its parents fields:

      private transient List<VirtualFileHandler> entries;
      private transient Map<String, VirtualFileHandler> entryMap;

      have been initialized. They will not be after deserialization of NestedJarFromStream as it lazily does initialization.

            starksm64 Scott Stark (Inactive)
            starksm64 Scott Stark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: