mbien commented on code in PR #9307:
URL: https://github.com/apache/netbeans/pull/9307#discussion_r3034565669


##########
platform/core.startup/src/org/netbeans/core/startup/ModuleList.java:
##########
@@ -661,14 +680,23 @@ public void cacheReady() {
 
     @Override
     public void flushCaches(DataOutputStream os) throws IOException {
-        ObjectOutputStream oss = new ObjectOutputStream(os);
         for (Module m : mgr.getModules()) {
             if (m.isFixed()) {
                 continue;
             }
-            Map<String, Object> prop = computeProperties(m);
-            writeStatus(prop, oss);
-            oss.writeObject(m.getDependencies());
+            // props
+            String list = computeProperties(m).entrySet()
+                    .stream()
+                    .map(e -> e.getKey() + "=" + e.getValue())
+                    .collect(Collectors.joining(","));

Review Comment:
   yes but can this happen? The set of keys is restricted to (see `readProps`):
   ```java
                       case "name", "jar" -> entry[1];
                       case "enabled", "autoload", "eager", "reloadable" -> 
Boolean.valueOf(entry[1]);
                       case "startlevel" -> Integer.valueOf(entry[1]);
                       default -> throw new IOException("unknown key " + 
entry[0]);
   ```
   the first two are String values, the rest are primitives.
   
   This does not cache all properties, only a very limited set. (this was 
already done before this change)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to