mbien commented on code in PR #75:
URL: https://github.com/apache/netbeans-tools/pull/75#discussion_r1938551993


##########
snap-packages/launchers/patch-netbeans-conf:
##########
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# If the user has a custom netbeans.conf. Disable Java Security Manager as of 
NetBeans 25
+if [ -f "$SNAP_USER_DATA/etc/netbeans.conf" ]; then
+    if ! grep -q '^netbeans_default_options=".*-J-Djava.lang.Runtime.level=' 
$SNAP_USER_DATA/etc/netbeans.conf ; then
+        sed -i 
's/netbeans_default_options="/netbeans_default_options="-J-Djava.lang.Runtime.level=FINE
 /' $SNAP_USER_DATA/etc/netbeans.conf
+    fi
+    if ! grep -q 
'^netbeans_default_options=".*-J-DTopSecurityManager.disable=' 
$SNAP_USER_DATA/etc/netbeans.conf ; then
+        sed -i 
's/netbeans_default_options="/netbeans_default_options="-J-DTopSecurityManager.disable=true
 /' $SNAP_USER_DATA/etc/netbeans.conf
+    fi
+fi

Review Comment:
   will this run every time someone downloads a new release?
   
   NB 26 will likely remove `-J-DTopSecurityManager.disable=true` again as 
clean up. The flag would become a no-op (since the code would be gone) - so it 
is probably ok if it keeps getting added i suppose.



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