shivam71 commented on code in PR #7893:
URL: https://github.com/apache/netbeans/pull/7893#discussion_r2079562194


##########
java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/LspTemplateUI.java:
##########
@@ -215,12 +238,14 @@ public CompletionStage<Pair<DataFolder,String>> 
apply(String path) {
                     }
                     targetPath.getParentFile().mkdirs();
                     FileObject fo = 
FileUtil.toFileObject(targetPath.getParentFile());
-                    if (fo == null || !fo.isFolder()) {
+                    if (fo == null || !fo.isFolder() || 
!targetPath.getParentFile().canWrite() || 
!SourceVersion.isName(targetPath.getName())) {

Review Comment:
   Hmm, I checked further it seems that this is already being handled  now . So 
 even if the user types project name which is invalid it is not used and class 
named as `App` for Maven and Gradle projects . So I have removed this check.



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