You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by bw...@apache.org on 2021/09/05 06:09:52 UTC

[netbeans] branch master updated: [NETBEANS-5976] - cleanup Integer deprecation warnings (#3154)

This is an automated email from the ASF dual-hosted git repository.

bwalker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new cfcb594  [NETBEANS-5976] - cleanup Integer deprecation warnings (#3154)
cfcb594 is described below

commit cfcb5948052f093b3aa713183d016cb459e81e9a
Author: Brad Walker <bw...@musings.com>
AuthorDate: Sun Sep 5 00:09:38 2021 -0600

    [NETBEANS-5976] - cleanup Integer deprecation warnings (#3154)
    
    In Java 9,
    
    new Integer()
    
    has been deprecated..
    
       [repeat] /home/bwalker/src/netbeans/nbi/engine/src/org/netbeans/installer/wizard/components/actions/InstallAction.java:183: warning: [deprecation] Integer(int) in Integer has been deprecated
       [repeat]                              new Integer(INSTALLATION_ERROR_CODE));
       [repeat]                              ^
    
    There are a LOT of these, so I'm staging the changes so they are more manageable. In addition, these
    changes do not change behavior for legacy Java runtime environments. But, in Java 9, and afterwards,
    these changes can provide a possible speedup..
---
 .../src/org/netbeans/jellytools/Bundle.java        |    2 +-
 .../org/netbeans/insane/impl/SmallObjectMap.java   |    2 +-
 .../org/netbeans/insane/impl/SmallObjectMap2.java  |    2 +-
 .../org/netbeans/insane/model/XmlHeapModel.java    |    2 +-
 .../src/org/netbeans/api/debugger/Properties.java  |    2 +-
 .../bugtracking/issuetable/NodeTableModel.java     |    4 +-
 .../bugtracking/ui/search/QuickSearchPopup.java    |    2 +-
 .../netbeans/modules/csl/core/CslEditorKit.java    |    2 +-
 .../css/editor/module/CssModuleSupport.java        |    2 +-
 .../db/dataview/output/DataViewTableUIModel.java   |    2 +-
 .../db/dataview/output/UpdatedRowContext.java      |   14 +-
 .../db/dataview/util/DBReadWriteHelper.java        |    2 +-
 .../db/sql/editor/SQLEditorProviderImpl.java       |    2 +-
 .../visualeditor/querybuilder/QueryBuilder.java    |    2 +-
 .../querybuilder/QueryBuilderGraphFrame.java       |    4 +-
 .../sql/visualeditor/ui/ConnectionStatusPanel.java |    2 +-
 .../netbeans/lib/ddl/adaptors/DefaultAdaptor.java  |   52 +-
 .../lib/ddl/adaptors/DefaultAdaptorBeanInfo.java   |    2 +-
 .../netbeans/lib/ddl/impl/DriverSpecification.java |    2 +-
 .../org/netbeans/lib/ddl/util/PListReader.java     |    2 +-
 .../modules/db/explorer/DatabaseConnector.java     |    8 +-
 .../db/explorer/DatabaseTypePropertyEditor.java    |    4 +-
 .../db/explorer/DriverExtendedDeleteImpl.java      |    2 +-
 .../modules/db/explorer/action/AddIndexAction.java |    2 +-
 .../db/explorer/dlg/AddTableColumnDialog.java      |    2 +-
 .../modules/db/explorer/dlg/ColumnItem.java        |    2 +-
 .../modules/db/explorer/node/ColumnNode.java       |    2 +-
 .../modules/db/explorer/node/IndexNode.java        |    2 +-
 .../modules/db/explorer/node/TableNode.java        |    2 +-
 .../netbeans/modules/diff/builtin/ExportPatch.java |    2 +-
 .../builtin/visualizer/MergeDialogComponent.java   |    6 +-
 .../merge/builtin/visualizer/MergePanel.java       |    6 +-
 .../editor/completion/PatchedHtmlRenderer.java     |    2 +-
 .../src/org/netbeans/editor/Formatter.java         |    2 +-
 .../modules/editor/FormatterIndentEngine.java      |    6 +-
 .../modules/editor/errorstripe/AnnotationView.java |    6 +-
 .../src/org/netbeans/editor/Analyzer.java          |    2 +-
 .../src/org/netbeans/editor/AnnotationType.java    |   10 +-
 .../src/org/netbeans/editor/AnnotationTypes.java   |    4 +-
 .../src/org/netbeans/editor/BaseDocument.java      |   16 +-
 .../src/org/netbeans/editor/Coloring.java          |    2 +-
 .../src/org/netbeans/editor/EditorUI.java          |    2 +-
 .../src/org/netbeans/editor/GuardedDocument.java   |    4 +-
 .../src/org/netbeans/editor/MultiKeyBinding.java   |    4 +-
 .../org/netbeans/editor/ext/ExtSyntaxSupport.java  |    4 +-
 .../org/netbeans/editor/ext/ToolTipSupport.java    |    6 +-
 .../modules/editor/lib/drawing/DrawLayerList.java  |    2 +-
 .../modules/editor/lib/impl/MarkVector.java        |    8 +-
 .../editor/lib2/EditorCaretTransferHandler.java    |    2 +-
 .../lib2/RectangularSelectionTransferHandler.java  |    2 +-
 .../formatting/TagBasedLexerFormatter.java         |    2 +-
 .../netbeans/modules/git/ui/clone/CloneWizard.java |    2 +-
 .../netbeans/modules/git/ui/fetch/FetchWizard.java |    2 +-
 .../netbeans/modules/git/ui/fetch/PullWizard.java  |    2 +-
 .../netbeans/modules/git/ui/push/PushWizard.java   |    2 +-
 .../modules/gsf/testrunner/ui/MessageStack.java    |    4 +-
 .../modules/html/editor/HtmlTransferHandler.java   |    2 +-
 .../html/editor/javadoc/SAXHelpHandler.java        |    4 +-
 .../actions/HtmlRefactoringGlobalAction.java       |    2 +-
 .../modules/html/palette/items/IMGCustomizer.java  |    4 +-
 .../modules/html/palette/items/OLCustomizer.java   |    2 +-
 .../html/palette/items/SELECTCustomizer.java       |    4 +-
 .../html/palette/items/TABLECustomizer.java        |   12 +-
 .../html/palette/items/TEXTAREACustomizer.java     |    4 +-
 .../modules/html/palette/items/ULCustomizer.java   |    2 +-
 .../modules/httpserver/HttpServerModule.java       |    2 +-
 .../modules/httpserver/HttpServerSettings.java     |    2 +-
 .../netbeans/modules/lexer/gen/LanguageData.java   |    2 +-
 .../org/netbeans/modules/lexer/gen/TokenTypes.java |    4 +-
 .../src/org/netbeans/lib/lexer/IntegerCache.java   |    2 +-
 .../modules/mercurial/FileStatusCache.java         |    2 +-
 .../mercurial/ui/annotate/AnnotateLine.java        |    2 +-
 .../mercurial/ui/diff/ExportDiffChangesAction.java |    2 +-
 .../mercurial/ui/wizards/CloneWizardAction.java    |    2 +-
 .../modules/notifications/BalloonManager.java      |    2 +-
 .../modules/project/ui/NewFileIterator.java        |    2 +-
 .../modules/project/uiapi/ProjectCopyPanel.java    |    6 +-
 .../spi/impl/RefactoringGlobalAction.java          |    2 +-
 .../netbeans/modules/schema2beans/BaseBean.java    |    2 +-
 .../netbeans/modules/schema2beans/BeanProp.java    |    2 +-
 .../org/netbeans/modules/schema2beans/Common.java  |   16 +-
 .../netbeans/modules/schema2beans/DDFactory.java   |    2 +-
 .../netbeans/modules/schema2beans/DOMBinding.java  |    4 +-
 .../modules/schema2beans/GraphManager.java         |    4 +-
 .../modules/schema2beans/ReflectiveBeanProp.java   |    4 +-
 .../modules/schema2beansdev/TreeBuilder.java       |    2 +-
 .../modules/schema2beansdev/gen/GenBuffer.java     |    2 +-
 .../modules/schema2beansdev/gen/JavaUtil.java      |    4 +-
 .../src/org/netbeans/modules/viewmodel/Column.java |    2 +-
 .../netbeans/modules/viewmodel/TreeModelNode.java  |    4 +-
 .../netbeans/modules/viewmodel/TreeModelRoot.java  |    2 +-
 .../subversion/ui/actions/ContextAction.java       |    8 +-
 .../modules/subversion/ui/blame/AnnotateLine.java  |    2 +-
 .../subversion/ui/diff/ExportDiffAction.java       |    2 +-
 .../subversion/ui/wizards/CheckoutWizard.java      |    2 +-
 .../subversion/ui/wizards/ImportWizard.java        |    2 +-
 .../subversion/ui/wizards/URLPatternWizard.java    |    2 +-
 .../bugtracking/commons/StackTraceSupport.java     |    2 +-
 .../demosrc/examples/colorpicker/ColorPreview.java |    6 +-
 .../org/netbeans/modules/openfile/RecentFiles.java |    3 +-
 .../versioning/util/projects/ProjectOpener.java    |    2 +-
 .../modules/xml/axi/datatype/BinaryBase.java       |    6 +-
 .../modules/xml/axi/datatype/NotationType.java     |   12 +-
 .../modules/xml/axi/datatype/NumberBase.java       |    4 +-
 .../modules/xml/axi/datatype/QNameType.java        |   12 +-
 .../modules/xml/axi/datatype/StringBase.java       |    6 +-
 .../xml/axi/impl/DefaultSchemaGenerator.java       |    2 +-
 .../xml/axi/impl/SchemaGeneratorFactoryImpl.java   |    2 +-
 .../modules/xml/axi/impl/SchemaGeneratorUtil.java  |    4 +-
 .../modules/xml/multiview/ui/RefreshDialog.java    |    4 +-
 .../xml/multiview/ui/RefreshSaveDialog.java        |    6 +-
 .../org/netbeans/modules/xml/xdm/diff/Change.java  |    4 +-
 .../netbeans/modules/xml/xdm/diff/MergeDiff.java   |    2 +-
 .../modules/xml/actions/InputOutputReporter.java   |    2 +-
 .../modules/xml/wizard/impl/XMLWizardIterator.java |    2 +-
 .../netbeans/modules/xsl/ui/TransformPanel.java    |   10 +-
 java/classfile/closure/nbproject/build-impl.xml    | 1436 ++++++++++++++++++--
 .../closure/nbproject/genfiles.properties          |    6 +-
 .../classfile/closure/nbproject/project.properties |   13 +
 .../src/org/netbeans/installer/Installer.java      |    2 +-
 .../installer/utils/system/UnixNativeUtils.java    |    2 +-
 .../utils/system/launchers/impl/ExeLauncher.java   |    2 +-
 .../wizard/components/actions/InstallAction.java   |    2 +-
 .../wizard/components/actions/UninstallAction.java |    2 +-
 124 files changed, 1552 insertions(+), 384 deletions(-)

diff --git a/harness/jellytools.platform/src/org/netbeans/jellytools/Bundle.java b/harness/jellytools.platform/src/org/netbeans/jellytools/Bundle.java
index 2842321..8c0d0df 100644
--- a/harness/jellytools.platform/src/org/netbeans/jellytools/Bundle.java
+++ b/harness/jellytools.platform/src/org/netbeans/jellytools/Bundle.java
@@ -37,7 +37,7 @@ import org.openide.util.NbBundle;
  *        // "OK"
  *        Bundle.getString("org.netbeans.core.windows.services.Bundle", "OK_OPTION_CAPTION");
  *        // "Properties of AnObject"
- *        Bundle.getString("org.netbeans.core.Bundle", "CTL_FMT_LocalProperties", new Object[] {new Integer(1), "AnObject"});
+ *        Bundle.getString("org.netbeans.core.Bundle", "CTL_FMT_LocalProperties", new Object[] {Integer.valueOf(1), "AnObject"});
  *        // "View"
  *        Bundle.getStringTrimmed("org.netbeans.core.Bundle", "Menu/View");
  * </pre>
diff --git a/harness/o.n.insane/src/org/netbeans/insane/impl/SmallObjectMap.java b/harness/o.n.insane/src/org/netbeans/insane/impl/SmallObjectMap.java
index 4a99edd..6be8a8a 100644
--- a/harness/o.n.insane/src/org/netbeans/insane/impl/SmallObjectMap.java
+++ b/harness/o.n.insane/src/org/netbeans/insane/impl/SmallObjectMap.java
@@ -104,7 +104,7 @@ class SmallObjectMap implements ObjectMap {
         table[bucket] = o;
 
         // add the wrapping info
-        if (wrap) wrappers.put(o, new Integer(idCounter++));
+        if (wrap) wrappers.put(o, Integer.valueOf(idCounter++));
         return wrap;
     }
 
diff --git a/harness/o.n.insane/src/org/netbeans/insane/impl/SmallObjectMap2.java b/harness/o.n.insane/src/org/netbeans/insane/impl/SmallObjectMap2.java
index ff9b747..327c5ff 100644
--- a/harness/o.n.insane/src/org/netbeans/insane/impl/SmallObjectMap2.java
+++ b/harness/o.n.insane/src/org/netbeans/insane/impl/SmallObjectMap2.java
@@ -124,7 +124,7 @@ class SmallObjectMap2 implements ObjectMap {
         table[bucket] = o;
 
         // add the wrapping info
-        if (wrap) wrappers.put(o, new Integer(nextFreeId()));
+        if (wrap) wrappers.put(o, Integer.valueOf(nextFreeId()));
         return wrap;
     }
 
diff --git a/harness/o.n.insane/src/org/netbeans/insane/model/XmlHeapModel.java b/harness/o.n.insane/src/org/netbeans/insane/model/XmlHeapModel.java
index aebd2a4..b589055 100644
--- a/harness/o.n.insane/src/org/netbeans/insane/model/XmlHeapModel.java
+++ b/harness/o.n.insane/src/org/netbeans/insane/model/XmlHeapModel.java
@@ -150,7 +150,7 @@ class XmlHeapModel implements org.netbeans.insane.model.HeapModel {
 
     Item createItem(int id, String type, int size, String val) {
         Item item = new MemItem(id, type, size, val);
-        items.put(new Integer(id), item);
+        items.put(Integer.valueOf(id), item);
         return item;
     }
 
diff --git a/ide/api.debugger/src/org/netbeans/api/debugger/Properties.java b/ide/api.debugger/src/org/netbeans/api/debugger/Properties.java
index bfed048..f88af39 100644
--- a/ide/api.debugger/src/org/netbeans/api/debugger/Properties.java
+++ b/ide/api.debugger/src/org/netbeans/api/debugger/Properties.java
@@ -1474,7 +1474,7 @@ public abstract class Properties {
                 } else if (classNames[3].equals(className)) {
                     return new Short(properties.getShort(propertyName, (short) 0));
                 } else if (classNames[4].equals(className)) {
-                    return new Integer(properties.getInt(propertyName, 0));
+                    return Integer.valueOf(properties.getInt(propertyName, 0));
                 } else if (classNames[5].equals(className)) {
                     return new Long(properties.getLong(propertyName, 0l));
                 } else if (classNames[6].equals(className)) {
diff --git a/ide/bugtracking.commons/src/org/netbeans/modules/bugtracking/issuetable/NodeTableModel.java b/ide/bugtracking.commons/src/org/netbeans/modules/bugtracking/issuetable/NodeTableModel.java
index 48091c2..48147d7 100644
--- a/ide/bugtracking.commons/src/org/netbeans/modules/bugtracking/issuetable/NodeTableModel.java
+++ b/ide/bugtracking.commons/src/org/netbeans/modules/bugtracking/issuetable/NodeTableModel.java
@@ -178,7 +178,7 @@ class NodeTableModel extends AbstractTableModel {
                     if ((o != null) && o instanceof Integer) {
                         sort.put(new Double(((Integer) o).doubleValue()), Integer.valueOf(ia));
                     } else {
-                        sort.put(new Double(ia + 0.1), new Integer(ia));
+                        sort.put(new Double(ia + 0.1), Integer.valueOf(ia));
                     }
                 } else {
                     allPropertyColumns[ia].setVisibleIndex(-1);
@@ -831,7 +831,7 @@ class NodeTableModel extends AbstractTableModel {
          * @param visibleIndex New value of property visibleIndex.
          */
         public void setVisibleIndex(int visibleIndex) {
-            property.setValue(ATTR_ORDER_NUMBER, new Integer(visibleIndex));
+            property.setValue(ATTR_ORDER_NUMBER, Integer.valueOf(visibleIndex));
         }
     }
 }
diff --git a/ide/bugtracking/src/org/netbeans/modules/bugtracking/ui/search/QuickSearchPopup.java b/ide/bugtracking/src/org/netbeans/modules/bugtracking/ui/search/QuickSearchPopup.java
index 1cf403d..37bc017 100644
--- a/ide/bugtracking/src/org/netbeans/modules/bugtracking/ui/search/QuickSearchPopup.java
+++ b/ide/bugtracking/src/org/netbeans/modules/bugtracking/ui/search/QuickSearchPopup.java
@@ -480,7 +480,7 @@ private void jList1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:even
         // lPane can be null when the corresponding dialog is closed already
         // for example, when the user didn't want to wait until the search finishes
         if (!isDisplayable() && (lPane != null)) {
-            lPane.add(this, new Integer(JLayeredPane.POPUP_LAYER + 1) );
+            lPane.add(this, Integer.valueOf(JLayeredPane.POPUP_LAYER + 1) );
         }
 
         boolean statusVisible = updateStatusPanel();
diff --git a/ide/csl.api/src/org/netbeans/modules/csl/core/CslEditorKit.java b/ide/csl.api/src/org/netbeans/modules/csl/core/CslEditorKit.java
index 9f9be34..aaeda02 100644
--- a/ide/csl.api/src/org/netbeans/modules/csl/core/CslEditorKit.java
+++ b/ide/csl.api/src/org/netbeans/modules/csl/core/CslEditorKit.java
@@ -324,7 +324,7 @@ public final class CslEditorKit extends NbEditorKit {
                         int newOffset = bracketCompletion.beforeBreak(doc, caret.getDot(), target);
 
                         if (newOffset >= 0) {
-                            return new Integer(newOffset);
+                            return Integer.valueOf(newOffset);
                         }
                     } catch (BadLocationException ble) {
                         Exceptions.printStackTrace(ble);
diff --git a/ide/css.editor/src/org/netbeans/modules/css/editor/module/CssModuleSupport.java b/ide/css.editor/src/org/netbeans/modules/css/editor/module/CssModuleSupport.java
index db68b82..f4b4ee5 100644
--- a/ide/css.editor/src/org/netbeans/modules/css/editor/module/CssModuleSupport.java
+++ b/ide/css.editor/src/org/netbeans/modules/css/editor/module/CssModuleSupport.java
@@ -468,7 +468,7 @@ public class CssModuleSupport {
             public int compare(HelpResolver t1, HelpResolver t2) {
                 int i1 = t1.getPriority();
                 int i2 = t2.getPriority();
-                return new Integer(i1).compareTo(new Integer(i2));
+                return Integer.valueOf(i1).compareTo(Integer.valueOf(i2));
             }
         });
 
diff --git a/ide/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUIModel.java b/ide/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUIModel.java
index bfbdb2a..a146bd5 100644
--- a/ide/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUIModel.java
+++ b/ide/db.dataview/src/org/netbeans/modules/db/dataview/output/DataViewTableUIModel.java
@@ -176,7 +176,7 @@ public class DataViewTableUIModel extends ResultSetTableModel {
 
     boolean hasUpdates(int row, int col) {
         assert SwingUtilities.isEventDispatchThread() : "Not on EDT";
-        Map<Integer, Object> rowMap = oldData.get(new Integer(row));
+        Map<Integer, Object> rowMap = oldData.get(Integer.valueOf(row));
         return rowMap != null && rowMap.containsKey(col);
     }
 }
diff --git a/ide/db.dataview/src/org/netbeans/modules/db/dataview/output/UpdatedRowContext.java b/ide/db.dataview/src/org/netbeans/modules/db/dataview/output/UpdatedRowContext.java
index 9fde93e..97916bf 100644
--- a/ide/db.dataview/src/org/netbeans/modules/db/dataview/output/UpdatedRowContext.java
+++ b/ide/db.dataview/src/org/netbeans/modules/db/dataview/output/UpdatedRowContext.java
@@ -39,9 +39,9 @@ class UpdatedRowContext {
         Map<Integer, Object> rowMap = changedData.get(row);
         if(rowMap == null){
             rowMap = new LinkedHashMap<Integer, Object>();
-            changedData.put(new Integer(row), rowMap);
+            changedData.put(Integer.valueOf(row), rowMap);
         }
-        rowMap.put(new Integer(col), value);
+        rowMap.put(Integer.valueOf(col), value);
     }
 
     public void removeAllUpdates() {
@@ -49,8 +49,8 @@ class UpdatedRowContext {
     }
 
     public void removeUpdateForSelectedRow(int row) {
-        if(changedData.containsKey(new Integer(row))){
-            changedData.remove(new Integer(row));
+        if(changedData.containsKey(Integer.valueOf(row))){
+            changedData.remove(Integer.valueOf(row));
         }
     }
 
@@ -59,12 +59,12 @@ class UpdatedRowContext {
     }
 
     public Map<Integer, Object> getChangedData(int row) {
-        return changedData.get(new Integer(row));
+        return changedData.get(Integer.valueOf(row));
     }
 
     boolean hasUpdates(int row, int col) {
-        Map<Integer, Object> rowMap = changedData.get(new Integer(row));
-        if(rowMap != null && rowMap.containsKey(new Integer(col))){
+        Map<Integer, Object> rowMap = changedData.get(Integer.valueOf(row));
+        if(rowMap != null && rowMap.containsKey(Integer.valueOf(col))){
            return true;
         }
         return false;
diff --git a/ide/db.dataview/src/org/netbeans/modules/db/dataview/util/DBReadWriteHelper.java b/ide/db.dataview/src/org/netbeans/modules/db/dataview/util/DBReadWriteHelper.java
index cedc734..d056e34 100644
--- a/ide/db.dataview/src/org/netbeans/modules/db/dataview/util/DBReadWriteHelper.java
+++ b/ide/db.dataview/src/org/netbeans/modules/db/dataview/util/DBReadWriteHelper.java
@@ -454,7 +454,7 @@ public class DBReadWriteHelper {
                 case Types.INTEGER: {
                     long ldata = Long.parseLong(valueObj.toString());
                         if(ldata >= ((long) Integer.MIN_VALUE) && ldata <= ((long) Integer.MAX_VALUE)) {
-                        return new Integer((int) ldata);
+                        return Integer.valueOf((int) ldata);
                         } else if ( ldata < maxUnsignedInt ) {
                         return new Long(ldata);
                     } else {
diff --git a/ide/db.sql.editor/src/org/netbeans/modules/db/sql/editor/SQLEditorProviderImpl.java b/ide/db.sql.editor/src/org/netbeans/modules/db/sql/editor/SQLEditorProviderImpl.java
index 5b2c0a8..ca9772f 100644
--- a/ide/db.sql.editor/src/org/netbeans/modules/db/sql/editor/SQLEditorProviderImpl.java
+++ b/ide/db.sql.editor/src/org/netbeans/modules/db/sql/editor/SQLEditorProviderImpl.java
@@ -66,7 +66,7 @@ public class SQLEditorProviderImpl implements SQLEditorProvider {
         int i = 1;
         for (;;) {
             String nameFmt = NbBundle.getMessage(SQLEditorProviderImpl.class, "LBL_SQLCommandFileName");
-            String name = MessageFormat.format(nameFmt, new Object[] { new Integer(i) });
+            String name = MessageFormat.format(nameFmt, new Object[] { Integer.valueOf(i) });
             try {
                 sqlFo = tmpFo.createData(name);
             } catch (IOException e) {
diff --git a/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/querybuilder/QueryBuilder.java b/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/querybuilder/QueryBuilder.java
index bf1650d..155b495 100644
--- a/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/querybuilder/QueryBuilder.java
+++ b/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/querybuilder/QueryBuilder.java
@@ -1195,7 +1195,7 @@ public class QueryBuilder extends TopComponent
                 }
     
                 for (int i = 0; i < paramCount; i++) {
-                    parameters[i] = new String( "Parameter " + new Integer(i).toString());
+                    parameters[i] = new String( "Parameter " + Integer.valueOf(i).toString());
                 }
                 if (DEBUG) {
                     for (int i = 0; i < parameters.length; i++) {
diff --git a/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/querybuilder/QueryBuilderGraphFrame.java b/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/querybuilder/QueryBuilderGraphFrame.java
index b714598..3a93ac7 100644
--- a/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/querybuilder/QueryBuilderGraphFrame.java
+++ b/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/querybuilder/QueryBuilderGraphFrame.java
@@ -685,7 +685,7 @@ public class QueryBuilderGraphFrame extends JPanel
                     ? criteriaCount+1
                             : Integer.parseInt(order);
                     _inputTableAddCriteria = true;
-                    model.setValueAt(new Integer(orderNum).toString(), row,
+                    model.setValueAt(Integer.valueOf(orderNum).toString(), row,
                             QueryBuilderInputTable.CriteriaOrder_COLUMN);
                     _inputTableAddCriteria = false;
                     if ( orderNum < criteriaCount+1 ) {
@@ -1582,7 +1582,7 @@ public class QueryBuilderGraphFrame extends JPanel
                         QueryBuilderInputTable.Criteria_Uneditable_String,
                         QueryBuilderInputTable.CriteriaOrder_Uneditable_String);
             } else {
-                String orderString = (order == -1) ? "" : new Integer(order+1).toString();
+                String orderString = (order == -1) ? "" : Integer.valueOf(order+1).toString();
                 
                 // Update the appropriate row, or add a new one
                 _queryBuilderInputTable.addCriterion(tableSpec, columnName,
diff --git a/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/ui/ConnectionStatusPanel.java b/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/ui/ConnectionStatusPanel.java
index f390936..7d0c25c 100644
--- a/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/ui/ConnectionStatusPanel.java
+++ b/ide/db.sql.visualeditor/src/org/netbeans/modules/db/sql/visualeditor/ui/ConnectionStatusPanel.java
@@ -132,7 +132,7 @@ public class ConnectionStatusPanel extends javax.swing.JPanel {
             connectionStatusMessage.setVisible(false) ;
             validationInfo.setVisible(true) ;
             if ( sqlException == null ) {
-                valStatusText.setText(getMsg("ConStat_rows_selected_msg", tableName, new Integer(rows)) ) ; // NOI18N
+                valStatusText.setText(getMsg("ConStat_rows_selected_msg", tableName, Integer.valueOf(rows)) ) ; // NOI18N
                 valStatusIcon.setIcon( new ImageIcon(conGood) ) ;
                 String valMsg ;
                 if (rows > 1 ) {
diff --git a/ide/db/libsrc/org/netbeans/lib/ddl/adaptors/DefaultAdaptor.java b/ide/db/libsrc/org/netbeans/lib/ddl/adaptors/DefaultAdaptor.java
index f0e3494..c8189e0 100644
--- a/ide/db/libsrc/org/netbeans/lib/ddl/adaptors/DefaultAdaptor.java
+++ b/ide/db/libsrc/org/netbeans/lib/ddl/adaptors/DefaultAdaptor.java
@@ -285,7 +285,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer newValue, oldValue = (Integer)properties.get(key);
         if (value != NOT_SET) {
-            newValue = new Integer(value);
+            newValue = Integer.valueOf(value);
             properties.put(key, newValue);
         } else {
             newValue = null;
@@ -561,8 +561,8 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer driverMajorVersion = (Integer)properties.get(PROP_DRIVER_MAJOR_VERSION);
         if (driverMajorVersion == null) {
-            if (dmd != null) driverMajorVersion = new Integer(dmd.getDriverMajorVersion());
-            else driverMajorVersion = new Integer(NOT_SET);
+            if (dmd != null) driverMajorVersion = Integer.valueOf(dmd.getDriverMajorVersion());
+            else driverMajorVersion = Integer.valueOf(NOT_SET);
             properties.put(PROP_DRIVER_MAJOR_VERSION, driverMajorVersion);
         }
 
@@ -582,8 +582,8 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer driverMinorVersion = (Integer)properties.get(PROP_DRIVER_MINOR_VERSION);
         if (driverMinorVersion == null) {
-            if (dmd != null) driverMinorVersion = new Integer(dmd.getDriverMinorVersion());
-            else driverMinorVersion = new Integer(NOT_SET);
+            if (dmd != null) driverMinorVersion = Integer.valueOf(dmd.getDriverMinorVersion());
+            else driverMinorVersion = Integer.valueOf(NOT_SET);
             properties.put(PROP_DRIVER_MINOR_VERSION, driverMinorVersion);
         }
 
@@ -2529,7 +2529,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer binaryLiteral = (Integer)properties.get(PROP_MAX_BINARY_LITERAL_LENGTH);
         if (binaryLiteral == null && dmd != null) {
-            binaryLiteral = new Integer(dmd.getMaxBinaryLiteralLength());
+            binaryLiteral = Integer.valueOf(dmd.getMaxBinaryLiteralLength());
             properties.put(PROP_MAX_BINARY_LITERAL_LENGTH, binaryLiteral);
         }
 
@@ -2551,7 +2551,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxCharLiteral = (Integer)properties.get(PROP_MAX_CHAR_LITERAL_LENGTH);
         if (maxCharLiteral == null && dmd != null) {
-            maxCharLiteral = new Integer(dmd.getMaxCharLiteralLength());
+            maxCharLiteral = Integer.valueOf(dmd.getMaxCharLiteralLength());
             properties.put(PROP_MAX_CHAR_LITERAL_LENGTH, maxCharLiteral);
         }
 
@@ -2573,7 +2573,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxColumnName = (Integer)properties.get(PROP_MAX_COLUMN_NAME_LENGTH);
         if (maxColumnName == null && dmd != null) {
-            maxColumnName = new Integer(dmd.getMaxColumnNameLength());
+            maxColumnName = Integer.valueOf(dmd.getMaxColumnNameLength());
             properties.put(PROP_MAX_COLUMN_NAME_LENGTH, maxColumnName);
         }
 
@@ -2595,7 +2595,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxColumnGroup = (Integer)properties.get(PROP_MAX_COLUMNS_IN_GROUPBY);
         if (maxColumnGroup == null && dmd != null) {
-            maxColumnGroup = new Integer(dmd.getMaxColumnsInGroupBy());
+            maxColumnGroup = Integer.valueOf(dmd.getMaxColumnsInGroupBy());
             properties.put(PROP_MAX_COLUMNS_IN_GROUPBY, maxColumnGroup);
         }
 
@@ -2617,7 +2617,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxColumnIndex = (Integer)properties.get(PROP_MAX_COLUMNS_IN_INDEX);
         if (maxColumnIndex == null && dmd != null) {
-            maxColumnIndex = new Integer(dmd.getMaxColumnsInIndex());
+            maxColumnIndex = Integer.valueOf(dmd.getMaxColumnsInIndex());
             properties.put(PROP_MAX_COLUMNS_IN_INDEX, maxColumnIndex);
         }
 
@@ -2639,7 +2639,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxColumnOrderBy = (Integer)properties.get(PROP_MAX_COLUMNS_IN_ORDERBY);
         if (maxColumnOrderBy == null && dmd != null) {
-            maxColumnOrderBy = new Integer(dmd.getMaxColumnsInOrderBy());
+            maxColumnOrderBy = Integer.valueOf(dmd.getMaxColumnsInOrderBy());
             properties.put(PROP_MAX_COLUMNS_IN_ORDERBY, maxColumnOrderBy);
         }
 
@@ -2661,7 +2661,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxColumnSelect = (Integer)properties.get(PROP_MAX_COLUMNS_IN_SELECT);
         if (maxColumnSelect == null && dmd != null) {
-            maxColumnSelect = new Integer(dmd.getMaxColumnsInSelect());
+            maxColumnSelect = Integer.valueOf(dmd.getMaxColumnsInSelect());
             properties.put(PROP_MAX_COLUMNS_IN_SELECT, maxColumnSelect);
         }
 
@@ -2683,7 +2683,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxColumnTable = (Integer)properties.get(PROP_MAX_COLUMNS_IN_TABLE);
         if (maxColumnTable == null && dmd != null) {
-            maxColumnTable = new Integer(dmd.getMaxColumnsInTable());
+            maxColumnTable = Integer.valueOf(dmd.getMaxColumnsInTable());
             properties.put(PROP_MAX_COLUMNS_IN_TABLE, maxColumnTable);
         }
 
@@ -2705,7 +2705,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxConnections = (Integer)properties.get(PROP_MAX_CONNECTIONS);
         if (maxConnections == null && dmd != null) {
-            maxConnections = new Integer(dmd.getMaxConnections());
+            maxConnections = Integer.valueOf(dmd.getMaxConnections());
             properties.put(PROP_MAX_CONNECTIONS, maxConnections);
         }
 
@@ -2727,7 +2727,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxCursorName = (Integer)properties.get(PROP_MAX_CURSORNAME_LENGTH);
         if (maxCursorName == null && dmd != null) {
-            maxCursorName = new Integer(dmd.getMaxCursorNameLength());
+            maxCursorName = Integer.valueOf(dmd.getMaxCursorNameLength());
             properties.put(PROP_MAX_CURSORNAME_LENGTH, maxCursorName);
         }
 
@@ -2749,7 +2749,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxIndex = (Integer)properties.get(PROP_MAX_INDEX_LENGTH);
         if (maxIndex == null && dmd != null) {
-            maxIndex = new Integer(dmd.getMaxIndexLength());
+            maxIndex = Integer.valueOf(dmd.getMaxIndexLength());
             properties.put(PROP_MAX_INDEX_LENGTH, maxIndex);
         }
 
@@ -2771,7 +2771,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxSchemaName = (Integer)properties.get(PROP_MAX_SCHEMA_NAME);
         if (maxSchemaName == null && dmd != null) {
-            maxSchemaName = new Integer(dmd.getMaxSchemaNameLength());
+            maxSchemaName = Integer.valueOf(dmd.getMaxSchemaNameLength());
             properties.put(PROP_MAX_SCHEMA_NAME, maxSchemaName);
         }
 
@@ -2793,7 +2793,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxProcName = (Integer)properties.get(PROP_MAX_PROCEDURE_NAME);
         if (maxProcName == null && dmd != null) {
-            maxProcName = new Integer(dmd.getMaxProcedureNameLength());
+            maxProcName = Integer.valueOf(dmd.getMaxProcedureNameLength());
             properties.put(PROP_MAX_PROCEDURE_NAME, maxProcName);
         }
 
@@ -2815,7 +2815,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxCatalogName = (Integer)properties.get(PROP_MAX_CATALOG_NAME);
         if (maxCatalogName == null && dmd != null) {
-            maxCatalogName = new Integer(dmd.getMaxProcedureNameLength());
+            maxCatalogName = Integer.valueOf(dmd.getMaxProcedureNameLength());
             properties.put(PROP_MAX_CATALOG_NAME, maxCatalogName);
         }
 
@@ -2837,7 +2837,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxRowSize = (Integer)properties.get(PROP_MAX_ROW_SIZE);
         if (maxRowSize == null && dmd != null) {
-            maxRowSize = new Integer(dmd.getMaxProcedureNameLength());
+            maxRowSize = Integer.valueOf(dmd.getMaxProcedureNameLength());
             properties.put(PROP_MAX_ROW_SIZE, maxRowSize);
         }
 
@@ -2887,7 +2887,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxStatement = (Integer)properties.get(PROP_MAX_STATEMENT_LENGTH);
         if (maxStatement == null && dmd != null) {
-            maxStatement = new Integer(dmd.getMaxStatementLength());
+            maxStatement = Integer.valueOf(dmd.getMaxStatementLength());
             properties.put(PROP_MAX_STATEMENT_LENGTH, maxStatement);
         }
 
@@ -2910,7 +2910,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxStatements = (Integer)properties.get(PROP_MAX_STATEMENTS);
         if (maxStatements == null && dmd != null) {
-            maxStatements = new Integer(dmd.getMaxStatementLength());
+            maxStatements = Integer.valueOf(dmd.getMaxStatementLength());
             properties.put(PROP_MAX_STATEMENTS, maxStatements);
         }
 
@@ -2932,7 +2932,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxTable = (Integer)properties.get(PROP_MAX_TABLENAME_LENGTH);
         if (maxTable == null && dmd != null) {
-            maxTable = new Integer(dmd.getMaxStatementLength());
+            maxTable = Integer.valueOf(dmd.getMaxStatementLength());
             properties.put(PROP_MAX_TABLENAME_LENGTH, maxTable);
         }
 
@@ -2954,7 +2954,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxTable = (Integer)properties.get(PROP_MAX_TABLES_IN_SELECT);
         if (maxTable == null && dmd != null) {
-            maxTable = new Integer(dmd.getMaxStatementLength());
+            maxTable = Integer.valueOf(dmd.getMaxStatementLength());
             properties.put(PROP_MAX_TABLES_IN_SELECT, maxTable);
         }
 
@@ -2976,7 +2976,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxUserName = (Integer)properties.get(PROP_MAX_USERNAME);
         if (maxUserName == null && dmd != null) {
-            maxUserName = new Integer(dmd.getMaxUserNameLength());
+            maxUserName = Integer.valueOf(dmd.getMaxUserNameLength());
             properties.put(PROP_MAX_USERNAME, maxUserName);
         }
 
@@ -2999,7 +2999,7 @@ public class DefaultAdaptor implements DatabaseMetaDataAdaptor, Serializable {
     {
         Integer maxTransaction = (Integer)properties.get(PROP_DEFAULT_ISOLATION);
         if (maxTransaction == null && dmd != null) {
-            maxTransaction = new Integer(dmd.getDefaultTransactionIsolation());
+            maxTransaction = Integer.valueOf(dmd.getDefaultTransactionIsolation());
             properties.put(PROP_DEFAULT_ISOLATION, maxTransaction);
         }
 
diff --git a/ide/db/libsrc/org/netbeans/lib/ddl/adaptors/DefaultAdaptorBeanInfo.java b/ide/db/libsrc/org/netbeans/lib/ddl/adaptors/DefaultAdaptorBeanInfo.java
index 05dc972..74ced26 100644
--- a/ide/db/libsrc/org/netbeans/lib/ddl/adaptors/DefaultAdaptorBeanInfo.java
+++ b/ide/db/libsrc/org/netbeans/lib/ddl/adaptors/DefaultAdaptorBeanInfo.java
@@ -241,7 +241,7 @@ public class DefaultAdaptorBeanInfo extends SimpleBeanInfo
 
         public Object getValue()
         {
-            return new Integer(constants[index]);
+            return Integer.valueOf(constants[index]);
         }
 
         public void setValue(Object object)
diff --git a/ide/db/libsrc/org/netbeans/lib/ddl/impl/DriverSpecification.java b/ide/db/libsrc/org/netbeans/lib/ddl/impl/DriverSpecification.java
index caf87ce..13c060b 100644
--- a/ide/db/libsrc/org/netbeans/lib/ddl/impl/DriverSpecification.java
+++ b/ide/db/libsrc/org/netbeans/lib/ddl/impl/DriverSpecification.java
@@ -257,7 +257,7 @@ public class DriverSpecification {
                     // break;
                     throw exc;
                 }
-                rset.put(new Integer(i), value);
+                rset.put(Integer.valueOf(i), value);
             }
         } catch (SQLException exc) {
             rset = null;
diff --git a/ide/db/libsrc/org/netbeans/lib/ddl/util/PListReader.java b/ide/db/libsrc/org/netbeans/lib/ddl/util/PListReader.java
index 94db4ec..85108d3 100644
--- a/ide/db/libsrc/org/netbeans/lib/ddl/util/PListReader.java
+++ b/ide/db/libsrc/org/netbeans/lib/ddl/util/PListReader.java
@@ -184,7 +184,7 @@ public class PListReader {
 
             tokenizer.pushBack();
             double d = Math.rint(tokenizer.nval);
-            if(d == tokenizer.nval) return new Integer((int)d);
+            if(d == tokenizer.nval) return Integer.valueOf((int)d);
             return new Double(tokenizer.nval);
         }
     }
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/DatabaseConnector.java b/ide/db/src/org/netbeans/modules/db/explorer/DatabaseConnector.java
index a3a53f5..c0d0a46 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/DatabaseConnector.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/DatabaseConnector.java
@@ -207,15 +207,15 @@ public class DatabaseConnector {
 
                     try {
                         //hack because of MSSQL ODBC problems - see DriverSpecification.getRow() for more info - shouln't be thrown
-                        col.setColumnType(Integer.parseInt(rset.get(new Integer(5))));
-                        col.setColumnSize(Integer.parseInt(rset.get(new Integer(7))));
+                        col.setColumnType(Integer.parseInt(rset.get(Integer.valueOf(5))));
+                        col.setColumnSize(Integer.parseInt(rset.get(Integer.valueOf(7))));
                     } catch (NumberFormatException exc) {
                         col.setColumnType(0);
                         col.setColumnSize(0);
                     }
 
-                    col.setNullAllowed((rset.get(new Integer(18))).toUpperCase().equals("YES")); //NOI18N
-                    col.setDefaultValue(rset.get(new Integer(13)));
+                    col.setNullAllowed((rset.get(Integer.valueOf(18))).toUpperCase().equals("YES")); //NOI18N
+                    col.setDefaultValue(rset.get(Integer.valueOf(13)));
                     rset.clear();
                 } else {
                     Logger.getLogger(DatabaseConnector.class.getName()).log(Level.INFO, "Empty ResultSet for {0}.{1} in catalog {2}",
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/DatabaseTypePropertyEditor.java b/ide/db/src/org/netbeans/modules/db/explorer/DatabaseTypePropertyEditor.java
index 51047c8..94ea192 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/DatabaseTypePropertyEditor.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/DatabaseTypePropertyEditor.java
@@ -100,7 +100,7 @@ public class DatabaseTypePropertyEditor implements PropertyEditor {
     }
 
     public Object getValue () {
-        return new Integer(constants[index]);
+        return Integer.valueOf(constants[index]);
     }
 
     public void setValue (Object object) {
@@ -113,7 +113,7 @@ public class DatabaseTypePropertyEditor implements PropertyEditor {
 //cannot use previous code because of MSSQL ODBC problems - see DriverSpecification.getRow() for more info
         Integer type;       
         try {
-            type = new Integer(object.toString());
+            type = Integer.valueOf(object.toString());
         } catch (NumberFormatException exc) {
             String message = NbBundle.getMessage (DatabaseTypePropertyEditor.class, "EXC_CannotOperateWith", object.toString()); // NOI18N
             throw new IllegalArgumentException(message);        
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/DriverExtendedDeleteImpl.java b/ide/db/src/org/netbeans/modules/db/explorer/DriverExtendedDeleteImpl.java
index 01b9e9c..f640773 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/DriverExtendedDeleteImpl.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/DriverExtendedDeleteImpl.java
@@ -108,7 +108,7 @@ public class DriverExtendedDeleteImpl {
             title = NbBundle.getMessage (DriverExtendedDeleteImpl.class, "MSG_ConfirmDeleteDriverTitle"); // NOI18N
         } else {
             String format = NbBundle.getMessage (DriverExtendedDeleteImpl.class, "MSG_ConfirmDeleteDrivers"); // NOI18N
-            message = MessageFormat.format(format, new Object[] { new Integer(jdbcDrivers.length) });
+            message = MessageFormat.format(format, new Object[] { Integer.valueOf(jdbcDrivers.length) });
             title = NbBundle.getMessage (DriverExtendedDeleteImpl.class, "MSG_ConfirmDeleteDriversTitle"); // NOI18N
         }
         return DialogDisplayer.getDefault().notify(new NotifyDescriptor.Confirmation(message, title, NotifyDescriptor.YES_NO_OPTION)) == NotifyDescriptor.YES_OPTION;
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/action/AddIndexAction.java b/ide/db/src/org/netbeans/modules/db/explorer/action/AddIndexAction.java
index 9abbf6b..f602ba8 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/action/AddIndexAction.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/action/AddIndexAction.java
@@ -106,7 +106,7 @@ public class AddIndexAction extends BaseAction {
             Map<Integer, String> rset = new HashMap<Integer, String>();
             while (rs.next()) {
                 rset = drvSpec.getRow();
-                cols.add(rset.get(new Integer(4)));
+                cols.add(rset.get(Integer.valueOf(4)));
                 rset.clear();
             }
             rs.close();
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/dlg/AddTableColumnDialog.java b/ide/db/src/org/netbeans/modules/db/explorer/dlg/AddTableColumnDialog.java
index 651b074..361fd65 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/dlg/AddTableColumnDialog.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/dlg/AddTableColumnDialog.java
@@ -466,7 +466,7 @@ public class AddTableColumnDialog extends JPanel {
             if (text == null || text.length() == 0) {
                 text = "0";
             }
-            return new Integer(text);
+            return Integer.valueOf(text);
         } catch (NumberFormatException nfe) {
             return null;
         }
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/dlg/ColumnItem.java b/ide/db/src/org/netbeans/modules/db/explorer/dlg/ColumnItem.java
index b589f22..ee2675f 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/dlg/ColumnItem.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/dlg/ColumnItem.java
@@ -130,7 +130,7 @@ public class ColumnItem extends Hashtable {
                 if (!oldc.equals(value.getClass()))
                     if (oldc.equals(Integer.class))
                         if ("".equals((String) value))
-                            value = new Integer(0);
+                            value = Integer.valueOf(0);
                         else
                             value = Integer.valueOf((String) value);
             } catch (NumberFormatException e) {
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/node/ColumnNode.java b/ide/db/src/org/netbeans/modules/db/explorer/node/ColumnNode.java
index 627cb80..3158259 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/node/ColumnNode.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/node/ColumnNode.java
@@ -308,7 +308,7 @@ public class ColumnNode extends BaseNode implements SchemaNameProvider, ColumnNa
             LOG.log(Level.INFO, e.getMessage(), e);
         }
 
-        setValue(BaseFilterNode.REFRESH_ANCESTOR_DISTANCE, new Integer(1));
+        setValue(BaseFilterNode.REFRESH_ANCESTOR_DISTANCE, Integer.valueOf(1));
     }
 
     @Override
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/node/IndexNode.java b/ide/db/src/org/netbeans/modules/db/explorer/node/IndexNode.java
index 4d0dbe6..9ccd4c3 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/node/IndexNode.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/node/IndexNode.java
@@ -138,7 +138,7 @@ public class IndexNode extends BaseNode {
         try {
             Specification spec = connector.getDatabaseSpecification();
             DDLHelper.deleteIndex(spec, schemaName, tablename, getName());
-            setValue(BaseFilterNode.REFRESH_ANCESTOR_DISTANCE, new Integer(2));
+            setValue(BaseFilterNode.REFRESH_ANCESTOR_DISTANCE, Integer.valueOf(2));
         } catch (DDLException e) {
             Logger.getLogger(IndexNode.class.getName()).log(Level.INFO, e + " while deleting index " + getName());
             DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(e.getMessage(), NotifyDescriptor.ERROR_MESSAGE));
diff --git a/ide/db/src/org/netbeans/modules/db/explorer/node/TableNode.java b/ide/db/src/org/netbeans/modules/db/explorer/node/TableNode.java
index a776dbc..a7638cb 100644
--- a/ide/db/src/org/netbeans/modules/db/explorer/node/TableNode.java
+++ b/ide/db/src/org/netbeans/modules/db/explorer/node/TableNode.java
@@ -159,7 +159,7 @@ public class TableNode extends BaseNode implements SchemaNameProvider {
             Exceptions.printStackTrace(e);
         }
 
-        setValue(BaseFilterNode.REFRESH_ANCESTOR_DISTANCE, new Integer(1));
+        setValue(BaseFilterNode.REFRESH_ANCESTOR_DISTANCE, Integer.valueOf(1));
     }
 
     @Override
diff --git a/ide/diff/src/org/netbeans/modules/diff/builtin/ExportPatch.java b/ide/diff/src/org/netbeans/modules/diff/builtin/ExportPatch.java
index 9a27f9c..eb828721 100644
--- a/ide/diff/src/org/netbeans/modules/diff/builtin/ExportPatch.java
+++ b/ide/diff/src/org/netbeans/modules/diff/builtin/ExportPatch.java
@@ -176,7 +176,7 @@ public class ExportPatch {
                 }
             }
             if (success) {
-                StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(ExportPatch.class, "BK3004", new Integer(exportedFiles)));
+                StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(ExportPatch.class, "BK3004", Integer.valueOf(exportedFiles)));
                 if (exportedFiles == 0) {
                     destination.delete();
                 } else {
diff --git a/ide/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergeDialogComponent.java b/ide/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergeDialogComponent.java
index 09d29cd..69abbdb 100644
--- a/ide/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergeDialogComponent.java
+++ b/ide/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergeDialogComponent.java
@@ -404,14 +404,14 @@ public class MergeDialogComponent extends TopComponent implements ChangeListener
         } else if (unsavedPanelNames.size() > 1) {
             ret = DialogDisplayer.getDefault().notify(
                 new NotifyDescriptor.Confirmation(warning
-                    ? NbBundle.getMessage(MergeDialogComponent.class,"SaveFilesWarningQuestion",new Integer(unsavedPanelNames.size()))
-                    : NbBundle.getMessage(MergeDialogComponent.class,"SaveFilesQuestion",new Integer(unsavedPanelNames.size())),
+                    ? NbBundle.getMessage(MergeDialogComponent.class,"SaveFilesWarningQuestion",Integer.valueOf(unsavedPanelNames.size()))
+                    : NbBundle.getMessage(MergeDialogComponent.class,"SaveFilesQuestion",Integer.valueOf(unsavedPanelNames.size())),
                       NotifyDescriptor.YES_NO_CANCEL_OPTION));
         } else {
             if (warning) {
                 ret = DialogDisplayer.getDefault().notify(
                 new NotifyDescriptor.Confirmation(
-                      NbBundle.getMessage(MergeDialogComponent.class,"WarningQuestion",new Integer(unsavedPanelNames.size())),
+                      NbBundle.getMessage(MergeDialogComponent.class,"WarningQuestion",Integer.valueOf(unsavedPanelNames.size())),
                       NotifyDescriptor.OK_CANCEL_OPTION));
             } else {
                 ret = NotifyDescriptor.YES_OPTION;
diff --git a/ide/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java b/ide/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java
index 84f1823..7ae0cd7 100644
--- a/ide/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java
+++ b/ide/diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java
@@ -514,7 +514,7 @@ public class MergePanel extends javax.swing.JPanel implements java.awt.event.Act
   }
   
   private void updateAcceptButtons(int linePos) {
-      Integer conflictPos = new Integer(linePos);
+      Integer conflictPos = Integer.valueOf(linePos);
       boolean left = resolvedLeftConflictsLineNumbers.contains(conflictPos);
       boolean right = resolvedRightConflictsLineNumbers.contains(conflictPos);
       boolean leftRight = resolvedLeftRightConflictsLineNumbers.contains(conflictPos);
@@ -1166,7 +1166,7 @@ public class MergePanel extends javax.swing.JPanel implements java.awt.event.Act
      */
     public void replaceSource1InResult(int line1, int line2, int line3, int line4) {
         //System.out.println("replaceSource1InResult("+line1+", "+line2+", "+line3+", "+line4+")");
-        Integer conflictLine = new Integer((line1 > 0) ? line1 : 1);
+        Integer conflictLine = Integer.valueOf((line1 > 0) ? line1 : 1);
         // If trying to resolve the conflict twice simply return .
         if (resolvedLeftConflictsLineNumbers.contains(conflictLine)) return ;
         StyledDocument doc1 = (StyledDocument) jEditorPane1.getDocument();
@@ -1201,7 +1201,7 @@ public class MergePanel extends javax.swing.JPanel implements java.awt.event.Act
      */
     public void replaceSource2InResult(int line1, int line2, int line3, int line4) {
         //System.out.println("replaceSource2InResult("+line1+", "+line2+", "+line3+", "+line4+")");
-        Integer conflictLine = new Integer((line1 > 0) ? line1 : 1);
+        Integer conflictLine = Integer.valueOf((line1 > 0) ? line1 : 1);
         // If trying to resolve the conflict twice simply return .
         if (resolvedRightConflictsLineNumbers.contains(conflictLine)) return ;
         StyledDocument doc1 = (StyledDocument) jEditorPane2.getDocument();
diff --git a/ide/editor.completion/src/org/netbeans/modules/editor/completion/PatchedHtmlRenderer.java b/ide/editor.completion/src/org/netbeans/modules/editor/completion/PatchedHtmlRenderer.java
index b47d40f..a4a1025 100644
--- a/ide/editor.completion/src/org/netbeans/modules/editor/completion/PatchedHtmlRenderer.java
+++ b/ide/editor.completion/src/org/netbeans/modules/editor/completion/PatchedHtmlRenderer.java
@@ -1205,7 +1205,7 @@ public final class PatchedHtmlRenderer {
     private  static final boolean gtkShouldAntialias() {
         if (gtkAA == null) {
             Object o = Toolkit.getDefaultToolkit().getDesktopProperty("gnome.Xft/Antialias"); //NOI18N
-            gtkAA = new Integer(1).equals(o) ? Boolean.TRUE : Boolean.FALSE;
+            gtkAA = Integer.valueOf(1).equals(o) ? Boolean.TRUE : Boolean.FALSE;
         }
 
         return gtkAA.booleanValue();
diff --git a/ide/editor.deprecated.pre65formatting/src/org/netbeans/editor/Formatter.java b/ide/editor.deprecated.pre65formatting/src/org/netbeans/editor/Formatter.java
index 80bc9c2..57324f7 100644
--- a/ide/editor.deprecated.pre65formatting/src/org/netbeans/editor/Formatter.java
+++ b/ide/editor.deprecated.pre65formatting/src/org/netbeans/editor/Formatter.java
@@ -301,7 +301,7 @@ public class Formatter {
     public void setShiftWidth(int shiftWidth) {
         customShiftWidth = true;
         if (this.shiftWidth == null || this.shiftWidth.intValue() != shiftWidth) {
-            this.shiftWidth = new Integer(shiftWidth);
+            this.shiftWidth = Integer.valueOf(shiftWidth);
         }
     }
 
diff --git a/ide/editor.deprecated.pre65formatting/src/org/netbeans/modules/editor/FormatterIndentEngine.java b/ide/editor.deprecated.pre65formatting/src/org/netbeans/modules/editor/FormatterIndentEngine.java
index b0d507f..36fdc4d 100644
--- a/ide/editor.deprecated.pre65formatting/src/org/netbeans/modules/editor/FormatterIndentEngine.java
+++ b/ide/editor.deprecated.pre65formatting/src/org/netbeans/modules/editor/FormatterIndentEngine.java
@@ -162,11 +162,11 @@ public abstract class FormatterIndentEngine extends IndentEngine {
         getFormatter().setSpacesPerTab(spacesPerTab);
         if (old != spacesPerTab) {
             setValue(SimpleValueNames.SPACES_PER_TAB,
-                new Integer(spacesPerTab), SPACES_PER_TAB_PROP);
+                Integer.valueOf(spacesPerTab), SPACES_PER_TAB_PROP);
             
             firePropertyChange(SPACES_PER_TAB_PROP,
-                new Integer(old),
-                new Integer(spacesPerTab)
+                Integer.valueOf(old),
+                Integer.valueOf(spacesPerTab)
             );
         }
     }
diff --git a/ide/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationView.java b/ide/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationView.java
index 7447b20..ffc9ee9 100644
--- a/ide/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationView.java
+++ b/ide/editor.errorstripe/src/org/netbeans/modules/editor/errorstripe/AnnotationView.java
@@ -813,14 +813,14 @@ public class AnnotationView extends JComponent implements FoldHierarchyListener,
             }
             
             if (errors == 0 && warnings != 0) {
-                return MessageFormat.format(NbBundle.getBundle(AnnotationView.class).getString("TP_X_warning(s)"), new Object[] {new Integer(warnings)}); // NOI18N
+                return MessageFormat.format(NbBundle.getBundle(AnnotationView.class).getString("TP_X_warning(s)"), new Object[] {Integer.valueOf(warnings)}); // NOI18N
             }
             
             if (errors != 0 && warnings == 0) {
-                return MessageFormat.format(NbBundle.getBundle(AnnotationView.class).getString("TP_X_error(s)"), new Object[] {new Integer(errors)}); // NOI18N
+                return MessageFormat.format(NbBundle.getBundle(AnnotationView.class).getString("TP_X_error(s)"), new Object[] {Integer.valueOf(errors)}); // NOI18N
             }
             
-            return MessageFormat.format(NbBundle.getBundle(AnnotationView.class).getString("TP_X_error(s)_Y_warning(s)"), new Object[] {new Integer(errors), new Integer(warnings)}); // NOI18N
+            return MessageFormat.format(NbBundle.getBundle(AnnotationView.class).getString("TP_X_error(s)_Y_warning(s)"), new Object[] {Integer.valueOf(errors), Integer.valueOf(warnings)}); // NOI18N
         }
         
         Mark mark = getMarkForPoint(y);
diff --git a/ide/editor.lib/src/org/netbeans/editor/Analyzer.java b/ide/editor.lib/src/org/netbeans/editor/Analyzer.java
index f275249..18eb38a 100644
--- a/ide/editor.lib/src/org/netbeans/editor/Analyzer.java
+++ b/ide/editor.lib/src/org/netbeans/editor/Analyzer.java
@@ -563,7 +563,7 @@ public class Analyzer {
  */
 
                 // Set the line limit document property
-// [PENDING]                doc.putProperty(BaseDocument.LINE_LIMIT_PROP, new Integer(maxLineLength));
+// [PENDING]                doc.putProperty(BaseDocument.LINE_LIMIT_PROP, Integer.valueOf(maxLineLength));
 
         }
     }
diff --git a/ide/editor.lib/src/org/netbeans/editor/AnnotationType.java b/ide/editor.lib/src/org/netbeans/editor/AnnotationType.java
index 381a405..8c128c5 100644
--- a/ide/editor.lib/src/org/netbeans/editor/AnnotationType.java
+++ b/ide/editor.lib/src/org/netbeans/editor/AnnotationType.java
@@ -419,7 +419,7 @@ public class AnnotationType {
     /** Setter for the CombinationOrder property
      * @param order order of the annotation type combination */    
     public void setCombinationOrder(int order) {
-        putProp(PROP_COMBINATION_ORDER, new Integer(order));
+        putProp(PROP_COMBINATION_ORDER, Integer.valueOf(order));
     }
     
     /** Setter for the CombinationOrder property
@@ -432,7 +432,7 @@ public class AnnotationType {
             Utilities.annotateLoggable(ex);
             return;
         }
-        putProp(PROP_COMBINATION_ORDER, new Integer(order));
+        putProp(PROP_COMBINATION_ORDER, Integer.valueOf(order));
     }
 
     /** Getter for MinimumOptionals property
@@ -445,7 +445,7 @@ public class AnnotationType {
     }
 
     public void setMinimumOptionals(int min) {
-        putProp(PROP_COMBINATION_MINIMUM_OPTIONALS, new Integer(min));
+        putProp(PROP_COMBINATION_MINIMUM_OPTIONALS, Integer.valueOf(min));
     }
     
     public void setMinimumOptionals(String m) {
@@ -456,7 +456,7 @@ public class AnnotationType {
             Utilities.annotateLoggable(ex);
             return;
         }
-        putProp(PROP_COMBINATION_MINIMUM_OPTIONALS, new Integer(min));
+        putProp(PROP_COMBINATION_MINIMUM_OPTIONALS, Integer.valueOf(min));
     }
     
     /** Getter for Visible property
@@ -542,7 +542,7 @@ public class AnnotationType {
     }
 
     public void setPriority(int priority) {
-        putProp(PROP_PRIORITY, new Integer(priority));
+        putProp(PROP_PRIORITY, Integer.valueOf(priority));
     }
 
     public boolean isBrowseable() {
diff --git a/ide/editor.lib/src/org/netbeans/editor/AnnotationTypes.java b/ide/editor.lib/src/org/netbeans/editor/AnnotationTypes.java
index c40308e..fdb1311 100644
--- a/ide/editor.lib/src/org/netbeans/editor/AnnotationTypes.java
+++ b/ide/editor.lib/src/org/netbeans/editor/AnnotationTypes.java
@@ -171,7 +171,7 @@ public class AnnotationTypes {
         loadSettings();
         
         if (getProp(PROP_BACKGROUND_GLYPH_ALPHA) == null)
-            return new Integer(40);
+            return Integer.valueOf(40);
         return (Integer)getProp(PROP_BACKGROUND_GLYPH_ALPHA);
     }
 
@@ -181,7 +181,7 @@ public class AnnotationTypes {
         if (alpha < 0 || alpha > 100) {
             return;
         }
-        Integer i = new Integer(alpha);
+        Integer i = Integer.valueOf(alpha);
         putProp(PROP_BACKGROUND_GLYPH_ALPHA, i);
         firePropertyChange(PROP_BACKGROUND_GLYPH_ALPHA, null, null);
         
diff --git a/ide/editor.lib/src/org/netbeans/editor/BaseDocument.java b/ide/editor.lib/src/org/netbeans/editor/BaseDocument.java
index 9800d8a..e645982 100644
--- a/ide/editor.lib/src/org/netbeans/editor/BaseDocument.java
+++ b/ide/editor.lib/src/org/netbeans/editor/BaseDocument.java
@@ -367,7 +367,7 @@ public class BaseDocument extends AbstractDocument implements AtomicLockDocument
                 if (readBufferSize <= 0) {
                     readBufferSize = EditorPreferencesDefaults.defaultReadBufferSize;
                 }
-                putProperty(EditorPreferencesKeys.READ_BUFFER_SIZE, new Integer(readBufferSize));
+                putProperty(EditorPreferencesKeys.READ_BUFFER_SIZE, Integer.valueOf(readBufferSize));
             }
 
             if (key == null || EditorPreferencesKeys.WRITE_BUFFER_SIZE.equals(key)) {
@@ -375,7 +375,7 @@ public class BaseDocument extends AbstractDocument implements AtomicLockDocument
                 if (writeBufferSize <= 0) {
                     writeBufferSize = EditorPreferencesDefaults.defaultWriteBufferSize;
                 }
-                putProperty(EditorPreferencesKeys.WRITE_BUFFER_SIZE, new Integer(writeBufferSize));
+                putProperty(EditorPreferencesKeys.WRITE_BUFFER_SIZE, Integer.valueOf(writeBufferSize));
             }
 
             if (key == null || EditorPreferencesKeys.MARK_DISTANCE.equals(key)) {
@@ -383,7 +383,7 @@ public class BaseDocument extends AbstractDocument implements AtomicLockDocument
                 if (markDistance <= 0) {
                     markDistance = EditorPreferencesDefaults.defaultMarkDistance;
                 }
-                putProperty(EditorPreferencesKeys.MARK_DISTANCE, new Integer(markDistance));
+                putProperty(EditorPreferencesKeys.MARK_DISTANCE, Integer.valueOf(markDistance));
             }
 
             if (key == null || EditorPreferencesKeys.MAX_MARK_DISTANCE.equals(key)) {
@@ -391,7 +391,7 @@ public class BaseDocument extends AbstractDocument implements AtomicLockDocument
                 if (maxMarkDistance <= 0) {
                     maxMarkDistance = EditorPreferencesDefaults.defaultMaxMarkDistance;
                 }
-                putProperty(EditorPreferencesKeys.MAX_MARK_DISTANCE, new Integer(maxMarkDistance));
+                putProperty(EditorPreferencesKeys.MAX_MARK_DISTANCE, Integer.valueOf(maxMarkDistance));
             }
 
             if (key == null || EditorPreferencesKeys.MIN_MARK_DISTANCE.equals(key)) {
@@ -399,7 +399,7 @@ public class BaseDocument extends AbstractDocument implements AtomicLockDocument
                 if (minMarkDistance <=0 ) {
                     minMarkDistance = EditorPreferencesDefaults.defaultMinMarkDistance;
                 }
-                putProperty(EditorPreferencesKeys.MIN_MARK_DISTANCE, new Integer(minMarkDistance));
+                putProperty(EditorPreferencesKeys.MIN_MARK_DISTANCE, Integer.valueOf(minMarkDistance));
             }
 
             if (key == null || EditorPreferencesKeys.READ_MARK_DISTANCE.equals(key)) {
@@ -407,7 +407,7 @@ public class BaseDocument extends AbstractDocument implements AtomicLockDocument
                 if (readMarkDistance <= 0) {
                     readMarkDistance = EditorPreferencesDefaults.defaultReadMarkDistance;
                 }
-                putProperty(EditorPreferencesKeys.READ_MARK_DISTANCE, new Integer(readMarkDistance));
+                putProperty(EditorPreferencesKeys.READ_MARK_DISTANCE, Integer.valueOf(readMarkDistance));
             }
 
             if (key == null || EditorPreferencesKeys.SYNTAX_UPDATE_BATCH_SIZE.equals(key)) {
@@ -415,7 +415,7 @@ public class BaseDocument extends AbstractDocument implements AtomicLockDocument
                 if (syntaxUpdateBatchSize <= 0) {
                     syntaxUpdateBatchSize = 7 * (Integer) getProperty(EditorPreferencesKeys.MARK_DISTANCE);
                 }
-                putProperty(EditorPreferencesKeys.SYNTAX_UPDATE_BATCH_SIZE, new Integer(syntaxUpdateBatchSize));
+                putProperty(EditorPreferencesKeys.SYNTAX_UPDATE_BATCH_SIZE, Integer.valueOf(syntaxUpdateBatchSize));
             }
 
             if (key == null || LINE_BATCH_SIZE.equals(key)) {
@@ -423,7 +423,7 @@ public class BaseDocument extends AbstractDocument implements AtomicLockDocument
                 if (lineBatchSize <= 0) {
                     lineBatchSize = EditorPreferencesDefaults.defaultLineBatchSize;
                 }
-                putProperty(LINE_BATCH_SIZE, new Integer(lineBatchSize));
+                putProperty(LINE_BATCH_SIZE, Integer.valueOf(lineBatchSize));
             }
 
             if (key == null || EditorPreferencesKeys.IDENTIFIER_ACCEPTOR.equals(key)) {
diff --git a/ide/editor.lib/src/org/netbeans/editor/Coloring.java b/ide/editor.lib/src/org/netbeans/editor/Coloring.java
index 4cc7f40..b048f67 100644
--- a/ide/editor.lib/src/org/netbeans/editor/Coloring.java
+++ b/ide/editor.lib/src/org/netbeans/editor/Coloring.java
@@ -830,7 +830,7 @@ public final class Coloring implements java.io.Serializable {
 
         return new Object [] {
             new Font(fontFamily, style, fontSize),
-            new Integer(applyMode)
+            Integer.valueOf(applyMode)
         };
     }
 
diff --git a/ide/editor.lib/src/org/netbeans/editor/EditorUI.java b/ide/editor.lib/src/org/netbeans/editor/EditorUI.java
index c93490e..2463c8e 100644
--- a/ide/editor.lib/src/org/netbeans/editor/EditorUI.java
+++ b/ide/editor.lib/src/org/netbeans/editor/EditorUI.java
@@ -834,7 +834,7 @@ public class EditorUI implements ChangeListener, PropertyChangeListener, MouseLi
             int oldLineHeight = lineHeight;
             lineHeight = (int)(maxHeight * lineHeightCorrection);
             if (oldLineHeight != lineHeight && oldLineHeight != -1) {
-                firePropertyChange(LINE_HEIGHT_CHANGED_PROP, new Integer(oldLineHeight), new Integer(lineHeight));
+                firePropertyChange(LINE_HEIGHT_CHANGED_PROP, Integer.valueOf(oldLineHeight), Integer.valueOf(lineHeight));
             }
         }
     }
diff --git a/ide/editor.lib/src/org/netbeans/editor/GuardedDocument.java b/ide/editor.lib/src/org/netbeans/editor/GuardedDocument.java
index 2b8b8d4..5318dcb 100644
--- a/ide/editor.lib/src/org/netbeans/editor/GuardedDocument.java
+++ b/ide/editor.lib/src/org/netbeans/editor/GuardedDocument.java
@@ -219,7 +219,7 @@ public class GuardedDocument extends BaseDocument
                         MessageFormat.format(
                             NbBundle.getBundle(BaseKit.class).getString(FMT_GUARDED_INSERT_LOCALE),
                             new Object [] {
-                                new Integer(offset)
+                                Integer.valueOf(offset)
                             }
                         ),
                         offset
@@ -272,7 +272,7 @@ public class GuardedDocument extends BaseDocument
                     MessageFormat.format(
                         NbBundle.getBundle(BaseKit.class).getString(FMT_GUARDED_REMOVE_LOCALE),
                         new Object [] {
-                            new Integer(offset)
+                            Integer.valueOf(offset)
                         }
                     ),
                     offset
diff --git a/ide/editor.lib/src/org/netbeans/editor/MultiKeyBinding.java b/ide/editor.lib/src/org/netbeans/editor/MultiKeyBinding.java
index da71138..19ad10c 100644
--- a/ide/editor.lib/src/org/netbeans/editor/MultiKeyBinding.java
+++ b/ide/editor.lib/src/org/netbeans/editor/MultiKeyBinding.java
@@ -230,14 +230,14 @@ public class MultiKeyBinding extends JTextComponent.KeyBinding
     throws java.io.IOException {
 
         if( keys != null ) {
-            out.writeObject( new Integer( keys.length ) );
+            out.writeObject( Integer.valueOf( keys.length ) );
             for( int i=0; i<keys.length; i++ ) {
                 out.writeInt( keys[i].getKeyCode() );
                 out.writeInt( keys[i].getModifiers() );
                 out.writeBoolean( keys[i].isOnKeyRelease() );
             }
         } else {
-            out.writeObject( new Integer( -1 ) );
+            out.writeObject( Integer.valueOf( -1 ) );
         }
 
         if( key != null ) {
diff --git a/ide/editor.lib/src/org/netbeans/editor/ext/ExtSyntaxSupport.java b/ide/editor.lib/src/org/netbeans/editor/ext/ExtSyntaxSupport.java
index 6eb39ee..8358624 100644
--- a/ide/editor.lib/src/org/netbeans/editor/ext/ExtSyntaxSupport.java
+++ b/ide/editor.lib/src/org/netbeans/editor/ext/ExtSyntaxSupport.java
@@ -332,7 +332,7 @@ public class ExtSyntaxSupport extends SyntaxSupport {
     }
 
     public Map getLocalVariableMap(int offset) {
-        Integer posI = new Integer(offset);
+        Integer posI = Integer.valueOf(offset);
         Map varMap = (Map)localVarMaps.get(posI);
         if (varMap == null) {
             varMap = buildLocalVariableMap(offset);
@@ -356,7 +356,7 @@ public class ExtSyntaxSupport extends SyntaxSupport {
     }
 
     public Map getGlobalVariableMap(int offset) {
-        Integer posI = new Integer(offset);
+        Integer posI = Integer.valueOf(offset);
         Map varMap = (Map)globalVarMaps.get(posI);
         if (varMap == null) {
             varMap = buildGlobalVariableMap(offset);
diff --git a/ide/editor.lib/src/org/netbeans/editor/ext/ToolTipSupport.java b/ide/editor.lib/src/org/netbeans/editor/ext/ToolTipSupport.java
index ef64103..5664510 100644
--- a/ide/editor.lib/src/org/netbeans/editor/ext/ToolTipSupport.java
+++ b/ide/editor.lib/src/org/netbeans/editor/ext/ToolTipSupport.java
@@ -668,7 +668,7 @@ public class ToolTipSupport {
             int oldStatus = this.status;
             this.status = status;
             firePropertyChange(PROP_STATUS,
-                new Integer(oldStatus), new Integer(this.status));
+                Integer.valueOf(oldStatus), Integer.valueOf(this.status));
         }
     }
 
@@ -926,7 +926,7 @@ public class ToolTipSupport {
             enterTimer.setDelay(delay);
 
             firePropertyChange(PROP_INITIAL_DELAY,
-                new Integer(oldDelay), new Integer(enterTimer.getDelay()));
+                Integer.valueOf(oldDelay), Integer.valueOf(enterTimer.getDelay()));
         }
     }
 
@@ -948,7 +948,7 @@ public class ToolTipSupport {
             exitTimer.setDelay(delay);
             
             firePropertyChange(PROP_DISMISS_DELAY,
-                new Integer(oldDelay), new Integer(exitTimer.getDelay()));
+                Integer.valueOf(oldDelay), Integer.valueOf(exitTimer.getDelay()));
         }
     }
 
diff --git a/ide/editor.lib/src/org/netbeans/modules/editor/lib/drawing/DrawLayerList.java b/ide/editor.lib/src/org/netbeans/modules/editor/lib/drawing/DrawLayerList.java
index 42acfef..65af63c 100644
--- a/ide/editor.lib/src/org/netbeans/modules/editor/lib/drawing/DrawLayerList.java
+++ b/ide/editor.lib/src/org/netbeans/modules/editor/lib/drawing/DrawLayerList.java
@@ -73,7 +73,7 @@ public final class DrawLayerList {
         layers = new DrawLayer[layers.length + 1];
         l.toArray(layers);
 
-        visibilityList.add(indAdd, new Integer(visibility));
+        visibilityList.add(indAdd, Integer.valueOf(visibility));
 
         return true;
     }
diff --git a/ide/editor.lib/src/org/netbeans/modules/editor/lib/impl/MarkVector.java b/ide/editor.lib/src/org/netbeans/modules/editor/lib/impl/MarkVector.java
index cbf3e3c..f770f40 100644
--- a/ide/editor.lib/src/org/netbeans/modules/editor/lib/impl/MarkVector.java
+++ b/ide/editor.lib/src/org/netbeans/modules/editor/lib/impl/MarkVector.java
@@ -723,10 +723,10 @@ public final class MarkVector {
 //    private Object[] toObjects() {
 //        return new Object[] {
 //            markArray.clone(),
-//            new Integer(gapStart),
-//            new Integer(gapLength),
-//            new Integer(offsetGapStart),
-//            new Integer(offsetGapLength)
+//            Integer.valueOf(gapStart),
+//            Integer.valueOf(gapLength),
+//            Integer.valueOf(offsetGapStart),
+//            Integer.valueOf(offsetGapLength)
 //        };
 //    }
 
diff --git a/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/EditorCaretTransferHandler.java b/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/EditorCaretTransferHandler.java
index dd9dfdd..de0f1ed 100644
--- a/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/EditorCaretTransferHandler.java
+++ b/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/EditorCaretTransferHandler.java
@@ -136,7 +136,7 @@ public class EditorCaretTransferHandler extends TransferHandler {
                     "exportDone", // NOI18N
                     new Class[]{javax.swing.JComponent.class, Transferable.class, int.class});
             method.setAccessible(true);
-            method.invoke(delegate, new Object[]{source, data, new Integer(action)});
+            method.invoke(delegate, new Object[]{source, data, Integer.valueOf(action)});
         } catch (NoSuchMethodException ex) {
             ex.printStackTrace();
         } catch (IllegalAccessException ex) {
diff --git a/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/RectangularSelectionTransferHandler.java b/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/RectangularSelectionTransferHandler.java
index 2d88655..e5bdbc9 100644
--- a/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/RectangularSelectionTransferHandler.java
+++ b/ide/editor.lib2/src/org/netbeans/modules/editor/lib2/RectangularSelectionTransferHandler.java
@@ -129,7 +129,7 @@ public class RectangularSelectionTransferHandler extends TransferHandler {
                     "exportDone", // NOI18N
                     new Class[]{javax.swing.JComponent.class, Transferable.class, int.class});
             method.setAccessible(true);
-            method.invoke(delegate, new Object[]{source, data, new Integer(action)});
+            method.invoke(delegate, new Object[]{source, data, Integer.valueOf(action)});
         } catch (NoSuchMethodException ex) {
             ex.printStackTrace();
         } catch (IllegalAccessException ex) {
diff --git a/ide/editor.structure/src/org/netbeans/modules/editor/structure/formatting/TagBasedLexerFormatter.java b/ide/editor.structure/src/org/netbeans/modules/editor/structure/formatting/TagBasedLexerFormatter.java
index cd0020c..4971e49 100644
--- a/ide/editor.structure/src/org/netbeans/modules/editor/structure/formatting/TagBasedLexerFormatter.java
+++ b/ide/editor.structure/src/org/netbeans/modules/editor/structure/formatting/TagBasedLexerFormatter.java
@@ -485,7 +485,7 @@ public abstract class TagBasedLexerFormatter {
             BaseDocument doc = (BaseDocument) context.document();
             
             if (isTopLevelLanguage(doc)) {
-                doc.putProperty(TransferData.ORG_CARET_OFFSET_DOCPROPERTY, new Integer(context.caretOffset()));
+                doc.putProperty(TransferData.ORG_CARET_OFFSET_DOCPROPERTY, Integer.valueOf(context.caretOffset()));
             }
 
             Integer dotPos = (Integer) doc.getProperty(TransferData.ORG_CARET_OFFSET_DOCPROPERTY);
diff --git a/ide/git/src/org/netbeans/modules/git/ui/clone/CloneWizard.java b/ide/git/src/org/netbeans/modules/git/ui/clone/CloneWizard.java
index c6cbd69..d187d05 100644
--- a/ide/git/src/org/netbeans/modules/git/ui/clone/CloneWizard.java
+++ b/ide/git/src/org/netbeans/modules/git/ui/clone/CloneWizard.java
@@ -203,7 +203,7 @@ class CloneWizard  implements ChangeListener {
                 if (c instanceof JComponent) { // assume Swing components
                     JComponent jc = (JComponent) c;
                     // Sets step number of a component
-                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i)); // NOI18N
+                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i)); // NOI18N
                     // Sets steps names for a panel
                     jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N
                     // Turn on subtitle creation on each step
diff --git a/ide/git/src/org/netbeans/modules/git/ui/fetch/FetchWizard.java b/ide/git/src/org/netbeans/modules/git/ui/fetch/FetchWizard.java
index 2750816..2f1c0b9 100644
--- a/ide/git/src/org/netbeans/modules/git/ui/fetch/FetchWizard.java
+++ b/ide/git/src/org/netbeans/modules/git/ui/fetch/FetchWizard.java
@@ -130,7 +130,7 @@ class FetchWizard  implements ChangeListener {
                 if (c instanceof JComponent) { // assume Swing components
                     JComponent jc = (JComponent) c;
                     // Sets step number of a component
-                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i)); // NOI18N
+                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i)); // NOI18N
                     // Sets steps names for a panel
                     jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N
                     // Turn on subtitle creation on each step
diff --git a/ide/git/src/org/netbeans/modules/git/ui/fetch/PullWizard.java b/ide/git/src/org/netbeans/modules/git/ui/fetch/PullWizard.java
index 77c7da0..572ba4e 100644
--- a/ide/git/src/org/netbeans/modules/git/ui/fetch/PullWizard.java
+++ b/ide/git/src/org/netbeans/modules/git/ui/fetch/PullWizard.java
@@ -133,7 +133,7 @@ class PullWizard  implements ChangeListener {
                 if (c instanceof JComponent) { // assume Swing components
                     JComponent jc = (JComponent) c;
                     // Sets step number of a component
-                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i)); // NOI18N
+                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i)); // NOI18N
                     // Sets steps names for a panel
                     jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N
                     // Turn on subtitle creation on each step
diff --git a/ide/git/src/org/netbeans/modules/git/ui/push/PushWizard.java b/ide/git/src/org/netbeans/modules/git/ui/push/PushWizard.java
index 9f57829..e67d624 100644
--- a/ide/git/src/org/netbeans/modules/git/ui/push/PushWizard.java
+++ b/ide/git/src/org/netbeans/modules/git/ui/push/PushWizard.java
@@ -140,7 +140,7 @@ class PushWizard  implements ChangeListener {
                 if (c instanceof JComponent) { // assume Swing components
                     JComponent jc = (JComponent) c;
                     // Sets step number of a component
-                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i)); // NOI18N
+                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i)); // NOI18N
                     // Sets steps names for a panel
                     jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N
                     // Turn on subtitle creation on each step
diff --git a/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/MessageStack.java b/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/MessageStack.java
index e56fdd7..4ff85e0 100644
--- a/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/MessageStack.java
+++ b/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/MessageStack.java
@@ -141,8 +141,8 @@ public final class MessageStack {
             throw new IllegalArgumentException(
                     java.text.MessageFormat.format(
                         "Message type out of bounds (0 .. {1}): {0}",   //NOI18N
-                        new Object[] { new Integer(layer),
-                                       new Integer(messageLayers.length) }));
+                        new Object[] { Integer.valueOf(layer),
+                                       Integer.valueOf(messageLayers.length) }));
         }
         
         /* unify parameters: */
diff --git a/ide/html.editor/src/org/netbeans/modules/html/editor/HtmlTransferHandler.java b/ide/html.editor/src/org/netbeans/modules/html/editor/HtmlTransferHandler.java
index f15cdca..c3afa94 100644
--- a/ide/html.editor/src/org/netbeans/modules/html/editor/HtmlTransferHandler.java
+++ b/ide/html.editor/src/org/netbeans/modules/html/editor/HtmlTransferHandler.java
@@ -151,7 +151,7 @@ public class HtmlTransferHandler extends TransferHandler implements UIResource {
                     "exportDone", // NOI18N
                     new Class[]{javax.swing.JComponent.class, Transferable.class, int.class});
             method.setAccessible(true);
-            method.invoke(delegate, new Object[]{source, data, new Integer(action)});
+            method.invoke(delegate, new Object[]{source, data, Integer.valueOf(action)});
         } catch (NoSuchMethodException ex) {
             ex.printStackTrace();
         } catch (IllegalAccessException ex) {
diff --git a/ide/html.editor/src/org/netbeans/modules/html/editor/javadoc/SAXHelpHandler.java b/ide/html.editor/src/org/netbeans/modules/html/editor/javadoc/SAXHelpHandler.java
index 94e9c14..2b69845 100644
--- a/ide/html.editor/src/org/netbeans/modules/html/editor/javadoc/SAXHelpHandler.java
+++ b/ide/html.editor/src/org/netbeans/modules/html/editor/javadoc/SAXHelpHandler.java
@@ -109,7 +109,7 @@ class SAXHelpHandler extends DefaultHandler {
                 int offset = 0;
                 if (value != null){
                     try{
-                        offset = (new Integer(value)).intValue();
+                        offset = Integer.parseInt(value);
                     }
                     catch (NumberFormatException e){
                     }
@@ -131,7 +131,7 @@ class SAXHelpHandler extends DefaultHandler {
                 int offset = 0;
                 if (value != null){
                     try{
-                        offset = (new Integer(value)).intValue();
+                        offset = Integer.parseInt(value);
                     }
                     catch (NumberFormatException e){
                     }
diff --git a/ide/html.editor/src/org/netbeans/modules/html/editor/refactoring/actions/HtmlRefactoringGlobalAction.java b/ide/html.editor/src/org/netbeans/modules/html/editor/refactoring/actions/HtmlRefactoringGlobalAction.java
index 7223522..a94b75e 100644
--- a/ide/html.editor/src/org/netbeans/modules/html/editor/refactoring/actions/HtmlRefactoringGlobalAction.java
+++ b/ide/html.editor/src/org/netbeans/modules/html/editor/refactoring/actions/HtmlRefactoringGlobalAction.java
@@ -64,7 +64,7 @@ public abstract class HtmlRefactoringGlobalAction extends NodeAction {
     }
     
     protected void setMnemonic(char m) {
-        putValue(Action.MNEMONIC_KEY, new Integer(m));
+        putValue(Action.MNEMONIC_KEY, Integer.valueOf(m));
     }
     
     private static String trim(String arg) {
diff --git a/ide/html/src/org/netbeans/modules/html/palette/items/IMGCustomizer.java b/ide/html/src/org/netbeans/modules/html/palette/items/IMGCustomizer.java
index be66c41..3d1a0b1 100644
--- a/ide/html/src/org/netbeans/modules/html/palette/items/IMGCustomizer.java
+++ b/ide/html/src/org/netbeans/modules/html/palette/items/IMGCustomizer.java
@@ -294,9 +294,9 @@ public class IMGCustomizer extends javax.swing.JPanel {
             try {
                 Image img = new ImageIcon(file.getAbsolutePath()).getImage();
                 int width = img.getWidth(null);
-                jTextField2.setText(width != -1 ? new Integer(width).toString() : "");
+                jTextField2.setText(width != -1 ? Integer.valueOf(width).toString() : "");
                 int height = img.getHeight(null);
-                jTextField3.setText(height != -1 ? new Integer(height).toString() : "");
+                jTextField3.setText(height != -1 ? Integer.valueOf(height).toString() : "");
                 jTextField4.setText(imgFO.getName());
             }
             catch (Exception ex) {
diff --git a/ide/html/src/org/netbeans/modules/html/palette/items/OLCustomizer.java b/ide/html/src/org/netbeans/modules/html/palette/items/OLCustomizer.java
index 219f393..6a08015 100644
--- a/ide/html/src/org/netbeans/modules/html/palette/items/OLCustomizer.java
+++ b/ide/html/src/org/netbeans/modules/html/palette/items/OLCustomizer.java
@@ -250,7 +250,7 @@ public class OLCustomizer extends javax.swing.JPanel {
 
         jSpinner1.setModel(new SpinnerNumberModel(ol.getCount(), 0, Integer.MAX_VALUE, 1));
         jSpinner1.setEditor(new NumberEditor(jSpinner1, "#"));
-        jSpinner1.setValue(new Integer(ol.getCount()));
+        jSpinner1.setValue(Integer.valueOf(ol.getCount()));
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
         gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 18);
diff --git a/ide/html/src/org/netbeans/modules/html/palette/items/SELECTCustomizer.java b/ide/html/src/org/netbeans/modules/html/palette/items/SELECTCustomizer.java
index 36c370b..b2ce270 100644
--- a/ide/html/src/org/netbeans/modules/html/palette/items/SELECTCustomizer.java
+++ b/ide/html/src/org/netbeans/modules/html/palette/items/SELECTCustomizer.java
@@ -217,7 +217,7 @@ public class SELECTCustomizer extends javax.swing.JPanel {
 
         jSpinner1.setModel(new SpinnerNumberModel(select.getOptions(), 0, Integer.MAX_VALUE, 1));
         jSpinner1.setEditor(new JSpinner.NumberEditor(jSpinner1, "#"));
-        jSpinner1.setValue(new Integer(select.getOptions()));
+        jSpinner1.setValue(Integer.valueOf(select.getOptions()));
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 1;
@@ -240,7 +240,7 @@ public class SELECTCustomizer extends javax.swing.JPanel {
 
         jSpinner2.setModel(new SpinnerNumberModel(select.getOptionsVisible(), 1, Integer.MAX_VALUE, 1));
         jSpinner2.setEditor(new JSpinner.NumberEditor(jSpinner2, "#"));
-        jSpinner2.setValue(new Integer(select.getOptionsVisible()));
+        jSpinner2.setValue(Integer.valueOf(select.getOptionsVisible()));
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 2;
diff --git a/ide/html/src/org/netbeans/modules/html/palette/items/TABLECustomizer.java b/ide/html/src/org/netbeans/modules/html/palette/items/TABLECustomizer.java
index 0df6253..a5ef12c 100644
--- a/ide/html/src/org/netbeans/modules/html/palette/items/TABLECustomizer.java
+++ b/ide/html/src/org/netbeans/modules/html/palette/items/TABLECustomizer.java
@@ -154,7 +154,7 @@ public class TABLECustomizer extends javax.swing.JPanel {
 
         jSpinner1.setModel(new SpinnerNumberModel(table.getRows(), 0, Integer.MAX_VALUE, 1));
         jSpinner1.setEditor(new JSpinner.NumberEditor(jSpinner1, "#"));
-        jSpinner1.setValue(new Integer(table.getRows()));
+        jSpinner1.setValue(Integer.valueOf(table.getRows()));
         jSpinner1.addChangeListener(new javax.swing.event.ChangeListener() {
             public void stateChanged(javax.swing.event.ChangeEvent evt) {
                 jSpinner1StateChanged(evt);
@@ -163,7 +163,7 @@ public class TABLECustomizer extends javax.swing.JPanel {
 
         jSpinner2.setModel(new SpinnerNumberModel(table.getCols(), 0, Integer.MAX_VALUE, 1));
         jSpinner2.setEditor(new JSpinner.NumberEditor(jSpinner2, "#"));
-        jSpinner2.setValue(new Integer(table.getCols()));
+        jSpinner2.setValue(Integer.valueOf(table.getCols()));
         jSpinner2.addChangeListener(new javax.swing.event.ChangeListener() {
             public void stateChanged(javax.swing.event.ChangeEvent evt) {
                 jSpinner2StateChanged(evt);
@@ -188,19 +188,19 @@ public class TABLECustomizer extends javax.swing.JPanel {
 
         jSpinner3.setModel(new SpinnerNumberModel(table.getBorder(), 0, Integer.MAX_VALUE, 1));
         jSpinner3.setEditor(new JSpinner.NumberEditor(jSpinner3, "#"));
-        jSpinner3.setValue(new Integer(table.getBorder()));
+        jSpinner3.setValue(Integer.valueOf(table.getBorder()));
 
         jSpinner4.setModel(new SpinnerNumberModel(table.getCspac(), 0, Integer.MAX_VALUE, 1));
         jSpinner4.setEditor(new JSpinner.NumberEditor(jSpinner4, "#"));
-        jSpinner4.setValue(new Integer(table.getCspac()));
+        jSpinner4.setValue(Integer.valueOf(table.getCspac()));
 
         jSpinner5.setModel(new SpinnerNumberModel(table.getCpadd(), 0, Integer.MAX_VALUE, 1));
         jSpinner5.setEditor(new JSpinner.NumberEditor(jSpinner5, "#"));
-        jSpinner5.setValue(new Integer(table.getCpadd()));
+        jSpinner5.setValue(Integer.valueOf(table.getCpadd()));
 
         widthSpinner.setModel(new SpinnerNumberModel(table.getWidth(), 0, Integer.MAX_VALUE, 1));
         widthSpinner.setEditor(new JSpinner.NumberEditor(widthSpinner, "#"));
-        widthSpinner.setValue(new Integer(table.getWidth()));
+        widthSpinner.setValue(Integer.valueOf(table.getWidth()));
 
         jLabel9.setForeground(javax.swing.UIManager.getDefaults().getColor("nb.errorForeground"));
         org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(TABLECustomizer.class, "TABLECustomizer.jLabel9.text")); // NOI18N
diff --git a/ide/html/src/org/netbeans/modules/html/palette/items/TEXTAREACustomizer.java b/ide/html/src/org/netbeans/modules/html/palette/items/TEXTAREACustomizer.java
index 1f5f976..7ffbd79 100644
--- a/ide/html/src/org/netbeans/modules/html/palette/items/TEXTAREACustomizer.java
+++ b/ide/html/src/org/netbeans/modules/html/palette/items/TEXTAREACustomizer.java
@@ -218,7 +218,7 @@ public class TEXTAREACustomizer extends javax.swing.JPanel {
 
         jSpinner1.setModel(new SpinnerNumberModel(textArea.getRows(), 1, Integer.MAX_VALUE, 1));
         jSpinner1.setEditor(new JSpinner.NumberEditor(jSpinner1, "#"));
-        jSpinner1.setValue(new Integer(textArea.getRows()));
+        jSpinner1.setValue(Integer.valueOf(textArea.getRows()));
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 4;
@@ -230,7 +230,7 @@ public class TEXTAREACustomizer extends javax.swing.JPanel {
 
         jSpinner2.setModel(new SpinnerNumberModel(textArea.getCols(), 1, Integer.MAX_VALUE, 1));
         jSpinner2.setEditor(new JSpinner.NumberEditor(jSpinner2, "#"));
-        jSpinner2.setValue(new Integer(textArea.getCols()));
+        jSpinner2.setValue(Integer.valueOf(textArea.getCols()));
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridx = 1;
         gridBagConstraints.gridy = 5;
diff --git a/ide/html/src/org/netbeans/modules/html/palette/items/ULCustomizer.java b/ide/html/src/org/netbeans/modules/html/palette/items/ULCustomizer.java
index 33c9901..7c4961b 100644
--- a/ide/html/src/org/netbeans/modules/html/palette/items/ULCustomizer.java
+++ b/ide/html/src/org/netbeans/modules/html/palette/items/ULCustomizer.java
@@ -214,7 +214,7 @@ public class ULCustomizer extends javax.swing.JPanel {
 
         jSpinner1.setModel(new SpinnerNumberModel(ul.getCount(), 0, Integer.MAX_VALUE, 1));
         jSpinner1.setEditor(new NumberEditor(jSpinner1, "#"));
-        jSpinner1.setValue(new Integer(ul.getCount()));
+        jSpinner1.setValue(Integer.valueOf(ul.getCount()));
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
         gridBagConstraints.insets = new java.awt.Insets(12, 12, 0, 18);
diff --git a/ide/httpserver/src/org/netbeans/modules/httpserver/HttpServerModule.java b/ide/httpserver/src/org/netbeans/modules/httpserver/HttpServerModule.java
index fae6a59..75afb202 100644
--- a/ide/httpserver/src/org/netbeans/modules/httpserver/HttpServerModule.java
+++ b/ide/httpserver/src/org/netbeans/modules/httpserver/HttpServerModule.java
@@ -95,7 +95,7 @@ public class HttpServerModule extends ModuleInstall implements Externalizable {
                                 reloader.activate();
                                 // this is not a debug message, this is a server startup message
                                 if (httpserverSettings().isStartStopMessages())
-                                    System.out.println(NbBundle.getMessage(HttpServerModule.class, "CTL_ServerStarted", new Object[] {new Integer(httpserverSettings().getPort())}));
+                                    System.out.println(NbBundle.getMessage(HttpServerModule.class, "CTL_ServerStarted", new Object[] {Integer.valueOf(httpserverSettings().getPort())}));
                             } catch (ThreadDeath td) {
                                 throw td;
                             } catch (Throwable ex) {
diff --git a/ide/httpserver/src/org/netbeans/modules/httpserver/HttpServerSettings.java b/ide/httpserver/src/org/netbeans/modules/httpserver/HttpServerSettings.java
index 5b07d81..332bcdb 100644
--- a/ide/httpserver/src/org/netbeans/modules/httpserver/HttpServerSettings.java
+++ b/ide/httpserver/src/org/netbeans/modules/httpserver/HttpServerSettings.java
@@ -257,7 +257,7 @@ public final class HttpServerSettings {
     public void setPort(int p) {
         if (p <= 0 || p >65535) {
             NotifyDescriptor.Message msg = new NotifyDescriptor.Message(
-                        NbBundle.getMessage(HttpServerSettings.class, "ERR_PortNumberOutOfRange", new Integer(p)), NotifyDescriptor.ERROR_MESSAGE);
+                        NbBundle.getMessage(HttpServerSettings.class, "ERR_PortNumberOutOfRange", Integer.valueOf(p)), NotifyDescriptor.ERROR_MESSAGE);
             
             DialogDisplayer.getDefault().notify(msg);
             return;
diff --git a/ide/lexer/gen/src/org/netbeans/modules/lexer/gen/LanguageData.java b/ide/lexer/gen/src/org/netbeans/modules/lexer/gen/LanguageData.java
index a1cf056..c31c69f 100644
--- a/ide/lexer/gen/src/org/netbeans/modules/lexer/gen/LanguageData.java
+++ b/ide/lexer/gen/src/org/netbeans/modules/lexer/gen/LanguageData.java
@@ -289,7 +289,7 @@ public class LanguageData {
                 );
             }
             
-            MutableTokenId dupIntId = (MutableTokenId)info.put(new Integer(intId), id);
+            MutableTokenId dupIntId = (MutableTokenId)info.put(Integer.valueOf(intId), id);
             if (dupIntId != null) {
                 throw new IllegalStateException("Ids " + id.getName()
                     + " and " + dupIntId.getName()
diff --git a/ide/lexer/gen/src/org/netbeans/modules/lexer/gen/TokenTypes.java b/ide/lexer/gen/src/org/netbeans/modules/lexer/gen/TokenTypes.java
index 9112a39..0f7ebeb 100644
--- a/ide/lexer/gen/src/org/netbeans/modules/lexer/gen/TokenTypes.java
+++ b/ide/lexer/gen/src/org/netbeans/modules/lexer/gen/TokenTypes.java
@@ -126,7 +126,7 @@ public class TokenTypes {
     public String getTokenTypeName(int tokenTypeValue) {
         inspect();
 
-        return (String)value2name.get(new Integer(tokenTypeValue));
+        return (String)value2name.get(Integer.valueOf(tokenTypeValue));
     }
 
     /**
@@ -177,7 +177,7 @@ public class TokenTypes {
                     int value = f.getInt(null);
                     String fieldName = f.getName();
                     if (isAccepted(fieldName, value)) {
-                        Integer valueInteger = new Integer(value);
+                        Integer valueInteger = Integer.valueOf(value);
                         name2value.put(fieldName, valueInteger);
                         value2name.put(valueInteger, fieldName);
                     }
diff --git a/ide/lexer/src/org/netbeans/lib/lexer/IntegerCache.java b/ide/lexer/src/org/netbeans/lib/lexer/IntegerCache.java
index 17c81e2..30b4680 100644
--- a/ide/lexer/src/org/netbeans/lib/lexer/IntegerCache.java
+++ b/ide/lexer/src/org/netbeans/lib/lexer/IntegerCache.java
@@ -42,7 +42,7 @@ public final class IntegerCache {
             }
 
         } else { // cannot cache
-            integer = new Integer(i);
+            integer = Integer.valueOf(i);
         }
         return integer;
     }
diff --git a/ide/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java b/ide/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java
index f410e7f..69e1836 100644
--- a/ide/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java
+++ b/ide/mercurial/src/org/netbeans/modules/mercurial/FileStatusCache.java
@@ -290,7 +290,7 @@ public class FileStatusCache {
                             upToDateAccess = 0;
                             if (LOG_UPTODATE_FILES.isLoggable(Level.FINE)) {
                                 synchronized (upToDateFiles) {
-                                    LOG_UPTODATE_FILES.log(Level.FINE, "Another {0} U2D files added: {1}", new Object[] {new Integer(UTD_NOTIFY_NUMBER), upToDateFiles});
+                                    LOG_UPTODATE_FILES.log(Level.FINE, "Another {0} U2D files added: {1}", new Object[] {Integer.valueOf(UTD_NOTIFY_NUMBER), upToDateFiles});
                                 }
                             }
                         }
diff --git a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/AnnotateLine.java b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/AnnotateLine.java
index c801f58..ac2df8d 100644
--- a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/AnnotateLine.java
+++ b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/annotate/AnnotateLine.java
@@ -149,7 +149,7 @@ public class AnnotateLine {
      * Returns the line's number.
      */
     public Integer getLineNumInteger() {
-        return new Integer(lineNum);
+        return Integer.valueOf(lineNum);
     }
 
     /**
diff --git a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffChangesAction.java b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffChangesAction.java
index e07f882..9b8077d 100644
--- a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffChangesAction.java
+++ b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/diff/ExportDiffChangesAction.java
@@ -261,7 +261,7 @@ public class ExportDiffChangesAction extends ContextAction {
                 }
             }
             if (success) {
-                StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(ExportDiffChangesAction.class, "BK3004", new Integer(exportedFiles)));
+                StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(ExportDiffChangesAction.class, "BK3004", Integer.valueOf(exportedFiles)));
                 if (exportedFiles == 0) {
                     destination.delete();
                 } else {
diff --git a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/wizards/CloneWizardAction.java b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/wizards/CloneWizardAction.java
index 41bbd9c..85b7a76 100644
--- a/ide/mercurial/src/org/netbeans/modules/mercurial/ui/wizards/CloneWizardAction.java
+++ b/ide/mercurial/src/org/netbeans/modules/mercurial/ui/wizards/CloneWizardAction.java
@@ -162,7 +162,7 @@ public final class CloneWizardAction extends CallableSystemAction implements Cha
                 if (c instanceof JComponent) { // assume Swing components
                     JComponent jc = (JComponent) c;
                     // Sets step number of a component
-                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i)); // NOI18N
+                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i)); // NOI18N
                     // Sets steps names for a panel
                     jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N
                     // Turn on subtitle creation on each step
diff --git a/ide/notifications/src/org/netbeans/modules/notifications/BalloonManager.java b/ide/notifications/src/org/netbeans/modules/notifications/BalloonManager.java
index 19c0b7e..d469d12 100644
--- a/ide/notifications/src/org/netbeans/modules/notifications/BalloonManager.java
+++ b/ide/notifications/src/org/netbeans/modules/notifications/BalloonManager.java
@@ -121,7 +121,7 @@ class BalloonManager {
         }
         currentPane.addComponentListener( listener );
         configureBalloon( currentBalloon, currentPane, owner );
-        currentPane.add( currentBalloon, new Integer(JLayeredPane.POPUP_LAYER-1) );
+        currentPane.add( currentBalloon, Integer.valueOf(JLayeredPane.POPUP_LAYER-1) );
     }
     
     /**
diff --git a/ide/projectui/src/org/netbeans/modules/project/ui/NewFileIterator.java b/ide/projectui/src/org/netbeans/modules/project/ui/NewFileIterator.java
index 4ef4edc..4cc01f5 100644
--- a/ide/projectui/src/org/netbeans/modules/project/ui/NewFileIterator.java
+++ b/ide/projectui/src/org/netbeans/modules/project/ui/NewFileIterator.java
@@ -216,7 +216,7 @@ public class NewFileIterator implements WizardDescriptor.AsynchronousInstantiati
             if (c instanceof JComponent) { // assume Swing components
                 JComponent jc = (JComponent)c;
                 // Step #.
-                jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i));
+                jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i));
                 // Step name (actually the whole list for reference).
                 jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps);
             }
diff --git a/ide/projectuiapi/src/org/netbeans/modules/project/uiapi/ProjectCopyPanel.java b/ide/projectuiapi/src/org/netbeans/modules/project/uiapi/ProjectCopyPanel.java
index 7a0b08f..703f715 100644
--- a/ide/projectuiapi/src/org/netbeans/modules/project/uiapi/ProjectCopyPanel.java
+++ b/ide/projectuiapi/src/org/netbeans/modules/project/uiapi/ProjectCopyPanel.java
@@ -108,7 +108,7 @@ public class ProjectCopyPanel extends javax.swing.JPanel implements DocumentList
 
         setLayout(new java.awt.GridBagLayout());
 
-        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(ProjectCopyPanel.class, "LBL_Copy_Move_Dialog_Text", new Object[] {new Integer(isMove ? 1 : 0), ProjectUtils.getInformation(project).getDisplayName()})); // NOI18N
+        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(ProjectCopyPanel.class, "LBL_Copy_Move_Dialog_Text", new Object[] {Integer.valueOf(isMove ? 1 : 0), ProjectUtils.getInformation(project).getDisplayName()})); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.gridwidth = 2;
         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
@@ -211,7 +211,7 @@ public class ProjectCopyPanel extends javax.swing.JPanel implements DocumentList
 
         progressImpl.setLayout(new java.awt.GridBagLayout());
 
-        org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(ProjectCopyPanel.class, "LBL_Copying_Moving", new Object[] {isMove ? new Integer(1) : new Integer(0)})); // NOI18N
+        org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(ProjectCopyPanel.class, "LBL_Copying_Moving", new Object[] {isMove ? Integer.valueOf(1) : Integer.valueOf(0)})); // NOI18N
         gridBagConstraints = new java.awt.GridBagConstraints();
         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
@@ -256,7 +256,7 @@ public class ProjectCopyPanel extends javax.swing.JPanel implements DocumentList
         gridBagConstraints.insets = new java.awt.Insets(8, 0, 0, 0);
         add(warningTextArea, gridBagConstraints);
 
-        getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectCopyPanel.class, "ACSD_Copy_Move_Panel", new Object[] {new Integer(isMove ? 1 : 0)})); // NOI18N
+        getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectCopyPanel.class, "ACSD_Copy_Move_Panel", new Object[] {Integer.valueOf(isMove ? 1 : 0)})); // NOI18N
     }// </editor-fold>//GEN-END:initComponents
 
     private void browseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseActionPerformed
diff --git a/ide/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringGlobalAction.java b/ide/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringGlobalAction.java
index 075fa80..6693d20 100644
--- a/ide/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringGlobalAction.java
+++ b/ide/refactoring.api/src/org/netbeans/modules/refactoring/spi/impl/RefactoringGlobalAction.java
@@ -63,7 +63,7 @@ public abstract class RefactoringGlobalAction extends NodeAction {
     }
     
     protected void setMnemonic(char m) {
-        putValue(Action.MNEMONIC_KEY, new Integer(m));
+        putValue(Action.MNEMONIC_KEY, Integer.valueOf(m));
     }
     
     private static String trim(String arg) {
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beans/BaseBean.java b/ide/schema2beans/src/org/netbeans/modules/schema2beans/BaseBean.java
index 62a3585..68fe3d3 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beans/BaseBean.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beans/BaseBean.java
@@ -2188,7 +2188,7 @@ public abstract class BaseBean implements Cloneable, Bean {
                     getMessage("CantGetConstructor_msg"));
         }
         
-        Object[] p = new Object[] {doc, new Integer(Common.NO_DEFAULT_VALUES)};
+        Object[] p = new Object[] {doc, Integer.valueOf(Common.NO_DEFAULT_VALUES)};
         
         try {
             bean = (BaseBean)c.newInstance(p);
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beans/BeanProp.java b/ide/schema2beans/src/org/netbeans/modules/schema2beans/BeanProp.java
index f3d3e16..72b52db 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beans/BeanProp.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beans/BeanProp.java
@@ -1707,7 +1707,7 @@ public class BeanProp implements BaseProperty {
 		
 		//  Do not initialize the default values
 		Object[] p =
-		    new Object[] {new Integer(Common.NO_DEFAULT_VALUES)};
+		    new Object[] {Integer.valueOf(Common.NO_DEFAULT_VALUES)};
 		
 		return (BaseBean)c.newInstance(p);
 	    }
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beans/Common.java b/ide/schema2beans/src/org/netbeans/modules/schema2beans/Common.java
index 7821390..c1e198d 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beans/Common.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beans/Common.java
@@ -138,7 +138,7 @@ public class Common {
             return true;
 	    default:
             throw new IllegalArgumentException(Common.getMessage(
-                                                                 "UnknownType_msg", new Integer(type)));
+                                                                 "UnknownType_msg", Integer.valueOf(type)));
         }
     }
     
@@ -162,7 +162,7 @@ public class Common {
             return "doubleValue";	// NOI18N
 	    default:
             throw new IllegalArgumentException(Common.getMessage(
-                                                                 "UnknownType_msg", new Integer(type)));
+                                                                 "UnknownType_msg", Integer.valueOf(type)));
         }
     }
     
@@ -186,7 +186,7 @@ public class Common {
             return "Double";	// NOI18N
 	    default:
             throw new IllegalArgumentException(Common.getMessage(
-                                                                 "UnknownType_msg", new Integer(type)));
+                                                                 "UnknownType_msg", Integer.valueOf(type)));
         }
     }
     
@@ -236,7 +236,7 @@ public class Common {
             return "double";	// NOI18N
 	    default:
             throw new IllegalArgumentException(Common.getMessage(
-                                                                 "UnknownType_msg", new Integer(type)));
+                                                                 "UnknownType_msg", Integer.valueOf(type)));
         }
     }
     
@@ -266,7 +266,7 @@ public class Common {
             return "TYPE_DOUBLE";	// NOI18N
 	    default:
             throw new IllegalArgumentException(Common.getMessage(
-                                                                 "UnknownType_msg", new Integer(type)));
+                                                                 "UnknownType_msg", Integer.valueOf(type)));
         }
     }
     
@@ -381,7 +381,7 @@ public class Common {
 	    case Common.TYPE_SHORT:
             return new Short((short)0);
 	    case Common.TYPE_INT:
-            return new Integer(0);
+            return Integer.valueOf(0);
 	    case Common.TYPE_LONG:
             return new Long(0);
 	    case Common.TYPE_FLOAT:
@@ -390,7 +390,7 @@ public class Common {
             return new Double(0.0);
 	    default:
             throw new IllegalArgumentException(Common.getMessage(
-                                                                 "UnknownType_msg", new Integer(type)));
+                                                                 "UnknownType_msg", Integer.valueOf(type)));
         }
     }
     
@@ -415,7 +415,7 @@ public class Common {
     }
     
     public static String getMessage(String key, int p1) {
-        return Common.getMessage(key, new Object[] {new Integer(p1)});
+        return Common.getMessage(key, new Object[] {Integer.valueOf(p1)});
     }
     
     public static String getMessage(String key, Object p1, Object p2) {
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beans/DDFactory.java b/ide/schema2beans/src/org/netbeans/modules/schema2beans/DDFactory.java
index a77aa5a..30db887 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beans/DDFactory.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beans/DDFactory.java
@@ -102,7 +102,7 @@ public class DDFactory extends Object {
 	    "CantGetConstructor_msg"), me);
 	}
 	
-	Object[] p = new Object[] {doc, new Integer(Common.NO_DEFAULT_VALUES)};
+	Object[] p = new Object[] {doc, Integer.valueOf(Common.NO_DEFAULT_VALUES)};
 	
 	try {
 	    beanNode = (BaseBean)c.newInstance(p);
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beans/DOMBinding.java b/ide/schema2beans/src/org/netbeans/modules/schema2beans/DOMBinding.java
index 83cb56c..22e99ca 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beans/DOMBinding.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beans/DOMBinding.java
@@ -455,7 +455,7 @@ public class DOMBinding {
 	    default:
             throw new Schema2BeansRuntimeException(Common.getMessage(
                           "TypeNotSupported_msg",
-		                  prop.getPropClass(), new Integer(prop.getType())));
+		                  prop.getPropClass(), Integer.valueOf(prop.getType())));
 	}
     }
 
@@ -971,7 +971,7 @@ public class DOMBinding {
             }
             else
                 throw new IllegalArgumentException(Common.getMessage(
-                                                                     "UnknownAction_msg", new Integer(a.action)));
+                                                                     "UnknownAction_msg", Integer.valueOf(a.action)));
     }
 
     boolean hasDomNode() {
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beans/GraphManager.java b/ide/schema2beans/src/org/netbeans/modules/schema2beans/GraphManager.java
index 326820c..36476e3 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beans/GraphManager.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beans/GraphManager.java
@@ -454,7 +454,7 @@ public class GraphManager extends Object {
 
         if (this.bindingsMap.get(node) == null) {
             throw new Schema2BeansException(Common.getMessage(
-                                                              "CurrentNodeHasNoBinding_msg", new Integer(node.hashCode())));
+                                                              "CurrentNodeHasNoBinding_msg", Integer.valueOf(node.hashCode())));
         }
 
         // Store the property's dtdName's into a map for fast lookup,
@@ -894,7 +894,7 @@ public class GraphManager extends Object {
 	    case Common.TYPE_SHORT:
 		return new Short((short)0);
 	    case Common.TYPE_INT:
-		return new Integer(0);
+		return Integer.valueOf(0);
 	    case Common.TYPE_LONG:
 		return new Long(0);
 	    case Common.TYPE_FLOAT:
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beans/ReflectiveBeanProp.java b/ide/schema2beans/src/org/netbeans/modules/schema2beans/ReflectiveBeanProp.java
index 7ee7b43..ab639d7 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beans/ReflectiveBeanProp.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beans/ReflectiveBeanProp.java
@@ -74,7 +74,7 @@ public class ReflectiveBeanProp extends BeanProp {
     public Object getValue(int index) {
         try {
             if (isIndexed())
-                return reader.invoke(bean, new Object[] {new Integer(index)});
+                return reader.invoke(bean, new Object[] {Integer.valueOf(index)});
             else
                 return reader.invoke(bean, new Object[] {});
         } catch (java.lang.IllegalAccessException e) {
@@ -144,7 +144,7 @@ public class ReflectiveBeanProp extends BeanProp {
             if (add)
                 index = ((Integer) adder.invoke(bean, new Object[] {value})).intValue();
             else if (isIndexed())
-                writer.invoke(bean, new Object[] {new Integer(index), value});
+                writer.invoke(bean, new Object[] {Integer.valueOf(index), value});
             else
                 writer.invoke(bean, new Object[] {value});
             return index;
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/TreeBuilder.java b/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/TreeBuilder.java
index d37dd38..dcb08e8 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/TreeBuilder.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/TreeBuilder.java
@@ -57,7 +57,7 @@ public class TreeBuilder implements DocDefHandler, TreeParser, HasPrefixGuesser
 
     void pushLevel() {
         curParentGroupStack.push(curParentGroup);
-        curElementTypeStack.push(new Integer(curElementType));
+        curElementTypeStack.push(Integer.valueOf(curElementType));
         curAttrStack.push(curAttr);
     }
 
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/GenBuffer.java b/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/GenBuffer.java
index 00b2aaa..f335e49 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/GenBuffer.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/GenBuffer.java
@@ -114,7 +114,7 @@ public class GenBuffer extends Writer {
         int prevOut = curOut;
         // do the select before the push, in case the select throws an exception
         select(bufferNum);
-        selectStack.push(new Integer(prevOut));
+        selectStack.push(Integer.valueOf(prevOut));
     }
 
     public void popSelect() {
diff --git a/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/JavaUtil.java b/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/JavaUtil.java
index 7bf49b0..ba825f2 100644
--- a/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/JavaUtil.java
+++ b/ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/JavaUtil.java
@@ -213,7 +213,7 @@ public class JavaUtil {
      * Take a String (@param value) and generate Java code to coerce it.
      *   eg:  ('String', "Hello") -> '"Hello"'
      *        ('int', '10') -> '10'
-     *        ('Integer', '43') -> 'new Integer(43)'
+     *        ('Integer', '43') -> 'Integer.valueOf(43)'
      *        ('java.util.Locale', 'Locale.US') -> 'Locale.US'
      */
     public static String instanceFrom(String type, String value) {
@@ -571,7 +571,7 @@ public class JavaUtil {
      * @return a default value for that type.
      *  eg: X -> new X()
      *      java.math.BigDecimal -> new java.math.BigDecimal("0")
-     *      Integer -> new Integer("0")
+     *      Integer -> Integer.valueOf("0")
      */
     public static String genNewDefault(String type) {
         type = type.intern();
diff --git a/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/Column.java b/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/Column.java
index 8baea14..e491692 100644
--- a/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/Column.java
+++ b/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/Column.java
@@ -113,7 +113,7 @@ public class Column extends PropertySupport.ReadWrite {
     public Object getValue (String propertyName) {
         if (PROP_ORDER_NUMBER.equals (propertyName)) {
             int index = columnModel.getCurrentOrderNumber();
-            return new Integer(index);
+            return Integer.valueOf(index);
         }
         if ("InvisibleInTreeTableView".equals (propertyName)) 
             return Boolean.valueOf (!columnModel.isVisible ());
diff --git a/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/TreeModelNode.java b/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/TreeModelNode.java
index a6157b4..0440b4e 100644
--- a/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/TreeModelNode.java
+++ b/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/TreeModelNode.java
@@ -1223,7 +1223,7 @@ public class TreeModelNode extends AbstractNode {
         } else {
             int d = 1;
             while ((p = p.getParentNode()) != null) d++;
-            depth = new Integer(d);
+            depth = Integer.valueOf(d);
             return depth;
         }
     }
@@ -1620,7 +1620,7 @@ public class TreeModelNode extends AbstractNode {
             } else {
                 int d = 1;
                 while ((p = p.getParentNode()) != null) d++;
-                depth = new Integer(d);
+                depth = Integer.valueOf(d);
                 return depth;
             }
         }
diff --git a/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/TreeModelRoot.java b/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/TreeModelRoot.java
index 7d9119f..34f380e 100644
--- a/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/TreeModelRoot.java
+++ b/ide/spi.viewmodel/src/org/netbeans/modules/viewmodel/TreeModelRoot.java
@@ -525,7 +525,7 @@ public class TreeModelRoot {
             Object actOn;
             node = node.getParentNode();
             if (node == null) {
-                actOn = new Integer(0);
+                actOn = Integer.valueOf(0);
             } else {
                 Children ch = node.getChildren();
                 if (ch instanceof TreeModelNode.TreeModelChildren) {
diff --git a/ide/subversion/src/org/netbeans/modules/subversion/ui/actions/ContextAction.java b/ide/subversion/src/org/netbeans/modules/subversion/ui/actions/ContextAction.java
index 0350079..793fd91 100644
--- a/ide/subversion/src/org/netbeans/modules/subversion/ui/actions/ContextAction.java
+++ b/ide/subversion/src/org/netbeans/modules/subversion/ui/actions/ContextAction.java
@@ -231,13 +231,13 @@ public abstract class ContextAction extends NodeAction {
             if (projectsOnly) {
                 try {
                     return MessageFormat.format(NbBundle.getBundle(this.getClass()).getString(baseName + "_Projects"),  // NOI18N
-                                                new Object [] { new Integer(objectCount) });
+                                                new Object [] { Integer.valueOf(objectCount) });
                 } catch (MissingResourceException ex) {
                     // ignore use files alternative bellow
                 }
             }
             return MessageFormat.format(NbBundle.getBundle(this.getClass()).getString(baseName + "_Context_Multiple"),  // NOI18N
-                                        new Object [] { new Integer(objectCount) });
+                                        new Object [] { Integer.valueOf(objectCount) });
         }
     }
     
@@ -290,13 +290,13 @@ public abstract class ContextAction extends NodeAction {
             if (projectsOnly) {
                 try {
                     return MessageFormat.format(NbBundle.getBundle(ContextAction.class).getString("MSG_ActionContext_MultipleProjects"),  // NOI18N
-                                                new Object [] { new Integer(objectCount) });
+                                                new Object [] { Integer.valueOf(objectCount) });
                 } catch (MissingResourceException ex) {
                     // ignore use files alternative bellow
                 }
             }
             return MessageFormat.format(NbBundle.getBundle(ContextAction.class).getString("MSG_ActionContext_MultipleFiles"),  // NOI18N
-                                        new Object [] { new Integer(objectCount) });
+                                        new Object [] { Integer.valueOf(objectCount) });
         }
     }    
         
diff --git a/ide/subversion/src/org/netbeans/modules/subversion/ui/blame/AnnotateLine.java b/ide/subversion/src/org/netbeans/modules/subversion/ui/blame/AnnotateLine.java
index 1de442b..9cc4bcd 100644
--- a/ide/subversion/src/org/netbeans/modules/subversion/ui/blame/AnnotateLine.java
+++ b/ide/subversion/src/org/netbeans/modules/subversion/ui/blame/AnnotateLine.java
@@ -124,7 +124,7 @@ public class AnnotateLine {
      * Returns the line's number.
      */
     public Integer getLineNumInteger() {
-        return new Integer(lineNum);
+        return Integer.valueOf(lineNum);
     }
 
     /**
diff --git a/ide/subversion/src/org/netbeans/modules/subversion/ui/diff/ExportDiffAction.java b/ide/subversion/src/org/netbeans/modules/subversion/ui/diff/ExportDiffAction.java
index 9033360..220afd5 100644
--- a/ide/subversion/src/org/netbeans/modules/subversion/ui/diff/ExportDiffAction.java
+++ b/ide/subversion/src/org/netbeans/modules/subversion/ui/diff/ExportDiffAction.java
@@ -265,7 +265,7 @@ public class ExportDiffAction extends ContextAction {
                 }
             }
             if (success) {
-                StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(ExportDiffAction.class, "BK3004", new Integer(exportedFiles)));
+                StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(ExportDiffAction.class, "BK3004", Integer.valueOf(exportedFiles)));
                 if (exportedFiles == 0) {
                     destination.delete();
                 } else {
diff --git a/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/CheckoutWizard.java b/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/CheckoutWizard.java
index a8209e2..75bfedd 100644
--- a/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/CheckoutWizard.java
+++ b/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/CheckoutWizard.java
@@ -136,7 +136,7 @@ public final class CheckoutWizard implements ChangeListener {
                 if (c instanceof JComponent) { // assume Swing components
                     JComponent jc = (JComponent) c;
                     // Sets step number of a component
-                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i)); // NOI18N
+                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i)); // NOI18N
                     // Sets steps names for a panel
                     jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N
                     // Turn on subtitle creation on each step
diff --git a/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/ImportWizard.java b/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/ImportWizard.java
index 92fd655..217adb3 100644
--- a/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/ImportWizard.java
+++ b/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/ImportWizard.java
@@ -162,7 +162,7 @@ public final class ImportWizard implements ChangeListener {
                 if (c instanceof JComponent) { // assume Swing components
                     JComponent jc = (JComponent) c;
                     // Sets step number of a component
-                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i)); // NOI18N
+                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i)); // NOI18N
                     // Sets steps names for a panel
                     jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N
                     // Turn on subtitle creation on each step
diff --git a/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/URLPatternWizard.java b/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/URLPatternWizard.java
index 1885088..a5c7bc3 100644
--- a/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/URLPatternWizard.java
+++ b/ide/subversion/src/org/netbeans/modules/subversion/ui/wizards/URLPatternWizard.java
@@ -123,7 +123,7 @@ public final class URLPatternWizard implements ChangeListener {
                 if (c instanceof JComponent) { // assume Swing components
                     JComponent jc = (JComponent) c;
                     // Sets step number of a component
-                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(i)); // NOI18N
+                    jc.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(i)); // NOI18N
                     // Sets steps names for a panel
                     jc.putClientProperty(WizardDescriptor.PROP_CONTENT_DATA, steps); // NOI18N
                     // Turn on subtitle creation on each step
diff --git a/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/StackTraceSupport.java b/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/StackTraceSupport.java
index 2920af4..573ca3e 100644
--- a/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/StackTraceSupport.java
+++ b/ide/team.commons/src/org/netbeans/modules/bugtracking/commons/StackTraceSupport.java
@@ -188,7 +188,7 @@ class StackTraceSupport {
                    case ']':
                        continue;
                    default:
-                     //  System.out.println("  ???? " + new Integer(ch));
+                     //  System.out.println("  ???? " + Integer.valueOf(ch));
                        return false;
                }
            }
diff --git a/ide/usersguide/demosrc/examples/colorpicker/ColorPreview.java b/ide/usersguide/demosrc/examples/colorpicker/ColorPreview.java
index 2cba37f..de193db 100644
--- a/ide/usersguide/demosrc/examples/colorpicker/ColorPreview.java
+++ b/ide/usersguide/demosrc/examples/colorpicker/ColorPreview.java
@@ -62,7 +62,7 @@ public class ColorPreview extends javax.swing.JPanel {
     public void setRed(int red) {
         int oldRed = this.red;
         this.red = red;
-        propertyChangeSupport.firePropertyChange("red", new Integer(oldRed), new Integer(red));
+        propertyChangeSupport.firePropertyChange("red", Integer.valueOf(oldRed), Integer.valueOf(red));
         setBackground(new java.awt.Color(red, green, blue));
         repaint();
     }
@@ -80,7 +80,7 @@ public class ColorPreview extends javax.swing.JPanel {
     public void setGreen(int green) {
         int oldGreen = this.green;
         this.green = green;
-        propertyChangeSupport.firePropertyChange("green", new Integer(oldGreen), new Integer(green));
+        propertyChangeSupport.firePropertyChange("green", Integer.valueOf(oldGreen), Integer.valueOf(green));
         setBackground(new java.awt.Color(red, green, blue));
         repaint();
     }
@@ -98,7 +98,7 @@ public class ColorPreview extends javax.swing.JPanel {
     public void setBlue(int blue) {
         int oldBlue = this.blue;
         this.blue = blue;
-        propertyChangeSupport.firePropertyChange("blue", new Integer(oldBlue), new Integer(blue));
+        propertyChangeSupport.firePropertyChange("blue", Integer.valueOf(oldBlue), Integer.valueOf(blue));
         setBackground(new java.awt.Color(red, green, blue));
         repaint();
     }
diff --git a/ide/utilities/src/org/netbeans/modules/openfile/RecentFiles.java b/ide/utilities/src/org/netbeans/modules/openfile/RecentFiles.java
index 16fddcb..84ba651 100644
--- a/ide/utilities/src/org/netbeans/modules/openfile/RecentFiles.java
+++ b/ide/utilities/src/org/netbeans/modules/openfile/RecentFiles.java
@@ -162,8 +162,7 @@ public final class RecentFiles {
             String value = _prefs.get(curKey, null);
             if (value != null) {
                 try {
-                    int id = new Integer(
-                         curKey.substring(PROP_URL_PREFIX.length())).intValue();
+                    int id = Integer.parseInt(curKey.substring(PROP_URL_PREFIX.length()));
                     HistoryItem hItem = new HistoryItem(id, value,
                             _prefs.getByteArray(PROP_ICON_PREFIX + id, null));
                     int ind = result.indexOf(hItem);
diff --git a/ide/versioning.util/src/org/netbeans/modules/versioning/util/projects/ProjectOpener.java b/ide/versioning.util/src/org/netbeans/modules/versioning/util/projects/ProjectOpener.java
index 18f37ac..66c6228 100644
--- a/ide/versioning.util/src/org/netbeans/modules/versioning/util/projects/ProjectOpener.java
+++ b/ide/versioning.util/src/org/netbeans/modules/versioning/util/projects/ProjectOpener.java
@@ -118,7 +118,7 @@ public class ProjectOpener implements ActionListener, PropertyChangeListener {
         Object[] options = null;
         if (numberOfProjects > 1) {
             // more that one project
-            String msg = type.getMessage("BK3009", new Integer(numberOfProjects));   // NOI18N
+            String msg = type.getMessage("BK3009", Integer.valueOf(numberOfProjects));   // NOI18N
             panel.jLabel1.setText(msg);
             options = new Object[]{panel.openButton, panel.closeButton};
         } else if (numberOfProjects == 1) {
diff --git a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/BinaryBase.java b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/BinaryBase.java
index c2d0f70..5b5dbb3 100644
--- a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/BinaryBase.java
+++ b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/BinaryBase.java
@@ -151,7 +151,7 @@ public abstract class BinaryBase extends Datatype {
             lengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.lengths.add(new Integer(length));
+        this.lengths.add(Integer.valueOf(length));
     }
     
     /*
@@ -164,7 +164,7 @@ public abstract class BinaryBase extends Datatype {
             minLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.minLengths.add(new Integer(minLength));
+        this.minLengths.add(Integer.valueOf(minLength));
     }
     
     /*
@@ -177,7 +177,7 @@ public abstract class BinaryBase extends Datatype {
             maxLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.maxLengths.add(new Integer(maxLength));
+        this.maxLengths.add(Integer.valueOf(maxLength));
     }
     
     /*
diff --git a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/NotationType.java b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/NotationType.java
index 5d8597c..31afd2b 100644
--- a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/NotationType.java
+++ b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/NotationType.java
@@ -118,7 +118,7 @@ public class NotationType extends StringBase {
             lengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.lengths.add(new Integer(length));
+        this.lengths.add(Integer.valueOf(length));
     }
     
         /*
@@ -131,7 +131,7 @@ public class NotationType extends StringBase {
             minLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.minLengths.add(new Integer(minLength));
+        this.minLengths.add(Integer.valueOf(minLength));
     }
     
         /*
@@ -144,7 +144,7 @@ public class NotationType extends StringBase {
             maxLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.maxLengths.add(new Integer(maxLength));
+        this.maxLengths.add(Integer.valueOf(maxLength));
     }
     
         /*
@@ -193,7 +193,7 @@ public class NotationType extends StringBase {
          */
     public void removeLength(int length) {
         if(lengths != null)
-            lengths.remove(new Integer(length));
+            lengths.remove(Integer.valueOf(length));
     }
     
         /*
@@ -203,7 +203,7 @@ public class NotationType extends StringBase {
          */
     public void removeMinLength(int minLength) {
         if(minLengths != null)
-            minLengths.remove(new Integer(minLength));
+            minLengths.remove(Integer.valueOf(minLength));
     }
     
         /*
@@ -213,7 +213,7 @@ public class NotationType extends StringBase {
          */
     public void removeMaxLength(int maxLength) {
         if(maxLengths != null)
-            maxLengths.remove(new Integer(maxLength));
+            maxLengths.remove(Integer.valueOf(maxLength));
     }
     
         /*
diff --git a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/NumberBase.java b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/NumberBase.java
index a3a0065..2da369b 100644
--- a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/NumberBase.java
+++ b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/NumberBase.java
@@ -230,7 +230,7 @@ public abstract class NumberBase extends Datatype {
             this.totalDigits = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.totalDigits.add(new Integer(totalDigits));
+        this.totalDigits.add(Integer.valueOf(totalDigits));
     }
     
     /*
@@ -243,7 +243,7 @@ public abstract class NumberBase extends Datatype {
             this.fractionDigits = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.fractionDigits.add(new Integer(fractionDigits));
+        this.fractionDigits.add(Integer.valueOf(fractionDigits));
     }
     
     /*
diff --git a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/QNameType.java b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/QNameType.java
index 57061ce..01af46a 100644
--- a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/QNameType.java
+++ b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/QNameType.java
@@ -118,7 +118,7 @@ public class QNameType extends StringBase {
             lengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.lengths.add(new Integer(length));
+        this.lengths.add(Integer.valueOf(length));
     }
     
     /*
@@ -131,7 +131,7 @@ public class QNameType extends StringBase {
             minLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.minLengths.add(new Integer(minLength));
+        this.minLengths.add(Integer.valueOf(minLength));
     }
     
     /*
@@ -144,7 +144,7 @@ public class QNameType extends StringBase {
             maxLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.maxLengths.add(new Integer(maxLength));
+        this.maxLengths.add(Integer.valueOf(maxLength));
     }
     
     /*
@@ -196,7 +196,7 @@ public class QNameType extends StringBase {
             lengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.lengths.remove(new Integer(length));
+        this.lengths.remove(Integer.valueOf(length));
     }
     
     /*
@@ -209,7 +209,7 @@ public class QNameType extends StringBase {
             minLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.minLengths.remove(new Integer(minLength));
+        this.minLengths.remove(Integer.valueOf(minLength));
     }
     
     /*
@@ -222,7 +222,7 @@ public class QNameType extends StringBase {
             maxLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.maxLengths.remove(new Integer(maxLength));
+        this.maxLengths.remove(Integer.valueOf(maxLength));
     }
     
     /*
diff --git a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/StringBase.java b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/StringBase.java
index ad2725b..c56cdda 100644
--- a/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/StringBase.java
+++ b/ide/xml.axi/src/org/netbeans/modules/xml/axi/datatype/StringBase.java
@@ -155,7 +155,7 @@ public class StringBase extends Datatype {
             lengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.lengths.add(new Integer(length));
+        this.lengths.add(Integer.valueOf(length));
     }
     
     /*
@@ -168,7 +168,7 @@ public class StringBase extends Datatype {
             minLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.minLengths.add(new Integer(minLength));
+        this.minLengths.add(Integer.valueOf(minLength));
     }
     
     /*
@@ -181,7 +181,7 @@ public class StringBase extends Datatype {
             maxLengths = new ArrayList<Integer>(1);
             hasFacets = true;
         }
-        this.maxLengths.add(new Integer(maxLength));
+        this.maxLengths.add(Integer.valueOf(maxLength));
     }
     
     /*
diff --git a/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/DefaultSchemaGenerator.java b/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/DefaultSchemaGenerator.java
index eb7eeba..dc287a3 100644
--- a/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/DefaultSchemaGenerator.java
+++ b/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/DefaultSchemaGenerator.java
@@ -561,7 +561,7 @@ public abstract class DefaultSchemaGenerator extends SchemaGenerator {
         scs.add(element);
         scs.add(e);
         scs.add(eref);
-        fixNamesMap.put(new Integer(fgeCount++), scs);
+        fixNamesMap.put(Integer.valueOf(fgeCount++), scs);
     }
     
     protected void fixGlobalElementNames() {
diff --git a/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/SchemaGeneratorFactoryImpl.java b/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/SchemaGeneratorFactoryImpl.java
index 6503a1a..8cfe351 100644
--- a/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/SchemaGeneratorFactoryImpl.java
+++ b/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/SchemaGeneratorFactoryImpl.java
@@ -180,7 +180,7 @@ public class SchemaGeneratorFactoryImpl extends SchemaGeneratorFactory {
             AXIComponent e = (AXIComponent) cs.get(i);
             if(!SchemaGeneratorUtil.fromSameSchemaModel(
                     e.getPeer(), am.getSchemaModel()))
-                removeList.add(new Integer(i));
+                removeList.add(Integer.valueOf(i));
         }
         //finally remove components from other model
         for(int i=removeList.size()-1;i>=0;i--) {
diff --git a/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/SchemaGeneratorUtil.java b/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/SchemaGeneratorUtil.java
index 94c6390..4bbcd28 100644
--- a/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/SchemaGeneratorUtil.java
+++ b/ide/xml.axi/src/org/netbeans/modules/xml/axi/impl/SchemaGeneratorUtil.java
@@ -1613,10 +1613,10 @@ public class SchemaGeneratorUtil {
         for(int i=0;i<lrges.size();i++) {
             Element e = lrges.get(i);
             if(refges.contains(e.getPeer())) {
-                removeList.add(new Integer(i));
+                removeList.add(Integer.valueOf(i));
             } else if(!SchemaGeneratorUtil.fromSameSchemaModel(
                     e.getPeer(), am.getSchemaModel()))
-                removeList.add(new Integer(i));
+                removeList.add(Integer.valueOf(i));
         }
         //finally remove unnecessary global elements from visit list
         for(int i=removeList.size()-1;i>=0;i--) {
diff --git a/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/RefreshDialog.java b/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/RefreshDialog.java
index 17ba30f..0fca69e 100644
--- a/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/RefreshDialog.java
+++ b/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/RefreshDialog.java
@@ -27,8 +27,8 @@ import org.openide.util.NbBundle;
  * @author mkuchtiak
  */
 public class RefreshDialog extends org.openide.DialogDescriptor {
-    public static final Integer OPTION_FIX=new Integer(0);
-    public static final Integer OPTION_REFRESH=new Integer(1);
+    public static final Integer OPTION_FIX=Integer.valueOf(0);
+    public static final Integer OPTION_REFRESH=Integer.valueOf(1);
 
     private static final String[] OPTIONS = new String[] {
         NbBundle.getMessage(RefreshDialog.class,"OPT_FixNow"),
diff --git a/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/RefreshSaveDialog.java b/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/RefreshSaveDialog.java
index e65ea64..d70477e 100644
--- a/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/RefreshSaveDialog.java
+++ b/ide/xml.multiview/src/org/netbeans/modules/xml/multiview/ui/RefreshSaveDialog.java
@@ -29,9 +29,9 @@ import org.openide.util.NbBundle;
  * @author mkuchtiak
  */
 public class RefreshSaveDialog extends org.openide.DialogDescriptor {
-    public static final Integer OPTION_FIX=new Integer(0);
-    public static final Integer OPTION_REFRESH=new Integer(1);
-    public static final Integer OPTION_SAVE=new Integer(2);
+    public static final Integer OPTION_FIX=Integer.valueOf(0);
+    public static final Integer OPTION_REFRESH=Integer.valueOf(1);
+    public static final Integer OPTION_SAVE=Integer.valueOf(2);
 
     private static final String[] OPTIONS = new String[] {
         NbBundle.getMessage(RefreshSaveDialog.class,"OPT_FixNow"),
diff --git a/ide/xml.xdm/src/org/netbeans/modules/xml/xdm/diff/Change.java b/ide/xml.xdm/src/org/netbeans/modules/xml/xdm/diff/Change.java
index 6f9fca3..d506cbc 100644
--- a/ide/xml.xdm/src/org/netbeans/modules/xml/xdm/diff/Change.java
+++ b/ide/xml.xdm/src/org/netbeans/modules/xml/xdm/diff/Change.java
@@ -69,14 +69,14 @@ public class Change extends Difference {
                     String name = oldAttr.getNodeName();
                     if ( !allAttrNames.contains( name ) )
                         allAttrNames.add( name );
-                    posMap.put(oldAttr, new Integer(i));
+                    posMap.put(oldAttr, Integer.valueOf(i));
                 }
                 for ( int i=0; i < nm2.getLength(); i++ ) {
                     Node newAttr = (Node) nm2.item(i);
                     String name = newAttr.getNodeName();
                     if ( !allAttrNames.contains( name ) )
                         allAttrNames.add( name );
-                    posMap.put(newAttr, new Integer(i));
+                    posMap.put(newAttr, Integer.valueOf(i));
                 }
                 for ( int i=0; i < allAttrNames.size(); i++ ) {
                     String attrName = allAttrNames.get( i );
diff --git a/ide/xml.xdm/src/org/netbeans/modules/xml/xdm/diff/MergeDiff.java b/ide/xml.xdm/src/org/netbeans/modules/xml/xdm/diff/MergeDiff.java
index 636a480..6ab167e 100644
--- a/ide/xml.xdm/src/org/netbeans/modules/xml/xdm/diff/MergeDiff.java
+++ b/ide/xml.xdm/src/org/netbeans/modules/xml/xdm/diff/MergeDiff.java
@@ -296,7 +296,7 @@ public class MergeDiff {
         for ( int i=0; i < nm2.getLength(); i++ ) {
             Attribute newAttr = (Attribute) nm2.item(i);
             assert newAttr.getName() != null;
-            nodeToPosition.put( newAttr.getName(), new Integer( i ) );
+            nodeToPosition.put( newAttr.getName(), Integer.valueOf( i ) );
         }
         
         // to ensure accurate order, do delete or modify first, spare adds to the end
diff --git a/ide/xml/src/org/netbeans/modules/xml/actions/InputOutputReporter.java b/ide/xml/src/org/netbeans/modules/xml/actions/InputOutputReporter.java
index c0e56de..e9320e5 100644
--- a/ide/xml/src/org/netbeans/modules/xml/actions/InputOutputReporter.java
+++ b/ide/xml/src/org/netbeans/modules/xml/actions/InputOutputReporter.java
@@ -198,7 +198,7 @@ public final class InputOutputReporter implements CookieObserver {
         if (line >= 0) { 
             Object[] args = new Object[] {
                                 message,
-                                new Integer(line),
+                                Integer.valueOf(line),
                                 ext
                             };
 
diff --git a/ide/xml/src/org/netbeans/modules/xml/wizard/impl/XMLWizardIterator.java b/ide/xml/src/org/netbeans/modules/xml/wizard/impl/XMLWizardIterator.java
index 53a1366..e9ded99 100644
--- a/ide/xml/src/org/netbeans/modules/xml/wizard/impl/XMLWizardIterator.java
+++ b/ide/xml/src/org/netbeans/modules/xml/wizard/impl/XMLWizardIterator.java
@@ -227,7 +227,7 @@ public class XMLWizardIterator implements TemplateWizard.Iterator {
         if (panel.getComponent() instanceof JComponent) {
             ((JComponent)panel.getComponent()).putClientProperty(
                 WizardDescriptor.PROP_CONTENT_SELECTED_INDEX,                             // NOI18N
-                new Integer(current)
+                Integer.valueOf(current)
             );        
         }
         return panel;
diff --git a/ide/xsl/src/org/netbeans/modules/xsl/ui/TransformPanel.java b/ide/xsl/src/org/netbeans/modules/xsl/ui/TransformPanel.java
index 839f183..16f50b9 100644
--- a/ide/xsl/src/org/netbeans/modules/xsl/ui/TransformPanel.java
+++ b/ide/xsl/src/org/netbeans/modules/xsl/ui/TransformPanel.java
@@ -143,10 +143,10 @@ public final class TransformPanel extends javax.swing.JPanel {
         
         if ( xmlHistory != null ) {
             setOverwriteOutput( xmlHistory.isOverwriteOutput());
-            setProcessOutput(new Integer(xmlHistory.getProcessOutput()));
+            setProcessOutput(Integer.valueOf(xmlHistory.getProcessOutput()));
         } else if ( xslHistory != null ) {
             setOverwriteOutput( xslHistory.isOverwriteOutput());
-            setProcessOutput(new Integer(xslHistory.getProcessOutput()));
+            setProcessOutput(Integer.valueOf(xslHistory.getProcessOutput()));
         }
         
         ownInitComponents();
@@ -784,7 +784,7 @@ public final class TransformPanel extends javax.swing.JPanel {
     private void showComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showComboBoxActionPerformed
         // Add your handling code here:
         if ( isInitialized() ) {
-            setProcessOutput(new Integer(showComboBox.getSelectedIndex()));
+            setProcessOutput(Integer.valueOf(showComboBox.getSelectedIndex()));
             userSetProcess = true;
             updateComponents();
         }
@@ -915,7 +915,7 @@ public final class TransformPanel extends javax.swing.JPanel {
             this.xsl       = xsl;
             this.output    = output;
             this.overwrite = overwrite ? Boolean.TRUE : Boolean.FALSE;
-            this.process   = process == -1 ? null : new Integer(process);
+            this.process   = process == -1 ? null : Integer.valueOf(process);
         }
         
         /**
@@ -984,7 +984,7 @@ public final class TransformPanel extends javax.swing.JPanel {
         }
         
         public void setProcessOutput(int processValue) {
-            setProcessOutput(new Integer(processValue));
+            setProcessOutput(Integer.valueOf(processValue));
         }
         
         public String toString() {
diff --git a/java/classfile/closure/nbproject/build-impl.xml b/java/classfile/closure/nbproject/build-impl.xml
index f5144d6..3ee2f84 100644
--- a/java/classfile/closure/nbproject/build-impl.xml
+++ b/java/classfile/closure/nbproject/build-impl.xml
@@ -12,14 +12,21 @@ is divided into following sections:
   - execution
   - debugging
   - javadoc
-  - junit compilation
-  - junit execution
-  - junit debugging
+  - test compilation
+  - test execution
+  - test debugging
   - applet
   - cleanup
 
         -->
-<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="Closure_Tool-impl">
+<project xmlns:if="ant:if" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" xmlns:unless="ant:unless" basedir=".." default="default" name="Closure_Tool-impl">
+    <fail message="Please build using Ant 1.8.0 or higher.">
+        <condition>
+            <not>
+                <antversion atleast="1.8.0"/>
+            </not>
+        </condition>
+    </fail>
     <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
     <!-- 
                 ======================
@@ -39,28 +46,136 @@ is divided into following sections:
         <property file="${user.properties.file}"/>
         <!-- The two properties below are usually overridden -->
         <!-- by the active platform. Just a fallback. -->
-        <property name="default.javac.source" value="1.4"/>
-        <property name="default.javac.target" value="1.4"/>
+        <property name="default.javac.source" value="1.8"/>
+        <property name="default.javac.target" value="1.8"/>
     </target>
     <target depends="-pre-init,-init-private,-init-user" name="-init-project">
         <property file="nbproject/configs/${config}.properties"/>
         <property file="nbproject/project.properties"/>
     </target>
-    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+    <target name="-init-modules-supported">
+        <condition property="modules.supported.internal" value="true">
+            <not>
+                <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/>
+            </not>
+        </condition>
+    </target>
+    <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename">
+        <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute name="property"/>
+            <attribute name="sourcepath"/>
+            <sequential>
+                <loadresource property="@{property}" quiet="true">
+                    <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/>
+                    <filterchain>
+                        <stripjavacomments/>
+                        <linecontainsregexp>
+                            <regexp pattern="module .* \{"/>
+                        </linecontainsregexp>
+                        <tokenfilter>
+                            <linetokenizer/>
+                            <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/>
+                        </tokenfilter>
+                        <striplinebreaks/>
+                    </filterchain>
+                </loadresource>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties">
+        <fail message="Java 9 support requires Ant 1.10.0 or higher.">
+            <condition>
+                <not>
+                    <antversion atleast="1.10.0"/>
+                </not>
+            </condition>
+        </fail>
+        <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/>
+        <condition property="named.module.internal">
+            <and>
+                <isset property="module.name"/>
+                <length length="0" string="${module.name}" when="greater"/>
+            </and>
+        </condition>
+        <condition property="unnamed.module.internal">
+            <not>
+                <isset property="named.module.internal"/>
+            </not>
+        </condition>
+        <property name="javac.modulepath" value=""/>
+        <property name="run.modulepath" value="${javac.modulepath}"/>
+        <property name="module.build.classes.dir" value="${build.classes.dir}"/>
+        <property name="debug.modulepath" value="${run.modulepath}"/>
+        <property name="javac.upgrademodulepath" value=""/>
+        <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/>
+        <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'">
+            <and>
+                <isset property="javac.systemmodulepath"/>
+                <length length="0" string="${javac.systemmodulepath}" when="greater"/>
+            </and>
+        </condition>
+        <property name="dist.jlink.dir" value="${dist.dir}/jlink"/>
+        <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/>
+        <property name="module.name" value=""/>
+    </target>
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init">
+        <property name="platform.java" value="${java.home}/bin/java"/>
         <available file="${manifest.file}" property="manifest.available"/>
-        <condition property="manifest.available+main.class">
+        <condition property="splashscreen.available">
+            <and>
+                <not>
+                    <equals arg1="${application.splash}" arg2="" trim="true"/>
+                </not>
+                <available file="${application.splash}"/>
+            </and>
+        </condition>
+        <condition property="main.class.available">
             <and>
-                <isset property="manifest.available"/>
                 <isset property="main.class"/>
                 <not>
                     <equals arg1="${main.class}" arg2="" trim="true"/>
                 </not>
             </and>
         </condition>
-        <condition property="manifest.available+main.class+mkdist.available">
+        <condition property="profile.available">
             <and>
-                <istrue value="${manifest.available+main.class}"/>
-                <isset property="libs.CopyLibs.classpath"/>
+                <isset property="javac.profile"/>
+                <length length="0" string="${javac.profile}" when="greater"/>
+                <not>
+                    <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/>
+                </not>
+            </and>
+        </condition>
+        <condition property="do.archive">
+            <or>
+                <not>
+                    <istrue value="${jar.archive.disabled}"/>
+                </not>
+                <istrue value="${not.archive.disabled}"/>
+            </or>
+        </condition>
+        <condition property="do.archive+manifest.available">
+            <and>
+                <isset property="manifest.available"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
+        <condition property="do.archive+main.class.available">
+            <and>
+                <isset property="main.class.available"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
+        <condition property="do.archive+splashscreen.available">
+            <and>
+                <isset property="splashscreen.available"/>
+                <istrue value="${do.archive}"/>
+            </and>
+        </condition>
+        <condition property="do.archive+profile.available">
+            <and>
+                <isset property="profile.available"/>
+                <istrue value="${do.archive}"/>
             </and>
         </condition>
         <condition property="have.tests">
@@ -86,6 +201,7 @@ is divided into following sections:
             </and>
         </condition>
         <property name="run.jvmargs" value=""/>
+        <property name="run.jvmargs.ide" value=""/>
         <property name="javac.compilerargs" value=""/>
         <property name="work.dir" value="${basedir}"/>
         <condition property="no.deps">
@@ -97,6 +213,8 @@ is divided into following sections:
         <property name="javadoc.preview" value="true"/>
         <property name="application.args" value=""/>
         <property name="source.encoding" value="${file.encoding}"/>
+        <property name="runtime.encoding" value="${source.encoding}"/>
+        <property name="manifest.encoding" value="${source.encoding}"/>
         <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
             <and>
                 <isset property="javadoc.encoding"/>
@@ -112,12 +230,58 @@ is divided into following sections:
         <condition property="do.depend.true">
             <istrue value="${do.depend}"/>
         </condition>
-        <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
+        <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
+        <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
+            <and>
+                <isset property="endorsed.classpath"/>
+                <not>
+                    <equals arg1="${endorsed.classpath}" arg2="" trim="true"/>
+                </not>
+            </and>
+        </condition>
+        <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}">
+            <isset property="profile.available"/>
+        </condition>
+        <condition else="false" property="jdkBug6558476">
+            <and>
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>
+                <not>
+                    <os family="unix"/>
+                </not>
+            </and>
+        </condition>
+        <condition else="false" property="javac.fork">
+            <or>
+                <istrue value="${jdkBug6558476}"/>
+                <istrue value="${javac.external.vm}"/>
+            </or>
+        </condition>
+        <property name="jar.index" value="false"/>
+        <property name="jar.index.metainf" value="${jar.index}"/>
+        <property name="copylibs.rebase" value="true"/>
+        <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
+        <condition property="junit.available">
+            <or>
+                <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
+                <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
+            </or>
+        </condition>
+        <condition property="testng.available">
+            <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
+        </condition>
+        <condition property="junit+testng.available">
             <and>
-                <isset property="jaxws.endorsed.dir"/>
-                <available file="nbproject/jaxws-build.xml"/>
+                <istrue value="${junit.available}"/>
+                <istrue value="${testng.available}"/>
             </and>
         </condition>
+        <condition else="testng" property="testng.mode" value="mixed">
+            <istrue value="${junit+testng.available}"/>
+        </condition>
+        <condition else="" property="testng.debug.mode" value="-mixed">
+            <istrue value="${junit+testng.available}"/>
+        </condition>
+        <property name="java.failonerror" value="true"/>
     </target>
     <target name="-post-init">
         <!-- Empty placeholder for easier customization. -->
@@ -144,26 +308,152 @@ is divided into following sections:
             </sequential>
         </macrodef>
     </target>
-    <target name="-init-macrodef-javac">
+    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
             <attribute default="${src.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
+            <attribute default="${javac.modulepath}" name="modulepath"/>
+            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
+            <attribute default="${javac.processorpath}" name="processorpath"/>
+            <attribute default="${javac.processormodulepath}" name="processormodulepath"/>
+            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
             <attribute default="${includes}" name="includes"/>
             <attribute default="${excludes}" name="excludes"/>
             <attribute default="${javac.debug}" name="debug"/>
-            <attribute default="" name="sourcepath"/>
+            <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
+            <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/>
+            <attribute default="${empty.dir}" name="gensrcdir"/>
             <element name="customize" optional="true"/>
             <sequential>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
+                <condition property="warn.excludes.internal">
+                    <and>
+                        <isset property="named.module.internal"/>
+                        <length length="0" string="@{excludes}" trim="true" when="greater"/>
+                    </and>
+                </condition>
+                <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/>
+                <property location="${build.dir}/empty" name="empty.dir"/>
+                <mkdir dir="${empty.dir}"/>
+                <mkdir dir="@{apgeneratedsrcdir}"/>
+                <condition property="processormodulepath.set">
+                    <resourcecount count="0" when="greater">
+                        <path>
+                            <pathelement path="@{processormodulepath}"/>
+                        </path>
+                    </resourcecount>
+                </condition>
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+                    <src>
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+                            <include name="*"/>
+                        </dirset>
+                    </src>
                     <classpath>
                         <path path="@{classpath}"/>
                     </classpath>
-                    <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
+                    <modulepath>
+                        <path path="@{modulepath}"/>
+                    </modulepath>
+                    <upgrademodulepath>
+                        <path path="@{upgrademodulepath}"/>
+                    </upgrademodulepath>
+                    <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/>
+                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
+                    <compilerarg line="${javac.compilerargs}"/>
+                    <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/>
+                    <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/>
+                    <compilerarg unless:set="processormodulepath.set" value="-processorpath"/>
+                    <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/>
+                    <compilerarg line="${ap.processors.internal}"/>
+                    <compilerarg line="${annotation.processing.processor.options}"/>
+                    <compilerarg value="-s"/>
+                    <compilerarg path="@{apgeneratedsrcdir}"/>
+                    <compilerarg line="${ap.proc.none.internal}"/>
                     <customize/>
                 </javac>
             </sequential>
         </macrodef>
+    </target>
+    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
+        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${src.dir}" name="srcdir"/>
+            <attribute default="${build.classes.dir}" name="destdir"/>
+            <attribute default="${javac.classpath}" name="classpath"/>
+            <attribute default="${javac.modulepath}" name="modulepath"/>
+            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
+            <attribute default="${javac.processorpath}" name="processorpath"/>
+            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="${javac.debug}" name="debug"/>
+            <attribute default="${empty.dir}" name="sourcepath"/>
+            <attribute default="${empty.dir}" name="gensrcdir"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property location="${build.dir}/empty" name="empty.dir"/>
+                <mkdir dir="${empty.dir}"/>
+                <mkdir dir="@{apgeneratedsrcdir}"/>
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+                    <src>
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+                            <include name="*"/>
+                        </dirset>
+                    </src>
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
+                    <compilerarg line="${javac.compilerargs}"/>
+                    <compilerarg value="-processorpath"/>
+                    <compilerarg path="@{processorpath}:${empty.dir}"/>
+                    <compilerarg line="${ap.processors.internal}"/>
+                    <compilerarg line="${annotation.processing.processor.options}"/>
+                    <compilerarg value="-s"/>
+                    <compilerarg path="@{apgeneratedsrcdir}"/>
+                    <compilerarg line="${ap.proc.none.internal}"/>
+                    <customize/>
+                </javac>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
+        <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${src.dir}" name="srcdir"/>
+            <attribute default="${build.classes.dir}" name="destdir"/>
+            <attribute default="${javac.classpath}" name="classpath"/>
+            <attribute default="${javac.modulepath}" name="modulepath"/>
+            <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/>
+            <attribute default="${javac.processorpath}" name="processorpath"/>
+            <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="${javac.debug}" name="debug"/>
+            <attribute default="${empty.dir}" name="sourcepath"/>
+            <attribute default="${empty.dir}" name="gensrcdir"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property location="${build.dir}/empty" name="empty.dir"/>
+                <mkdir dir="${empty.dir}"/>
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+                    <src>
+                        <dirset dir="@{gensrcdir}" erroronmissingdir="false">
+                            <include name="*"/>
+                        </dirset>
+                    </src>
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                    <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <compilerarg line="${javac.profile.cmd.line.arg}"/>
+                    <compilerarg line="${javac.compilerargs}"/>
+                    <customize/>
+                </javac>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
             <attribute default="${src.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
@@ -180,51 +470,383 @@ is divided into following sections:
             <attribute default="${build.classes.dir}" name="destdir"/>
             <sequential>
                 <fail unless="javac.includes">Must set javac.includes</fail>
-                <pathconvert pathsep="," property="javac.includes.binary">
+                <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
                     <path>
                         <filelist dir="@{destdir}" files="${javac.includes}"/>
                     </path>
                     <globmapper from="*.java" to="*.class"/>
                 </pathconvert>
+                <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
+                <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
+                <delete>
+                    <files includesfile="${javac.includesfile.binary}"/>
+                </delete>
                 <delete>
-                    <files includes="${javac.includes.binary}"/>
+                    <fileset file="${javac.includesfile.binary}"/>
                 </delete>
             </sequential>
         </macrodef>
     </target>
-    <target name="-init-macrodef-junit">
-        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+    <target if="${junit.available}" name="-init-macrodef-junit-init">
+        <condition else="false" property="nb.junit.batch" value="true">
+            <and>
+                <istrue value="${junit.available}"/>
+                <not>
+                    <isset property="test.method"/>
+                </not>
+            </and>
+        </condition>
+        <condition else="false" property="nb.junit.single" value="true">
+            <and>
+                <istrue value="${junit.available}"/>
+                <isset property="test.method"/>
+            </and>
+        </condition>
+    </target>
+    <target name="-init-test-properties">
+        <property name="test.binaryincludes" value="&lt;nothing&gt;"/>
+        <property name="test.binarytestincludes" value=""/>
+        <property name="test.binaryexcludes" value=""/>
+    </target>
+    <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module">
+        <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
             <attribute default="${includes}" name="includes"/>
             <attribute default="${excludes}" name="excludes"/>
-            <attribute default="**" name="testincludes"/>
+            <element name="customizePrototype" optional="true"/>
             <sequential>
-                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
-                    <batchtest todir="${build.test.results.dir}">
-                        <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
-                            <filename name="@{testincludes}"/>
-                        </fileset>
-                    </batchtest>
+                <property name="junit.forkmode" value="perTest"/>
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
+                    <syspropertyset>
+                        <propertyref prefix="test-sys-prop."/>
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
                     <classpath>
                         <path path="${run.test.classpath}"/>
                     </classpath>
+                    <modulepath>
+                        <path path="${run.test.modulepath}"/>
+                    </modulepath>
+                    <formatter type="brief" usefile="false"/>
+                    <formatter type="xml"/>
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-ea"/>
+                    <jvmarg line="${run.test.jvmargs}"/>
+                    <customizePrototype/>
+                </junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal">
+        <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <element name="customizePrototype" optional="true"/>
+            <sequential>
+                <property name="junit.forkmode" value="perTest"/>
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
                     <syspropertyset>
                         <propertyref prefix="test-sys-prop."/>
                         <mapper from="test-sys-prop.*" to="*" type="glob"/>
                     </syspropertyset>
+                    <classpath>
+                        <path path="${run.test.classpath}"/>
+                    </classpath>
                     <formatter type="brief" usefile="false"/>
                     <formatter type="xml"/>
-                    <jvmarg line="${run.jvmargs}"/>
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-ea"/>
+                    <customizePrototype/>
                 </junit>
             </sequential>
         </macrodef>
     </target>
-    <target name="-init-macrodef-nbjpda">
+    <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
+        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <j2seproject3:junit-prototype>
+                    <customizePrototype>
+                        <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
+                        <customize/>
+                    </customizePrototype>
+                </j2seproject3:junit-prototype>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
+        <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <j2seproject3:junit-prototype>
+                    <customizePrototype>
+                        <batchtest todir="${build.test.results.dir}">
+                            <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
+                                <filename name="@{testincludes}"/>
+                            </fileset>
+                            <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
+                                <filename name="${test.binarytestincludes}"/>
+                            </fileset>
+                        </batchtest>
+                        <customize/>
+                    </customizePrototype>
+                </j2seproject3:junit-prototype>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
+    <target if="${testng.available}" name="-init-macrodef-testng">
+        <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
+                    <isset property="test.method"/>
+                </condition>
+                <union id="test.set">
+                    <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
+                        <filename name="@{testincludes}"/>
+                    </fileset>
+                </union>
+                <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
+                <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Closure_Tool" testname="TestNG tests" workingDir="${work.dir}">
+                    <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
+                    <propertyset>
+                        <propertyref prefix="test-sys-prop."/>
+                        <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                    </propertyset>
+                    <classpath>
+                        <path path="${run.test.classpath}"/>
+                    </classpath>
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <customize/>
+                </testng>
+            </sequential>
+        </macrodef>
+    </target>
+    <target name="-init-macrodef-test-impl">
+        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element implicit="true" name="customize" optional="true"/>
+            <sequential>
+                <echo>No tests executed.</echo>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
+        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element implicit="true" name="customize" optional="true"/>
+            <sequential>
+                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize/>
+                </j2seproject3:junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
+        <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element implicit="true" name="customize" optional="true"/>
+            <sequential>
+                <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize/>
+                </j2seproject3:testng>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
+        <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <sequential>
+                <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize>
+                        <jvmarg line="${run.jvmargs}"/>
+                        <jvmarg line="${run.jvmargs.ide}"/>
+                    </customize>
+                </j2seproject3:test-impl>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
+        <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <element name="customizeDebuggee" optional="true"/>
+            <sequential>
+                <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customize>
+                        <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
+                        <customizeDebuggee/>
+                    </customize>
+                </j2seproject3:junit>
+            </sequential>
+        </macrodef>
+    </target>
+    <target if="${testng.available}" name="-init-macrodef-testng-debug">
+        <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${main.class}" name="testClass"/>
+            <attribute default="" name="testMethod"/>
+            <element name="customize2" optional="true"/>
+            <sequential>
+                <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
+                    <isset property="test.method"/>
+                </condition>
+                <condition else="-suitename Closure_Tool -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
+                    <matches pattern=".*\.xml" string="@{testClass}"/>
+                </condition>
+                <delete dir="${build.test.results.dir}" quiet="true"/>
+                <mkdir dir="${build.test.results.dir}"/>
+                <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
+                    <customizeDebuggee>
+                        <customize2/>
+                        <jvmarg value="-ea"/>
+                        <arg line="${testng.debug.mode}"/>
+                        <arg line="-d ${build.test.results.dir}"/>
+                        <arg line="-listener org.testng.reporters.VerboseReporter"/>
+                        <arg line="${testng.cmd.args}"/>
+                    </customizeDebuggee>
+                </j2seproject3:debug>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
+        <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${main.class}" name="testClass"/>
+            <attribute default="" name="testMethod"/>
+            <element implicit="true" name="customize2" optional="true"/>
+            <sequential>
+                <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
+                    <customize2/>
+                </j2seproject3:testng-debug>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
+        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <attribute default="${main.class}" name="testClass"/>
+            <attribute default="" name="testMethod"/>
+            <sequential>
+                <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
+                    <customizeDebuggee>
+                        <jvmarg line="${run.jvmargs}"/>
+                        <jvmarg line="${run.jvmargs.ide}"/>
+                    </customizeDebuggee>
+                </j2seproject3:test-debug-impl>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
+        <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${includes}" name="includes"/>
+            <attribute default="${excludes}" name="excludes"/>
+            <attribute default="**" name="testincludes"/>
+            <attribute default="" name="testmethods"/>
+            <attribute default="${main.class}" name="testClass"/>
+            <attribute default="" name="testMethod"/>
+            <sequential>
+                <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
+                    <customize2>
+                        <syspropertyset>
+                            <propertyref prefix="test-sys-prop."/>
+                            <mapper from="test-sys-prop.*" to="*" type="glob"/>
+                        </syspropertyset>
+                    </customize2>
+                </j2seproject3:testng-debug-impl>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
+    <!--
+                pre NB7.2 profiling section; consider it deprecated
+            -->
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
+    <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
+        <macrodef name="resolve">
+            <attribute name="name"/>
+            <attribute name="value"/>
+            <sequential>
+                <property name="@{name}" value="${env.@{value}}"/>
+            </sequential>
+        </macrodef>
+        <macrodef name="profile">
+            <attribute default="${main.class}" name="classname"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property environment="env"/>
+                <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
+                <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}">
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="${profiler.info.jvmargs.agent}"/>
+                    <jvmarg line="${profiler.info.jvmargs}"/>
+                    <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+                    <arg line="${application.args}"/>
+                    <classpath>
+                        <path path="${run.classpath}"/>
+                    </classpath>
+                    <syspropertyset>
+                        <propertyref prefix="run-sys-prop."/>
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <customize/>
+                </java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
+        <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
+        <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
+    </target>
+    <!--
+                end of pre NB7.2 profiling section
+            -->
+    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
         <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
             <attribute default="${main.class}" name="name"/>
+            <attribute default="${debug.modulepath}" name="modulepath"/>
             <attribute default="${debug.classpath}" name="classpath"/>
             <attribute default="" name="stopclassname"/>
             <sequential>
-                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
+                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
+                    <modulepath>
+                        <path path="@{modulepath}"/>
+                    </modulepath>
                     <classpath>
                         <path path="@{classpath}"/>
                     </classpath>
@@ -243,32 +865,88 @@ is divided into following sections:
         </macrodef>
     </target>
     <target name="-init-debug-args">
-        <property name="version-output" value="java version &quot;${ant.java.version}"/>
-        <condition property="have-jdk-older-than-1.4">
-            <or>
-                <contains string="${version-output}" substring="java version &quot;1.0"/>
-                <contains string="${version-output}" substring="java version &quot;1.1"/>
-                <contains string="${version-output}" substring="java version &quot;1.2"/>
-                <contains string="${version-output}" substring="java version &quot;1.3"/>
-            </or>
+        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
+            <os family="windows"/>
         </condition>
-        <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
-            <istrue value="${have-jdk-older-than-1.4}"/>
+        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
+            <isset property="debug.transport"/>
         </condition>
     </target>
     <target depends="-init-debug-args" name="-init-macrodef-debug">
         <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${module.name}" name="modulename"/>
             <attribute default="${main.class}" name="classname"/>
+            <attribute default="${debug.modulepath}" name="modulepath"/>
             <attribute default="${debug.classpath}" name="classpath"/>
+            <element name="customizeDebuggee" optional="true"/>
+            <sequential>
+                <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}">
+                    <customize>
+                        <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
+                        <customizeDebuggee/>
+                    </customize>
+                </j2seproject1:java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module">
+        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+            <attribute default="${module.name}" name="modulename"/>
+            <attribute default="${main.class}" name="classname"/>
+            <attribute default="${run.modulepath}" name="modulepath"/>
+            <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
+            <attribute default="${run.classpath}" name="classpath"/>
+            <attribute default="jvm" name="jvm"/>
             <element name="customize" optional="true"/>
             <sequential>
-                <java classname="@{classname}" dir="${work.dir}" fork="true">
-                    <jvmarg line="${debug-args-line}"/>
-                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}">
+                    <classpath>
+                        <path path="@{classpath}"/>
+                    </classpath>
+                    <modulepath>
+                        <pathelement path="@{modulepath}"/>
+                        <pathelement location="${module.build.classes.dir}"/>
+                    </modulepath>
+                    <upgrademodulepath>
+                        <path path="@{upgrademodulepath}"/>
+                    </upgrademodulepath>
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
                     <jvmarg line="${run.jvmargs}"/>
+                    <jvmarg line="${run.jvmargs.ide}"/>
+                    <syspropertyset>
+                        <propertyref prefix="run-sys-prop."/>
+                        <mapper from="run-sys-prop.*" to="*" type="glob"/>
+                    </syspropertyset>
+                    <customize/>
+                </java>
+            </sequential>
+        </macrodef>
+    </target>
+    <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module">
+        <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+            <attribute default="" name="modulename"/>
+            <attribute default="${main.class}" name="classname"/>
+            <attribute default="${run.modulepath}" name="modulepath"/>
+            <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/>
+            <attribute default="${run.classpath}" name="classpath"/>
+            <attribute default="jvm" name="jvm"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
                     <classpath>
                         <path path="@{classpath}"/>
                     </classpath>
+                    <modulepath>
+                        <path path="@{modulepath}"/>
+                    </modulepath>
+                    <upgrademodulepath>
+                        <path path="@{upgrademodulepath}"/>
+                    </upgrademodulepath>
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
+                    <jvmarg line="${run.jvmargs}"/>
+                    <jvmarg line="${run.jvmargs.ide}"/>
                     <syspropertyset>
                         <propertyref prefix="run-sys-prop."/>
                         <mapper from="run-sys-prop.*" to="*" type="glob"/>
@@ -278,15 +956,23 @@ is divided into following sections:
             </sequential>
         </macrodef>
     </target>
-    <target name="-init-macrodef-java">
+    <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal">
         <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+            <attribute default="" name="modulename"/>
             <attribute default="${main.class}" name="classname"/>
+            <attribute default="" name="modulepath"/>
+            <attribute default="${run.classpath}" name="classpath"/>
+            <attribute default="jvm" name="jvm"/>
             <element name="customize" optional="true"/>
             <sequential>
-                <java classname="@{classname}" dir="${work.dir}" fork="true">
+                <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true">
+                    <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
+                    <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
+                    <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
                     <jvmarg line="${run.jvmargs}"/>
+                    <jvmarg line="${run.jvmargs.ide}"/>
                     <classpath>
-                        <path path="${run.classpath}"/>
+                        <path path="@{classpath}"/>
                     </classpath>
                     <syspropertyset>
                         <propertyref prefix="run-sys-prop."/>
@@ -297,21 +983,108 @@ is divided into following sections:
             </sequential>
         </macrodef>
     </target>
+    <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/>
+    <target name="-init-macrodef-copylibs">
+        <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
+            <attribute default="${manifest.file}" name="manifest"/>
+            <element name="customize" optional="true"/>
+            <sequential>
+                <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+                <pathconvert property="run.classpath.without.build.classes.dir">
+                    <path path="${run.classpath}"/>
+                    <map from="${build.classes.dir.resolved}" to=""/>
+                </pathconvert>
+                <pathconvert pathsep=" " property="jar.classpath">
+                    <path path="${run.classpath.without.build.classes.dir}"/>
+                    <chainedmapper>
+                        <flattenmapper/>
+                        <filtermapper>
+                            <replacestring from=" " to="%20"/>
+                        </filtermapper>
+                        <globmapper from="*" to="lib/*"/>
+                    </chainedmapper>
+                </pathconvert>
+                <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
+                <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+                    <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
+                    <manifest>
+                        <attribute name="Class-Path" value="${jar.classpath}"/>
+                        <customize/>
+                    </manifest>
+                </copylibs>
+            </sequential>
+        </macrodef>
+    </target>
     <target name="-init-presetdef-jar">
         <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
-            <jar compress="${jar.compress}" jarfile="${dist.jar}">
-                <j2seproject1:fileset dir="${build.classes.dir}"/>
+            <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8">
+                <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/>
             </jar>
         </presetdef>
     </target>
-    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
+    <target name="-init-ap-cmdline-properties">
+        <property name="annotation.processing.enabled" value="true"/>
+        <property name="annotation.processing.processors.list" value=""/>
+        <property name="annotation.processing.processor.options" value=""/>
+        <property name="annotation.processing.run.all.processors" value="true"/>
+        <property name="javac.processorpath" value="${javac.classpath}"/>
+        <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
+        <condition property="ap.supported.internal" value="true">
+            <not>
+                <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
+            </not>
+        </condition>
+    </target>
+    <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
+        <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
+            <isfalse value="${annotation.processing.run.all.processors}"/>
+        </condition>
+        <condition else="" property="ap.proc.none.internal" value="-proc:none">
+            <isfalse value="${annotation.processing.enabled}"/>
+        </condition>
+    </target>
+    <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
+        <property name="ap.cmd.line.internal" value=""/>
+    </target>
+    <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
     <!--
                 ===================
                 COMPILATION SECTION
                 ===================
             -->
-    <target depends="init" name="deps-jar" unless="no.deps">
-        <ant antfile="${project.org_netbeans_modules_classfile}/build.xml" inheritall="false" target="netbeans"/>
+    <target name="-deps-jar-init" unless="built-jar.properties">
+        <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
+        <delete file="${built-jar.properties}" quiet="true"/>
+    </target>
+    <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
+        <echo level="warn" message="Cycle detected: Closure Tool was already built"/>
+    </target>
+    <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
+        <mkdir dir="${build.dir}"/>
+        <touch file="${built-jar.properties}" verbose="false"/>
+        <property file="${built-jar.properties}" prefix="already.built.jar."/>
+        <antcall target="-warn-already-built-jar"/>
+        <propertyfile file="${built-jar.properties}">
+            <entry key="${basedir}" value=""/>
+        </propertyfile>
+        <antcall target="-maybe-call-dep">
+            <param name="call.built.properties" value="${built-jar.properties}"/>
+            <param location="${project.org_netbeans_modules_classfile}" name="call.subproject"/>
+            <param location="${project.org_netbeans_modules_classfile}/build.xml" name="call.script"/>
+            <param name="call.target" value="netbeans"/>
+            <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
+            <param name="transfer.not.archive.disabled" value="true"/>
+            <param name="transfer.do.jlink" value="false"/>
+        </antcall>
+    </target>
+    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
+    <target depends="init" name="-check-automatic-build">
+        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
+    </target>
+    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
+        <antcall target="clean">
+            <param name="no.dependencies" value="true"/>
+        </antcall>
     </target>
     <target depends="init,deps-jar" name="-pre-pre-compile">
         <mkdir dir="${build.classes.dir}"/>
@@ -321,19 +1094,30 @@ is divided into following sections:
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target if="do.depend.true" name="-compile-depend">
-        <j2seproject3:depend/>
+        <pathconvert property="build.generated.subdirs">
+            <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+                <include name="*"/>
+            </dirset>
+        </pathconvert>
+        <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
     </target>
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
-        <j2seproject3:javac/>
+    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
+        <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
         <copy todir="${build.classes.dir}">
             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
         </copy>
     </target>
+    <target if="has.persistence.xml" name="-copy-persistence-xml">
+        <mkdir dir="${build.classes.dir}/META-INF"/>
+        <copy todir="${build.classes.dir}/META-INF">
+            <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
+        </copy>
+    </target>
     <target name="-post-compile">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
     <target name="-pre-compile-single">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
@@ -341,13 +1125,13 @@ is divided into following sections:
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile/>
-        <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/>
     </target>
     <target name="-post-compile-single">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
     <!--
                 ====================
                 JAR BUILDING SECTION
@@ -361,57 +1145,191 @@ is divided into following sections:
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
-        <j2seproject1:jar/>
+    <target depends="init,compile" name="-check-module-main-class">
+        <pathconvert property="main.class.file">
+            <string value="${main.class}"/>
+            <unpackagemapper from="*" to="*.class"/>
+        </pathconvert>
+        <condition property="do.module.main.class">
+            <and>
+                <isset property="main.class.available"/>
+                <available file="${build.classes.dir}/module-info.class"/>
+                <available file="${build.classes.dir}/${main.class.file}"/>
+                <isset property="libs.CopyLibs.classpath"/>
+                <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/>
+            </and>
+        </condition>
+    </target>
+    <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class">
+        <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/>
+        <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/>
+    </target>
+    <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available">
+        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+        <touch file="${tmp.manifest.file}" verbose="false"/>
+    </target>
+    <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest">
+        <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
+        <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/>
+    </target>
+    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass">
+        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
+            <attribute name="Main-Class" value="${main.class}"/>
+        </manifest>
+    </target>
+    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile">
+        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
+            <attribute name="Profile" value="${javac.profile}"/>
+        </manifest>
+    </target>
+    <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen">
+        <basename file="${application.splash}" property="splashscreen.basename"/>
+        <mkdir dir="${build.classes.dir}/META-INF"/>
+        <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
+        <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update">
+            <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
+        </manifest>
+    </target>
+    <target depends="init,compile" name="-check-do-mkdist">
+        <condition property="do.mkdist">
+            <and>
+                <isset property="do.archive"/>
+                <isset property="libs.CopyLibs.classpath"/>
+                <not>
+                    <istrue value="${mkdist.disabled}"/>
+                </not>
+                <not>
+                    <available file="${build.classes.dir}/module-info.class"/>
+                </not>
+            </and>
+        </condition>
     </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
-        <j2seproject1:jar manifest="${manifest.file}"/>
+    <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.mkdist" name="-do-jar-copylibs">
+        <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
+        <echo level="info">To run this application from the command line without Ant, try:</echo>
+        <property location="${dist.jar}" name="dist.jar.resolved"/>
+        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
     </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
-        <j2seproject1:jar manifest="${manifest.file}">
-            <j2seproject1:manifest>
-                <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
-            </j2seproject1:manifest>
-        </j2seproject1:jar>
-        <echo>To run this application from the command line without Ant, try:</echo>
+    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
+        <j2seproject1:jar manifest="${tmp.manifest.file}"/>
         <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
         <property location="${dist.jar}" name="dist.jar.resolved"/>
+        <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value="">
+            <isset property="named.module.internal"/>
+        </condition>
         <pathconvert property="run.classpath.with.dist.jar">
             <path path="${run.classpath}"/>
+            <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/>
+        </pathconvert>
+        <pathconvert property="run.modulepath.with.dist.jar">
+            <path location="${dist.jar.resolved}"/>
+            <path path="${run.modulepath}"/>
             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
         </pathconvert>
-        <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+        <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}">
+            <isset property="named.module.internal"/>
+        </condition>
+        <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}">
+            <and>
+                <isset property="modules.supported.internal"/>
+                <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/>
+            </and>
+        </condition>
+        <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}">
+            <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/>
+        </condition>
+        <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value="">
+            <isset property="do.module.main.class"/>
+        </condition>
+        <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}">
+            <isset property="named.module.internal"/>
+        </condition>
+        <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}">
+            <isset property="main.class.available"/>
+        </condition>
+        <condition else="debug" property="jar.usage.level" value="info">
+            <isset property="main.class.available"/>
+        </condition>
+        <echo level="${jar.usage.level}" message="${jar.usage.message}"/>
     </target>
-    <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
-        <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
-        <pathconvert property="run.classpath.without.build.classes.dir">
-            <path path="${run.classpath}"/>
-            <map from="${build.classes.dir.resolved}" to=""/>
-        </pathconvert>
-        <pathconvert pathsep=" " property="jar.classpath">
-            <path path="${run.classpath.without.build.classes.dir}"/>
-            <chainedmapper>
-                <flattenmapper/>
-                <globmapper from="*" to="lib/*"/>
-            </chainedmapper>
-        </pathconvert>
-        <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
-        <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
-            <fileset dir="${build.classes.dir}"/>
-            <manifest>
-                <attribute name="Main-Class" value="${main.class}"/>
-                <attribute name="Class-Path" value="${jar.classpath}"/>
-            </manifest>
-        </copylibs>
-        <echo>To run this application from the command line without Ant, try:</echo>
-        <property location="${dist.jar}" name="dist.jar.resolved"/>
-        <echo>java -jar "${dist.jar.resolved}"</echo>
+    <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest">
+        <delete>
+            <fileset file="${tmp.manifest.file}"/>
+        </delete>
     </target>
+    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/>
+    <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/>
     <target name="-post-jar">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
+    <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
+    <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/>
+    <!--
+                =================
+                DEPLOY SECTION
+                =================
+            -->
+    <target name="-pre-deploy">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="init" name="-check-jlink">
+        <condition property="do.jlink.internal">
+            <and>
+                <istrue value="${do.jlink}"/>
+                <isset property="do.archive"/>
+                <isset property="named.module.internal"/>
+            </and>
+        </condition>
+    </target>
+    <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy">
+        <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/>
+        <property name="jlink.launcher.name" value="${application.title}"/>
+        <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}">
+            <and>
+                <isset property="jlink.additionalmodules"/>
+                <length length="0" string="${jlink.additionalmodules}" when="greater"/>
+            </and>
+        </condition>
+        <condition property="jlink.do.strip.internal">
+            <and>
+                <isset property="jlink.strip"/>
+                <istrue value="${jlink.strip}"/>
+            </and>
+        </condition>
+        <condition property="jlink.do.additionalparam.internal">
+            <and>
+                <isset property="jlink.additionalparam"/>
+                <length length="0" string="${jlink.additionalparam}" when="greater"/>
+            </and>
+        </condition>
+        <condition property="jlink.do.launcher.internal">
+            <and>
+                <istrue value="${jlink.launcher}"/>
+                <isset property="main.class.available"/>
+            </and>
+        </condition>
+        <property name="platform.jlink" value="${jdk.home}/bin/jlink"/>
+        <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/>
+        <exec executable="${platform.jlink}">
+            <arg value="--module-path"/>
+            <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/>
+            <arg value="--add-modules"/>
+            <arg value="${jlink.add.modules}"/>
+            <arg if:set="jlink.do.strip.internal" value="--strip-debug"/>
+            <arg if:set="jlink.do.launcher.internal" value="--launcher"/>
+            <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/>
+            <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/>
+            <arg value="--output"/>
+            <arg value="${dist.jlink.output}"/>
+        </exec>
+    </target>
+    <target name="-post-deploy">
+        <!-- Empty placeholder for easier customization. -->
+        <!-- You can override this target in the ../build.xml file. -->
+    </target>
+    <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/>
     <!--
                 =================
                 EXECUTION SECTION
@@ -427,10 +1345,14 @@ is divided into following sections:
     <target name="-do-not-recompile">
         <property name="javac.includes.binary" value=""/>
     </target>
-    <target depends="init,-do-not-recompile,compile-single" name="run-single">
+    <target depends="init,compile-single" name="run-single">
         <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
         <j2seproject1:java classname="${run.class}"/>
     </target>
+    <target depends="init,compile-test-single" name="run-test-with-main">
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+        <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
+    </target>
     <!--
                 =================
                 DEBUGGING SECTION
@@ -439,11 +1361,14 @@ is divided into following sections:
     <target depends="init" if="netbeans.home" name="-debug-start-debugger">
         <j2seproject1:nbjpdastart name="${debug.class}"/>
     </target>
+    <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
+        <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
+    </target>
     <target depends="init,compile" name="-debug-start-debuggee">
         <j2seproject3:debug>
-            <customize>
+            <customizeDebuggee>
                 <arg line="${application.args}"/>
-            </customize>
+            </customizeDebuggee>
         </j2seproject3:debug>
     </target>
     <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
@@ -455,7 +1380,12 @@ is divided into following sections:
         <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
         <j2seproject3:debug classname="${debug.class}"/>
     </target>
-    <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+    <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+    <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
+        <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+        <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
+    </target>
+    <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
     <target depends="init" name="-pre-debug-fix">
         <fail unless="fix.includes">Must set fix.includes</fail>
         <property name="javac.includes" value="${fix.includes}.java"/>
@@ -465,20 +1395,146 @@ is divided into following sections:
     </target>
     <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
     <!--
+                =================
+                PROFILING SECTION
+                =================
+            -->
+    <!--
+                pre NB7.2 profiler integration
+            -->
+    <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
+        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile/>
+    </target>
+    <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
+        <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
+        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile classname="${profile.class}"/>
+    </target>
+    <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
+        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <profile classname="sun.applet.AppletViewer">
+            <customize>
+                <arg value="${applet.url}"/>
+            </customize>
+        </profile>
+    </target>
+    <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
+        <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
+        <nbprofiledirect>
+            <classpath>
+                <path path="${run.test.classpath}"/>
+            </classpath>
+        </nbprofiledirect>
+        <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods="">
+            <customize>
+                <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
+                <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
+                <jvmarg value="${profiler.info.jvmargs.agent}"/>
+                <jvmarg line="${profiler.info.jvmargs}"/>
+                <classpath>
+                    <path path="${run.test.classpath}"/>
+                </classpath>
+            </customize>
+        </j2seproject3:junit>
+    </target>
+    <!--
+                end of pre NB72 profiling section
+            -->
+    <target if="netbeans.home" name="-profile-check">
+        <condition property="profiler.configured">
+            <or>
+                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
+                <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
+            </or>
+        </condition>
+    </target>
+    <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
+        <startprofiler/>
+        <antcall target="run"/>
+    </target>
+    <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+        <startprofiler/>
+        <antcall target="run-single"/>
+    </target>
+    <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
+    <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
+        <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+        <startprofiler/>
+        <antcall target="test-single"/>
+    </target>
+    <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
+        <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+        <startprofiler/>
+        <antcall target="run-test-with-main"/>
+    </target>
+    <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
+        <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+        <startprofiler/>
+        <antcall target="run-applet"/>
+    </target>
+    <!--
                 ===============
                 JAVADOC SECTION
                 ===============
             -->
-    <target depends="init" name="-javadoc-build">
+    <target depends="init" if="have.sources" name="-javadoc-build">
         <mkdir dir="${dist.javadoc.dir}"/>
-        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
+        <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
+            <and>
+                <isset property="endorsed.classpath.cmd.line.arg"/>
+                <not>
+                    <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
+                </not>
+            </and>
+        </condition>
+        <condition else="" property="bug5101868workaround" value="*.java">
+            <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
+        </condition>
+        <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5">
+            <and>
+                <isset property="javadoc.html5"/>
+                <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/>
+            </and>
+        </condition>
+        <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version} [...]
             <classpath>
                 <path path="${javac.classpath}"/>
             </classpath>
-            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+            <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+                <include name="**/*.java"/>
+                <exclude name="*.java"/>
+            </fileset>
+            <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
+            <arg line="${javadoc.html5.cmd.line.arg}"/>
         </javadoc>
+        <copy todir="${dist.javadoc.dir}">
+            <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+                <filename name="**/doc-files/**"/>
+            </fileset>
+            <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
+                <include name="**/doc-files/**"/>
+            </fileset>
+        </copy>
     </target>
     <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
         <nbbrowse file="${dist.javadoc.dir}/index.html"/>
@@ -486,7 +1542,7 @@ is divided into following sections:
     <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
     <!--
                 =========================
-                JUNIT COMPILATION SECTION
+                TEST COMPILATION SECTION
                 =========================
             -->
     <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
@@ -496,11 +1552,63 @@ is divided into following sections:
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
+    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module">
+        <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/>
+        <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}">
+            <and>
+                <isset property="test.module.name"/>
+                <length length="0" string="${test.module.name}" when="greater"/>
+            </and>
+        </condition>
+        <condition else="--patch-module ${module.name}=${test.src.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED">
+            <and>
+                <isset property="test.module.name"/>
+                <length length="0" string="${test.module.name}" when="greater"/>
+            </and>
+        </condition>
+    </target>
+    <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties">
+        <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}">
+            <and>
+                <isset property="test.module.name"/>
+                <length length="0" string="${test.module.name}" when="greater"/>
+            </and>
+        </condition>
+        <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/>
+        <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/>
+        <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal">
+            <chainedmapper>
+                <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/>
+                <filtermapper>
+                    <uniqfilter/>
+                    <replacestring from="${build.test.classes.dir.abs.internal}" to=""/>
+                </filtermapper>
+                <cutdirsmapper dirs="1"/>
+                <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/>
+            </chainedmapper>
+        </pathconvert>
+        <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}">
+            <and>
+                <isset property="test.module.name"/>
+                <length length="0" string="${test.module.name}" when="greater"/>
+            </and>
+        </condition>
+    </target>
+    <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal">
+        <property name="javac.test.sourcepath" value="${empty.dir}"/>
+        <property name="javac.test.compilerargs" value=""/>
+        <property name="run.test.jvmargs" value=""/>
+    </target>
+    <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/>
     <target if="do.depend.true" name="-compile-test-depend">
         <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
     </target>
-    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
-        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
+    <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.src.dir}">
+            <customize>
+                <compilerarg line="${javac.test.compilerargs}"/>
+            </customize>
+        </j2seproject3:javac>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
         </copy>
@@ -514,10 +1622,14 @@ is divided into following sections:
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
-    <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
+    <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
-        <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
+        <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}">
+            <customize>
+                <compilerarg line="${javac.test.compilerargs}"/>
+            </customize>
+        </j2seproject3:javac>
         <copy todir="${build.test.classes.dir}">
             <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
         </copy>
@@ -529,17 +1641,17 @@ is divided into following sections:
     <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
     <!--
                 =======================
-                JUNIT EXECUTION SECTION
+                TEST EXECUTION SECTION
                 =======================
             -->
     <target depends="init" if="have.tests" name="-pre-test-run">
         <mkdir dir="${build.test.results.dir}"/>
     </target>
-    <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
-        <j2seproject3:junit testincludes="**/*Test.java"/>
+    <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run">
+        <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
     </target>
     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
-        <fail if="tests.failed">Some tests failed; see details above.</fail>
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
     </target>
     <target depends="init" if="have.tests" name="test-report"/>
     <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
@@ -547,41 +1659,43 @@ is divided into following sections:
     <target depends="init" if="have.tests" name="-pre-test-run-single">
         <mkdir dir="${build.test.results.dir}"/>
     </target>
-    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
+    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
         <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
-        <j2seproject3:junit excludes="" includes="${test.includes}"/>
+        <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
     </target>
     <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
-        <fail if="tests.failed">Some tests failed; see details above.</fail>
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
     </target>
-    <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
+    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
+        <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
+        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
+        <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
+    </target>
+    <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
+        <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
+    </target>
+    <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
     <!--
                 =======================
-                JUNIT DEBUGGING SECTION
+                TEST DEBUGGING SECTION
                 =======================
             -->
-    <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
         <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
-        <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
-        <delete file="${test.report.file}"/>
-        <mkdir dir="${build.test.results.dir}"/>
-        <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
-            <customize>
-                <syspropertyset>
-                    <propertyref prefix="test-sys-prop."/>
-                    <mapper from="test-sys-prop.*" to="*" type="glob"/>
-                </syspropertyset>
-                <arg value="${test.class}"/>
-                <arg value="showoutput=true"/>
-                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
-                <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
-            </customize>
-        </j2seproject3:debug>
+        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
+    </target>
+    <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
+        <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+        <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
+        <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
     </target>
     <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
         <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
     </target>
-    <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+    <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+    <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
+    <target depends="debug-test-method" name="debug-single-method"/>
     <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
         <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
     </target>
@@ -607,9 +1721,9 @@ is divided into following sections:
     <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
         <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
         <j2seproject3:debug classname="sun.applet.AppletViewer">
-            <customize>
+            <customizeDebuggee>
                 <arg value="${applet.url}"/>
-            </customize>
+            </customizeDebuggee>
         </j2seproject3:debug>
     </target>
     <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
@@ -618,16 +1732,58 @@ is divided into following sections:
                 CLEANUP SECTION
                 ===============
             -->
-    <target depends="init" name="deps-clean" unless="no.deps">
-        <ant antfile="${project.org_netbeans_modules_classfile}/build.xml" inheritall="false" target="clean"/>
+    <target name="-deps-clean-init" unless="built-clean.properties">
+        <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
+        <delete file="${built-clean.properties}" quiet="true"/>
+    </target>
+    <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
+        <echo level="warn" message="Cycle detected: Closure Tool was already built"/>
+    </target>
+    <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
+        <mkdir dir="${build.dir}"/>
+        <touch file="${built-clean.properties}" verbose="false"/>
+        <property file="${built-clean.properties}" prefix="already.built.clean."/>
+        <antcall target="-warn-already-built-clean"/>
+        <propertyfile file="${built-clean.properties}">
+            <entry key="${basedir}" value=""/>
+        </propertyfile>
+        <antcall target="-maybe-call-dep">
+            <param name="call.built.properties" value="${built-clean.properties}"/>
+            <param location="${project.org_netbeans_modules_classfile}" name="call.subproject"/>
+            <param location="${project.org_netbeans_modules_classfile}/build.xml" name="call.script"/>
+            <param name="call.target" value="clean"/>
+            <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
+            <param name="transfer.not.archive.disabled" value="true"/>
+            <param name="transfer.do.jlink" value="false"/>
+        </antcall>
     </target>
     <target depends="init" name="-do-clean">
         <delete dir="${build.dir}"/>
-        <delete dir="${dist.dir}"/>
+        <delete dir="${dist.jlink.output}"/>
+        <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
     </target>
     <target name="-post-clean">
         <!-- Empty placeholder for easier customization. -->
         <!-- You can override this target in the ../build.xml file. -->
     </target>
     <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
+    <target name="-check-call-dep">
+        <property file="${call.built.properties}" prefix="already.built."/>
+        <condition property="should.call.dep">
+            <and>
+                <not>
+                    <isset property="already.built.${call.subproject}"/>
+                </not>
+                <available file="${call.script}"/>
+            </and>
+        </condition>
+    </target>
+    <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
+        <ant antfile="${call.script}" inheritall="false" target="${call.target}">
+            <propertyset>
+                <propertyref prefix="transfer."/>
+                <mapper from="transfer.*" to="*" type="glob"/>
+            </propertyset>
+        </ant>
+    </target>
 </project>
diff --git a/java/classfile/closure/nbproject/genfiles.properties b/java/classfile/closure/nbproject/genfiles.properties
index 56db67d..f230ce7 100644
--- a/java/classfile/closure/nbproject/genfiles.properties
+++ b/java/classfile/closure/nbproject/genfiles.properties
@@ -3,6 +3,6 @@ build.xml.script.CRC32=b45d64e0
 build.xml.stylesheet.CRC32=be360661
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=bf8741c4
-nbproject/build-impl.xml.script.CRC32=32f3ab12
-nbproject/build-impl.xml.stylesheet.CRC32=487672f9
+nbproject/build-impl.xml.data.CRC32=9bd67057
+nbproject/build-impl.xml.script.CRC32=d6dfa4bc
+nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.99.0.48
diff --git a/java/classfile/closure/nbproject/project.properties b/java/classfile/closure/nbproject/project.properties
index 8bc3d72..51cde22 100644
--- a/java/classfile/closure/nbproject/project.properties
+++ b/java/classfile/closure/nbproject/project.properties
@@ -22,14 +22,19 @@ build.classes.excludes=**/*.java,**/*.form
 # This directory is removed when the project is cleaned:
 build.dir=build
 build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
 # Only compile against the classpath explicitly listed here:
 build.sysclasspath=ignore
 build.test.classes.dir=${build.dir}/test/classes
 build.test.results.dir=${build.dir}/test/results
 debug.classpath=\
     ${run.classpath}
+debug.modulepath=\
+    ${run.modulepath}
 debug.test.classpath=\
     ${run.test.classpath}
+debug.test.modulepath=\
+    ${run.test.modulepath}
 # This directory is removed when the project is cleaned:
 dist.dir=dist
 dist.jar=${dist.dir}/closuretool.jar
@@ -43,6 +48,8 @@ javac.classpath=\
 # Space-separated list of extra javac options
 javac.compilerargs=
 javac.deprecation=false
+javac.modulepath=
+javac.processormodulepath=
 javac.source=1.5
 javac.target=1.8
 javac.test.classpath=\
@@ -50,6 +57,8 @@ javac.test.classpath=\
     ${build.classes.dir}:\
     ${libs.junit.classpath}:\
     ${libs.junit_4.classpath}
+javac.test.modulepath=\
+    ${javac.modulepath}
 javadoc.additionalparam=
 javadoc.author=false
 javadoc.encoding=${source.encoding}
@@ -79,9 +88,13 @@ run.classpath=\
 # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
 # or test-sys-prop.name=value to set system properties for unit tests):
 run.jvmargs=
+run.modulepath=\
+    ${javac.modulepath}
 run.test.classpath=\
     ${javac.test.classpath}:\
     ${build.test.classes.dir}
+run.test.modulepath=\
+    ${javac.test.modulepath}
 source.encoding=UTF-8
 src.dir=src
 test.src.dir=test
diff --git a/nbi/engine/src/org/netbeans/installer/Installer.java b/nbi/engine/src/org/netbeans/installer/Installer.java
index 9ec0ad2..8f4f6fa 100644
--- a/nbi/engine/src/org/netbeans/installer/Installer.java
+++ b/nbi/engine/src/org/netbeans/installer/Installer.java
@@ -252,7 +252,7 @@ public class Installer implements FinishHandler {
                 (errorCode != CRITICAL_ERRORCODE)) {
             System.getProperties().put(
                     EXIT_CODE_PROPERTY,
-                    new Integer(errorCode));
+                    Integer.valueOf(errorCode));
         } else {
             System.exit(errorCode);
         }
diff --git a/nbi/engine/src/org/netbeans/installer/utils/system/UnixNativeUtils.java b/nbi/engine/src/org/netbeans/installer/utils/system/UnixNativeUtils.java
index 9a5c960..9f8de55 100644
--- a/nbi/engine/src/org/netbeans/installer/utils/system/UnixNativeUtils.java
+++ b/nbi/engine/src/org/netbeans/installer/utils/system/UnixNativeUtils.java
@@ -1370,7 +1370,7 @@ public class UnixNativeUtils extends NativeUtils {
                 matcher = Pattern.compile("uid=([0-9]+)\\(").matcher(stdout);
             }
             if (matcher.find()) {
-                adm = new Integer(matcher.group(1)).intValue() == 0;
+                adm = Integer.parseInt(matcher.group(1)) == 0;
             }
         } catch (IOException e) {
             LogManager.log(e);
diff --git a/nbi/engine/src/org/netbeans/installer/utils/system/launchers/impl/ExeLauncher.java b/nbi/engine/src/org/netbeans/installer/utils/system/launchers/impl/ExeLauncher.java
index 041dbf8..350fc15 100644
--- a/nbi/engine/src/org/netbeans/installer/utils/system/launchers/impl/ExeLauncher.java
+++ b/nbi/engine/src/org/netbeans/installer/utils/system/launchers/impl/ExeLauncher.java
@@ -325,7 +325,7 @@ public class ExeLauncher extends CommonLauncher {
     private void addData(FileOutputStream fos, String [] strings, boolean isUnicode) throws IOException {
         
         if(strings!=null) {
-            addNumber(fos, new Integer(strings.length).longValue()); // number of array elements
+            addNumber(fos, Integer.valueOf(strings.length).longValue()); // number of array elements
             for(String s: strings) {
                 addData(fos, s, isUnicode);
             }
diff --git a/nbi/engine/src/org/netbeans/installer/wizard/components/actions/InstallAction.java b/nbi/engine/src/org/netbeans/installer/wizard/components/actions/InstallAction.java
index 2862a1f..6f21e5b 100644
--- a/nbi/engine/src/org/netbeans/installer/wizard/components/actions/InstallAction.java
+++ b/nbi/engine/src/org/netbeans/installer/wizard/components/actions/InstallAction.java
@@ -180,7 +180,7 @@ public class InstallAction extends WizardAction {
                 // do not override already set exit code
                 if (System.getProperties().get(Installer.EXIT_CODE_PROPERTY) == null) {
                      System.getProperties().put(Installer.EXIT_CODE_PROPERTY, 
-                             new Integer(INSTALLATION_ERROR_CODE));
+                             Integer.valueOf(INSTALLATION_ERROR_CODE));
                 }
                 // adjust the product's status and save this error - it will
                 // be reused later at the PostInstallSummary
diff --git a/nbi/engine/src/org/netbeans/installer/wizard/components/actions/UninstallAction.java b/nbi/engine/src/org/netbeans/installer/wizard/components/actions/UninstallAction.java
index 9c824a2..ae4f668 100644
--- a/nbi/engine/src/org/netbeans/installer/wizard/components/actions/UninstallAction.java
+++ b/nbi/engine/src/org/netbeans/installer/wizard/components/actions/UninstallAction.java
@@ -109,7 +109,7 @@ public class UninstallAction extends WizardAction {
                 // do not override already set exit code
                 if (System.getProperties().get(Installer.EXIT_CODE_PROPERTY) == null) {
                      System.getProperties().put(Installer.EXIT_CODE_PROPERTY, 
-                             new Integer(UNINSTALLATION_ERROR_CODE));
+                             Integer.valueOf(UNINSTALLATION_ERROR_CODE));
                 }
                 // adjust the component's status and save this error - it will
                 // be reused later at the PostInstallSummary

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

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