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/09/14 19:34:16 UTC
[GitHub] [netbeans] lkishalmi opened a new pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
lkishalmi opened a new pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369
This reverts commit #2337 814184b7077c77216e70e05685973687a5f817be, reversing
changes made to 6408fe154baceaafc437f99f1fd4dcbaccf99479.
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] matthiasblaesing commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692607027
The build failure in the unittest can be explained by https://github.com/apache/netbeans/commit/eba3ee243620628c58e7c69710d8b1b9642fc02c and https://github.com/apache/netbeans/commit/eff3db303db7ca8cb599df834d7e47f99bcf3bd4.
@lkishalmi could you please rebase this PR onto latest merges to master?
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] dukescript commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
dukescript commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692684658
> @mcdonnell-john I was able to reproduce your problem. It happes if the build JDK and the target JDK are not the same. I had this in my ".nbbuild.properties":
>
> ```
> #permit.jdk9.builds=true
> nbjdk.home=/home/matthias/bin/jdk-8
> ```
Please accept an apology for not spotting the problem sooner: #2371
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] lkishalmi commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
lkishalmi commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692272595
@matthiasblaesing as an agreement with the rollback, would you be kind to merge this. We might wait for the CI to pass, that's your call.
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] lkishalmi commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
lkishalmi commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692766455
"Rebased" on the current master.
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] matthiasblaesing commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692279579
@lkishalmi while I agree with the revert, I'm not happy that I'm asked to merge this. I have too much involvement, so it would be better if another person would do it.
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] mcdonnell-john commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
mcdonnell-john commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692314959
Hi @lkishalmi
I managed to build this PR on JDK 8, but on JDK 11 there was the following error:
```
-do-compile:
[nb-javac] Compiling 7 source files to /Users/john/codebase/netbeans/platform/applemenu/build/classes
[repeat] warning: [path] bad path element "/Users/john/codebase/netbeans/platform/applemenu/build/desktop-classes-classes": no such file or directory
[repeat] warning: [options] source value 6 is obsolete and will be removed in a future release
[repeat] warning: [options] target value 1.6 is obsolete and will be removed in a future release
[repeat] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:22: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.AboutEvent;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:23: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.AboutHandler;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:24: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.OpenFilesEvent;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:25: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.OpenFilesHandler;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:26: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.PreferencesEvent;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:27: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.PreferencesHandler;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:28: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.QuitEvent;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:29: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.QuitHandler;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:30: error: package java.awt.desktop does not exist
[repeat] import java.awt.desktop.QuitResponse;
[repeat] ^
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:40: error: cannot find symbol
[repeat] public class NbApplicationAdapterJDK9 extends NbApplicationAdapter implements AboutHandler, OpenFilesHandler, PreferencesHandler, QuitHandler {
[repeat] ^
[repeat] symbol: class AboutHandler
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:40: error: cannot find symbol
[repeat] public class NbApplicationAdapterJDK9 extends NbApplicationAdapter implements AboutHandler, OpenFilesHandler, PreferencesHandler, QuitHandler {
[repeat] ^
[repeat] symbol: class OpenFilesHandler
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:40: error: cannot find symbol
[repeat] public class NbApplicationAdapterJDK9 extends NbApplicationAdapter implements AboutHandler, OpenFilesHandler, PreferencesHandler, QuitHandler {
[repeat] ^
[repeat] symbol: class PreferencesHandler
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:40: error: cannot find symbol
[repeat] public class NbApplicationAdapterJDK9 extends NbApplicationAdapter implements AboutHandler, OpenFilesHandler, PreferencesHandler, QuitHandler {
[repeat] ^
[repeat] symbol: class QuitHandler
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:68: error: cannot find symbol
[repeat] public void handleAbout(AboutEvent e) {
[repeat] ^
[repeat] symbol: class AboutEvent
[repeat] location: class NbApplicationAdapterJDK9
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:73: error: cannot find symbol
[repeat] public void openFiles(OpenFilesEvent e) {
[repeat] ^
[repeat] symbol: class OpenFilesEvent
[repeat] location: class NbApplicationAdapterJDK9
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:78: error: cannot find symbol
[repeat] public void handlePreferences(PreferencesEvent e) {
[repeat] ^
[repeat] symbol: class PreferencesEvent
[repeat] location: class NbApplicationAdapterJDK9
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:83: error: cannot find symbol
[repeat] public void handleQuitRequestWith(QuitEvent e, QuitResponse response) {
[repeat] ^
[repeat] symbol: class QuitEvent
[repeat] location: class NbApplicationAdapterJDK9
[repeat] /Users/john/codebase/netbeans/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java:83: error: cannot find symbol
[repeat] public void handleQuitRequestWith(QuitEvent e, QuitResponse response) {
[repeat] ^
[repeat] symbol: class QuitResponse
[repeat] location: class NbApplicationAdapterJDK9
[repeat] 18 errors
[repeat] 4 warnings
[nbmerge] Failed to build target: all-applemenu
```
Could there be something else to revert here?
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] lkishalmi merged pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
lkishalmi merged pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] matthiasblaesing commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692499846
@mcdonnell-john I was able to reproduce your problem. It happes if the build JDK and the target JDK are not the same. I had this in my ".nbbuild.properties":
```
#permit.jdk9.builds=true
nbjdk.home=/home/matthias/bin/jdk-8
```
This will lead to ant finding the desktop classes, while in the compile run they are not present. I switched that back to my normal setting:
```
permit.jdk9.builds=true
#nbjdk.home=/home/matthias/bin/jdk-8
```
And can now compile the platform cluster cleanly. I checked against 12.1 branch and the problem can be reproduced/fixed there identically. Please see if that helps.
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] mcdonnell-john commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
mcdonnell-john commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692510553
Thanks @matthiasblaesing I'll check when I get home.
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] lkishalmi commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
lkishalmi commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692272963
For the records the PR was prepared by issuing:
```
git revert -m 2 814184b
```
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] mcdonnell-john commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
mcdonnell-john commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692748238
No worries @dukescript
----------------------------------------------------------------
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
---------------------------------------------------------------------
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
[GitHub] [netbeans] jtulach commented on pull request #2369: Revert "Merge remote-tracking branch 'apache/master' into ModernCode"
Posted by GitBox <gi...@apache.org>.
jtulach commented on pull request #2369:
URL: https://github.com/apache/netbeans/pull/2369#issuecomment-692466389
-0.5 - I disagree, but go on if you want. I'd rather see the whole NetBeans codebase be compiled using this style as it opens tremendous possibilities. E.g. something like:
```diff
diff --git a/enterprise/glassfish.common/nbproject/project.properties b/enterprise/glassfish.common/nbproject/project.properties
index d30ade68f0..8fce85b95a 100644
--- a/enterprise/glassfish.common/nbproject/project.properties
+++ b/enterprise/glassfish.common/nbproject/project.properties
@@ -17,6 +17,7 @@
javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.7
+javac.target=1.8
test.config.stableBTD.includes=**/*Test.class
test.config.stableBTD.excludes=\
diff --git a/enterprise/tomcat5/nbproject/project.properties b/enterprise/tomcat5/nbproject/project.properties
index db530fad4f..7fee9c2a9f 100644
--- a/enterprise/tomcat5/nbproject/project.properties
+++ b/enterprise/tomcat5/nbproject/project.properties
@@ -16,6 +16,7 @@
# under the License.
javac.source=1.7
+javac.target=1.8
javahelp.base=org/netbeans/modules/tomcat5/docs
javahelp.hs=tomcat.hs
diff --git a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManagerImpl.java b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManagerImpl.java
index 4411b85c05..dd29e3a1bf 100644
--- a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManagerImpl.java
+++ b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/deploy/TomcatManagerImpl.java
@@ -19,7 +19,6 @@
package org.netbeans.modules.tomcat5.deploy;
-import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import org.netbeans.modules.tomcat5.deploy.TomcatManager;
import java.net.HttpURLConnection;
import java.net.URL;
@@ -48,6 +47,7 @@ import org.openide.util.RequestProcessor;
import org.openide.util.NbBundle;
import java.io.*;
import java.net.Proxy;
+import java.util.Base64;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.netbeans.modules.tomcat5.AuthorizationException;
@@ -530,7 +530,7 @@ public class TomcatManagerImpl implements ProgressObject, Runnable {
// Set up an authorization header with our credentials
TomcatProperties tp = tm.getTomcatProperties();
String input = tp.getUsername () + ":" + tp.getPassword ();
- String auth = new String(Base64.encode(input.getBytes()));
+ String auth = new String(Base64.getEncoder().encode(input.getBytes()));
hconn.setRequestProperty("Authorization", // NOI18N
"Basic " + auth); // NOI18N
diff --git a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatInstallUtil.java b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatInstallUtil.java
index 392ee60848..cab5e99413 100644
--- a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatInstallUtil.java
+++ b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatInstallUtil.java
@@ -25,8 +25,6 @@
package org.netbeans.modules.tomcat5.util;
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
import java.io.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -48,6 +46,7 @@ import org.openide.modules.InstalledFileLocator;
import org.openide.util.EditableProperties;
import org.openide.util.Exceptions;
import org.openide.util.NbBundle;
+import org.openide.xml.XMLUtil;
/**
@@ -160,32 +159,20 @@ public class TomcatInstallUtil {
* this method uses org.apache.xml.serialize.XMLSerializer class for printing XML file
*/
public static String getDocumentText(Document doc) {
- OutputFormat format = new OutputFormat ();
- format.setPreserveSpace (true);
- StringWriter sw = new StringWriter();
org.w3c.dom.Element rootElement = doc.getDocumentElement();
if (rootElement==null) {
return null;
}
try {
- XMLSerializer ser = new XMLSerializer (sw, format);
- ser.serialize (rootElement);
- // Apache serializer also fails to include trailing newline, sigh.
- sw.write('\n');
- return sw.toString();
- }catch(IOException ex) {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ XMLUtil.write(doc, out, "UTF-8");
+ out.write('\n');
+ return out.toString("UTF-8");
+ } catch(IOException ex) {
System.out.println("ex="+ex);
//ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
return rootElement.toString();
}
- finally {
- try {
- sw.close();
- } catch(IOException ex) {
- System.out.println("ex="+ex);
- //ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
- }
- }
}
public static void updateDocument(final javax.swing.text.Document doc,
diff --git a/java/java.freeform/nbproject/project.properties b/java/java.freeform/nbproject/project.properties
index 081fa47bf3..797da1f39e 100644
--- a/java/java.freeform/nbproject/project.properties
+++ b/java/java.freeform/nbproject/project.properties
@@ -17,6 +17,7 @@
javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.7
+javac.target=1.8
javadoc.arch=${basedir}/arch.xml
javadoc.apichanges=${basedir}/apichanges.xml
diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java b/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
index 176a2036d3..5ce0811d2c 100644
--- a/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
+++ b/nbbuild/antsrc/org/netbeans/nbbuild/CustomJavac.java
@@ -105,18 +105,26 @@ public class CustomJavac extends Javac {
log("Warning: could not create " + generatedClassesDir, Project.MSG_WARN);
}
- int src = intVersion(getSource());
- int trgt = intVersion(getTarget());
+ int srcVersion = intVersion(getSource());
+ int targetVersion = intVersion(getTarget());
- if (src > trgt && this.backportingCompiler != null && this.backportingCompiler.isFile()) {
+ if (this.backportingCompiler != null && this.backportingCompiler.isFile()) {
try {
+ if (targetVersion < 7) {
+ setTarget("1.7");
+ }
+ if (srcVersion < 7) {
+ setSource("1.7");
+ }
Class<?> mainClazz = findMainCompilerClass(this.backportingCompiler);
super.add(new Javac13() {
@Override
public boolean execute() throws BuildException {
attributes.log("Using modern compiler", Project.MSG_VERBOSE);
Commandline cmd = setupModernJavacCommand();
- cmd.addArguments(new String[] { "--enable-safe-preview" });
+ if (srcVersion == 14) {
+ cmd.addArguments(new String[] { "--enable-safe-preview" });
+ }
// Use reflection to be able to build on all JDKs >= 1.1:
try {
@@ -273,10 +281,11 @@ public class CustomJavac extends Javac {
private static Reference<Class<?>> mainCompilerClass;
private static synchronized Class<?> findMainCompilerClass(File jar) throws MalformedURLException, ClassNotFoundException {
Class<?> c = mainCompilerClass == null ? null : mainCompilerClass.get();
-
- URLClassLoader loader = new URLClassLoader(new URL[] { jar.toURI().toURL() }, CustomJavac.class.getClassLoader());
- c = Class.forName("org.frgaal.Main", true, loader);
- mainCompilerClass = new SoftReference<>(c);
+ if (c == null) {
+ URLClassLoader loader = new URLClassLoader(new URL[] { jar.toURI().toURL() }, CustomJavac.class.getClassLoader());
+ c = Class.forName("org.frgaal.Main", true, loader);
+ mainCompilerClass = new SoftReference<>(c);
+ }
return c;
}
diff --git a/nbbuild/cluster.properties b/nbbuild/cluster.properties
index 88a249d1e1..48117c8c88 100644
--- a/nbbuild/cluster.properties
+++ b/nbbuild/cluster.properties
@@ -284,7 +284,6 @@ nb.cluster.platform=\
openide.nodes,\
openide.options,\
openide.text,\
- openide.util.enumerations,\
openide.util.ui.svg,\
openide.windows,\
options.api,\
diff --git a/platform/core.windows/src/org/netbeans/core/windows/view/ui/WindowSnapper.java b/platform/core.windows/src/org/netbeans/core/windows/view/ui/WindowSnapper.java
index 23c312ef00..60b53bfe43 100644
--- a/platform/core.windows/src/org/netbeans/core/windows/view/ui/WindowSnapper.java
+++ b/platform/core.windows/src/org/netbeans/core/windows/view/ui/WindowSnapper.java
@@ -27,7 +27,6 @@ import java.awt.PointerInfo;
import java.awt.Rectangle;
import java.awt.Robot;
import org.netbeans.core.windows.options.WinSysPrefs;
-import sun.font.GraphicComponent;
/**
*
diff --git a/profiler/debugger.jpda.heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/HeapImpl.java b/profiler/debugger.jpda.heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/HeapImpl.java
index 5629340a7a..ce1a448cf0 100644
--- a/profiler/debugger.jpda.heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/HeapImpl.java
+++ b/profiler/debugger.jpda.heapwalk/src/org/netbeans/modules/debugger/jpda/heapwalk/HeapImpl.java
@@ -197,6 +197,11 @@ public class HeapImpl implements Heap {
if (hasNext()) return instIt.next();
throw new NoSuchElementException();
}
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
}
private static final class DebuggerHeapSummary implements HeapSummary {
diff --git a/profiler/lib.profiler/nbproject/project.properties b/profiler/lib.profiler/nbproject/project.properties
index b6065129e4..004743ff0a 100644
--- a/profiler/lib.profiler/nbproject/project.properties
+++ b/profiler/lib.profiler/nbproject/project.properties
@@ -46,3 +46,4 @@ nbm.executable.files=\
remote-pack-defs/*.sh
javac.source=1.7
+javac.target=1.7
diff --git a/profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/ClassDump.java b/profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/ClassDump.java
index 447c228ec2..7f781474b4 100644
--- a/profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/ClassDump.java
+++ b/profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/ClassDump.java
@@ -511,6 +511,11 @@ class ClassDump extends HprofObject implements JavaClass {
}
throw new NoSuchElementException();
}
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
}
//---- Serialization support
diff --git a/profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/HprofHeap.java b/profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/HprofHeap.java
index ed118b0493..b857ee74d8 100644
--- a/profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/HprofHeap.java
+++ b/profiler/lib.profiler/src/org/netbeans/lib/profiler/heap/HprofHeap.java
@@ -245,6 +245,11 @@ class HprofHeap implements Heap {
}
throw new NoSuchElementException();
}
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
}
public Iterator getAllInstancesIterator() {
diff --git a/profiler/lib.profiler/test/unit/src/org/netbeans/lib/profiler/results/cpu/StackTraceSnapshotBuilderTest.java b/profiler/lib.profiler/test/unit/src/org/netbeans/lib/profiler/results/cpu/StackTraceSnapshotBuilderTest.java
index 1824f94f74..2f060c1e66 100644
--- a/profiler/lib.profiler/test/unit/src/org/netbeans/lib/profiler/results/cpu/StackTraceSnapshotBuilderTest.java
+++ b/profiler/lib.profiler/test/unit/src/org/netbeans/lib/profiler/results/cpu/StackTraceSnapshotBuilderTest.java
@@ -25,6 +25,7 @@ import java.lang.management.ThreadMXBean;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
import java.util.Collections;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -35,7 +36,6 @@ import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.netbeans.lib.profiler.results.CCTNode;
-import sun.management.ThreadInfoCompositeData;
import static org.junit.Assert.*;
@@ -799,13 +799,20 @@ public class StackTraceSnapshotBuilderTest {
}
private void addStacktrace(java.lang.management.ThreadInfo[] tinfos, long time) {
- java.lang.management.ThreadInfo[] newInfo = new java.lang.management.ThreadInfo[tinfos.length];
- int i = 0;
-
- for (java.lang.management.ThreadInfo tinfo : tinfos) {
- CompositeData aaa = ThreadInfoCompositeData.toCompositeData(tinfo);
- newInfo[i++] = ThreadInfo.from(aaa);
+ try {
+ java.lang.management.ThreadInfo[] newInfo = new java.lang.management.ThreadInfo[tinfos.length];
+ int i = 0;
+
+ Class<?> ThreadInfoCompositeData = Class.forName("sun.management.ThreadInfoCompositeData");
+ Method toCompositeData = ThreadInfoCompositeData.getMethod("toCompositeData", java.lang.management.ThreadInfo.class);
+
+ for (java.lang.management.ThreadInfo tinfo : tinfos) {
+ CompositeData aaa = (CompositeData) toCompositeData.invoke(null, tinfo);
+ newInfo[i++] = ThreadInfo.from(aaa);
+ }
+ instance.addStacktrace(newInfo, time);
+ } catch (ReflectiveOperationException ex) {
+ throw new IllegalStateException(ex);
}
- instance.addStacktrace(newInfo, time);
}
}
diff --git a/webcommon/netserver/nbproject/project.properties b/webcommon/netserver/nbproject/project.properties
index 6de45e155d..1c75672f69 100644
--- a/webcommon/netserver/nbproject/project.properties
+++ b/webcommon/netserver/nbproject/project.properties
@@ -15,5 +15,6 @@
# specific language governing permissions and limitations
# under the License.
is.autoload=true
-javac.source=1.6
+javac.source=1.8
+javac.target=1.8
javac.compilerargs=-Xlint -Xlint:-serial
```
CCing @dukescript and thanks for your work!
----------------------------------------------------------------
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
---------------------------------------------------------------------
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