neilcsmith-net commented on code in PR #9258:
URL: https://github.com/apache/netbeans/pull/9258#discussion_r2917762876


##########
java/java.source.base/test/unit/src/org/netbeans/modules/java/source/save/FormatingTest.java:
##########
@@ -6331,6 +6331,46 @@ public void testForVar2() throws Exception {
         JavaSourceTest.SourceLevelQueryImpl.sourceLevel = oldLevel;
     }
 
+    public void testForVarUnnamed() throws Exception {
+        testFile = new File(getWorkDir(), "Test.java");
+        TestUtilities.copyStringToFile(testFile, "");
+        FileObject testSourceFO = FileUtil.toFileObject(testFile);
+        DataObject testSourceDO = DataObject.find(testSourceFO);
+        EditorCookie ec = (EditorCookie) 
testSourceDO.getCookie(EditorCookie.class);
+        String oldLevel = JavaSourceTest.SourceLevelQueryImpl.sourceLevel;
+        JavaSourceTest.SourceLevelQueryImpl.sourceLevel = "22";
+        final Document doc = ec.openDocument();
+        doc.putProperty(Language.class, JavaTokenId.language());
+        String content
+                = "package hierbas.del.litoral;\n\n"
+                + "public class Test {\n\n"

Review Comment:
   Probably.  This was mostly copy-pasta for now, but will update if it ends up 
testing anything useful!



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