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


##########
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:
   The problem with these ad-hoc encoding is, that they have the tendency to 
creep up later and hunt you when you least expect it.
   
   `name` currently is the codename base, at this point in time to my knowledge 
CNDs can't contain both, but that is not set into stone.
   
   Not sure that a naming convention for `jar` files is enforced for modules, 
but at its core it is a filename and that can hold both `,` and `=`.
   
   Why not reuse an approach you are already using: don't invent a new 
serialization, but write the number of key/value pairs to the stream and then 
the keys and values as pure strings. That way there is no need to consider 
"special" characters.



-- 
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