You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/03/20 19:07:21 UTC

[GitHub] [netbeans] errael commented on a change in pull request #2037: Ignore module-info.java if on jdk1.8 or earlier.

errael commented on a change in pull request #2037: Ignore module-info.java if on jdk1.8 or earlier.
URL: https://github.com/apache/netbeans/pull/2037#discussion_r395838686
 
 

 ##########
 File path: java/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ModuleClassPaths.java
 ##########
 @@ -786,6 +787,12 @@ private static boolean hasModuleInfo(@NonNull final File file) {
                             newModuleInfos.add(moduleInfo);
                             if (found == null) {
                                 found = FileUtil.toFileObject(moduleInfo);
+                                if (found != null) {
+                                    String sourceLevel = SourceLevelQuery.getSourceLevel(found);
+                                    if (sourceLevel != null && sourceLevel.startsWith("1.")) { //NOI18N
+                                        found = null;
 
 Review comment:
   I have successfully run the test on JDK8 using the command you show.
   But for JDK11 my setup must have problems. I get lots of the following errors (many more of the 2nd)
   ```
       [junit] SEVERE: null
       [junit] java.io.IOException: Do not know where to store build.properties; must set netbeans.user!
   ```
   and
   ```
       [junit] Testcase: testPatchModuleWithDuplicates(org.netbeans.modules.java.api.common.classpath.ModuleClassPathsTest):   Caused an ERROR
       [junit] class "com.sun.tools.javac.code.Scope$WriteableScope"'s signer information does not match signer information of other classes in the same package
       [junit] java.lang.SecurityException: class "com.sun.tools.javac.code.Scope$WriteableScope"'s signer information does not match signer information of other classes in the same package
       [junit]     at java.base/java.lang.ClassLoader.checkCerts(ClassLoader.java:1150)
       [junit]     at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:905)
   ```
   I guessed it wanted a pointer to a userdir (there is a build.properties in there), so I tried the userdir I use when I run the repo build. I did both
   `-Dnetbeans.user=C:/.../userdir` on the command line and `netbeans.user=C:/.../userdir` in user.build.properties. Neither worked.
   
   For the time being I'm assuming the signature errors are because of netbeans.user not set. If that's not the case, that's the next hurdle.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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