[netbeans] 01/01: Fixed the build failure with Ant 1.9

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Sat Aug 16 22:43:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository netbeans.

commit 7d2010f2dc6141a50cfa528a468760929ecc7b57
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Sun Aug 17 00:43:00 2014 +0200

    Fixed the build failure with Ant 1.9
---
 debian/changelog                                |   1 +
 debian/patches/netbeans~ant-compatibility.patch | 481 ++++++++++++++++++++++++
 debian/patches/series                           |   1 +
 3 files changed, 483 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2fb9fb4..93cf0e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ netbeans (7.0.1+dfsg1-6) UNRELEASED; urgency=medium
       Adds a classpath command line argument in the launcher.
 
   [ Emmanuel Bourg ]
+  * Fixed the build failure with Ant 1.9 (Closes: #713182)
   * debian/control:
     - Standards-Version updated to 3.9.5 (no changes)
   * Switch to debhelper level 9
diff --git a/debian/patches/netbeans~ant-compatibility.patch b/debian/patches/netbeans~ant-compatibility.patch
new file mode 100644
index 0000000..79ade23
--- /dev/null
+++ b/debian/patches/netbeans~ant-compatibility.patch
@@ -0,0 +1,481 @@
+Description: Fix the source compatibility with Ant 1.9
+Origin: backport, http://hg.netbeans.org/main-silver/rev/2f69633a5158
+Bug: https://netbeans.org/bugzilla/show_bug.cgi?id=227070
+Bug-Debian: https://bugs.debian.org/713182
+--- a/javawebstart/AntTasks/src/org/netbeans/modules/javawebstart/anttasks/CopyTemplatePageTask.java
++++ b/javawebstart/AntTasks/src/org/netbeans/modules/javawebstart/anttasks/CopyTemplatePageTask.java
+@@ -221,11 +221,11 @@
+             final StringBuilder sb = new StringBuilder();
+             final Pattern p = Pattern.compile(Pattern.quote(prefix) + "\\.(\\d+)\\." + Pattern.quote(key)); //NOI18N
+ 
+-            final Hashtable<String,String> props = getProject().getProperties();
+-            for (Map.Entry<String,String> entry : props.entrySet()) {
++            final Hashtable<String,Object> props = getProject().getProperties();
++            for (Map.Entry<String,Object> entry : props.entrySet()) {
+                 Matcher m = p.matcher(entry.getKey());
+                 if (m.matches()) {
+-                    final String kv = entry.getValue();
++                    final String kv = (String) entry.getValue();
+                     final String valueKey = prefix + '.'+ m.group(1) +'.' + value;  //NOI18N
+                     final String vv = getProperty(valueKey, ""); //NOI18N
+                     addProperty(sb,kv,vv);
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/CheckModuleConfigs.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/CheckModuleConfigs.java
+@@ -93,8 +93,7 @@
+             throw new BuildException("Must define 'nbroot' param", getLocation());
+         }
+         File clusterPropertiesFile = new File(nbroot, "nbbuild" + File.separatorChar + "cluster.properties");
+-        @SuppressWarnings("unchecked")
+-        Map<String,String> properties = getProject().getProperties();
++        Map<String,Object> properties = getProject().getProperties();
+         Map<String,Set<String>> clusters = loadModuleClusters(properties, clusterPropertiesFile);
+         Set<String> allClusterModules = new TreeSet<String>();
+         for (Set<String> s : clusters.values()) {
+@@ -119,12 +118,12 @@
+         // Verify sorting and overlaps:
+         Pattern clusterNamePat = Pattern.compile("nb\\.cluster\\.([^.]+)");
+         Map<String,List<String>> allClusters = new HashMap<String,List<String>>();
+-        for (Map.Entry<String,String> clusterDef : properties.entrySet()) {
++        for (Map.Entry<String,Object> clusterDef : properties.entrySet()) {
+             Matcher m = clusterNamePat.matcher(clusterDef.getKey());
+             if (!m.matches()) {
+                 continue;
+             }
+-            allClusters.put(m.group(1), splitToList(clusterDef.getValue(), clusterDef.getKey()));
++            allClusters.put(m.group(1), splitToList((String) clusterDef.getValue(), clusterDef.getKey()));
+         }
+         allClusters.get("experimental").removeAll(allClusters.get("stableuc")); // intentionally a superset
+         for (Map.Entry<String,List<String>> entry : allClusters.entrySet()) {
+@@ -176,15 +175,15 @@
+         return set;
+     }
+     
+-    private Map<String,Set<String>> loadModuleClusters(Map<String,String> clusterProperties, File clusterPropertiesFile) {
++    private Map<String,Set<String>> loadModuleClusters(Map<String,Object> clusterProperties, File clusterPropertiesFile) {
+         String fullConfig = "clusters.config.full.list";
+-        String l = clusterProperties.get(fullConfig);
++        String l = (String) clusterProperties.get(fullConfig);
+         if (l == null) {
+             throw new BuildException(clusterPropertiesFile + ": no definition for clusters.config.full.list");
+         }
+         Map<String,Set<String>> clusters = new TreeMap<String,Set<String>>();
+         for (String cluster : splitToSet(l, fullConfig)) {
+-            l = clusterProperties.get(cluster);
++            l = (String) clusterProperties.get(cluster);
+             if (l == null) {
+                 throw new BuildException(clusterPropertiesFile + ": no definition for " + cluster);
+             }
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/ExportedAPICondition.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/ExportedAPICondition.java
+@@ -60,13 +60,12 @@
+ public class ExportedAPICondition extends ProjectComponent implements Condition {
+ 
+     public boolean eval() throws BuildException {
+-        @SuppressWarnings("unchecked")
+-        Hashtable<String,String> props = getProject().getProperties();
++        Hashtable<String,Object> props = getProject().getProperties();
+         if (props.get("public.packages").equals("-")) {
+             log("No exported packages", Project.MSG_VERBOSE);
+             return false;
+         }
+-        String friends = props.get("friends");
++        String friends = (String) props.get("friends");
+         if (friends == null) {
+             log("Public API", Project.MSG_VERBOSE);
+             return true;
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/FixTestDependencies.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/FixTestDependencies.java
+@@ -248,7 +248,6 @@
+     private Set<ModuleListParser.Entry> getModuleList(final ModuleType projectType) throws IOException {
+         if (cachedEntries == null ) {
+           // scan for all modules
+-            @SuppressWarnings("unchecked")
+             ModuleListParser listParser = new ModuleListParser(getProject().getProperties(), projectType, getProject());
+             return  listParser.findAll();
+         } else {
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/InsertModuleAllTargets.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/InsertModuleAllTargets.java
+@@ -96,20 +96,19 @@
+                 log("Already seem to have inserted targets into this project; will not do it twice", Project.MSG_VERBOSE);
+                 return;
+             }
+-            @SuppressWarnings("unchecked")
+-            Hashtable<String,String> props = prj.getProperties();
++            Hashtable<String,Object> props = prj.getProperties();
+ 
+             if (checkModules) {
+                 boolean missingModules = false;
+-                String[] clusters = props.get("nb.clusters.list").split(", *");
+-                String nb_all = props.get("nb_all");
++                String[] clusters = ((String) props.get("nb.clusters.list")).split(", *");
++                String nb_all = (String) props.get("nb_all");
+                 if (nb_all == null)
+                     throw new BuildException("Can't file 'nb_all' property, probably not in the NetBeans build system");
+                 File nbRoot = new File(nb_all);
+                 for( String cluster: clusters) {
+                     if (props.get(cluster) == null) 
+                         throw new BuildException("Cluster '"+cluster+"' has got empty list of modules. Check configuration of that cluster.",getLocation());
+-                    String[] clusterModules = props.get(cluster).split(", *");
++                    String[] clusterModules = ((String) props.get(cluster)).split(", *");
+                     for( String module: clusterModules) {
+                         File moduleBuild = new File(nbRoot, module + File.separator + "build.xml");
+                         if (!moduleBuild.exists() || !moduleBuild.isFile()) {
+@@ -119,18 +118,18 @@
+                     }
+                 }
+                 if (missingModules) {
+-                    String clusterConfig = props.get("cluster.config");
++                    String clusterConfig = (String) props.get("cluster.config");
+                     throw new BuildException("Some modules according your cluster config '" + clusterConfig + "' are missing from checkout, see messages above.",getLocation());
+                 }
+             }
+             
+             Map<String,String> clustersOfModules = new HashMap<String,String>();
+-            for (Map.Entry<String,String> pair : props.entrySet()) {
++            for (Map.Entry<String,Object> pair : props.entrySet()) {
+                 String cluster = pair.getKey();
+                 if (!cluster.startsWith("nb.cluster.") || cluster.endsWith(".depends") || cluster.endsWith(".dir")) {
+                     continue;
+                 }
+-                for (String module : pair.getValue().split(", *")) {
++                for (String module : ((String) pair.getValue()).split(", *")) {
+                     clustersOfModules.put(module, cluster);
+                 }
+             }
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/LayerIndex.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/LayerIndex.java
+@@ -79,6 +79,7 @@
+ import org.apache.tools.ant.Project;
+ import org.apache.tools.ant.Task;
+ import org.apache.tools.ant.types.FileSet;
++import org.apache.tools.ant.types.Resource;
+ import org.apache.tools.ant.types.ResourceCollection;
+ import org.apache.tools.ant.types.resources.ZipResource;
+ import org.xml.sax.Attributes;
+@@ -111,7 +112,7 @@
+     }
+ 
+     private String resourceId;
+-    private List<ZipResource> resources;
++    private List<Resource> resources;
+     /** If this parameter is provided, then this tasks creates a resource
+      * composed from all the layerfiles and makes it accessible under this refId
+      * @param id the refId to associate the collection with
+@@ -361,7 +362,7 @@
+         }
+     }
+ 
+-    private static final class ZipArray extends ArrayList<ZipResource>
++    private static final class ZipArray extends ArrayList<Resource>
+     implements ResourceCollection {
+         public boolean isFilesystemOnly() {
+             return false;
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/ModuleListParser.java
+@@ -116,27 +116,27 @@
+     /**
+      * Find all NBM projects in a root, possibly from cache.
+      */
+-    private static Map<String,Entry> scanNetBeansOrgSources(File root, Map<String,String> properties, Project project) throws IOException {
++    private static Map<String,Entry> scanNetBeansOrgSources(File root, Map<String,Object> properties, Project project) throws IOException {
+         Map<String,Entry> entries = SOURCE_SCAN_CACHE.get(root);
+         if (entries == null) {
+             // Similar to #62221: if just invoked from a module in standard clusters, only scan those clusters (faster):
+             Set<String> standardModules = new HashSet<String>();
+             boolean doFastScan = false;
+-            String basedir = properties.get("basedir");
++            String basedir = (String) properties.get("basedir");
+             if (basedir != null) {
+                 File basedirF = new File(basedir);
+-                String clusterList = properties.get("nb.clusters.list");
++                String clusterList = (String) properties.get("nb.clusters.list");
+                 if (clusterList == null) {
+-                    String config = properties.get("cluster.config");
++                    String config = (String) properties.get("cluster.config");
+                     if (config != null) {
+-                        clusterList = properties.get("clusters.config." + config + ".list");
++                        clusterList = (String) properties.get("clusters.config." + config + ".list");
+                     }
+                 }
+                 if (clusterList != null) {
+                     StringTokenizer tok = new StringTokenizer(clusterList, ", ");
+                     while (tok.hasMoreTokens()) {
+                         String clusterName = tok.nextToken();
+-                        String moduleList = properties.get(clusterName);
++                        String moduleList = (String) properties.get(clusterName);
+                         if (moduleList != null) {
+                             // Hack to treat libs.junit4 as if it were in platform for purposes of building, yet build to another cluster.
+                             if (clusterName.equals("nb.cluster.platform")) {
+@@ -278,7 +278,7 @@
+     /**
+      * Check a single dir to see if it is an NBM project, and if so, register it.
+      */
+-    private static boolean scanPossibleProject(File dir, Map<String,Entry> entries, Map<String,String> properties,
++    private static boolean scanPossibleProject(File dir, Map<String,Entry> entries, Map<String,Object> properties,
+             String path, ModuleType moduleType, Project project, Map<File,Long[]> timestampsAndSizes) throws IOException {
+         File nbproject = new File(dir, "nbproject");
+         File projectxml = new File(nbproject, "project.xml");
+@@ -374,17 +374,17 @@
+             assert path != null;
+             // Find the associated cluster.
+             // first try direct mapping in nbbuild/netbeans/moduleCluster.properties
+-            String clusterDir = properties.get(path + ".dir");
++            String clusterDir = (String) properties.get(path + ".dir");
+             if (clusterDir != null) {
+                 clusterDir = clusterDir.substring(clusterDir.lastIndexOf('/') + 1);
+             } else {
+                 // not found, try indirect nbbuild/cluster.properties
+-                for (Map.Entry<String, String> entry : properties.entrySet()) {
+-                    String val = entry.getValue();
++                for (Map.Entry<String,Object> entry : properties.entrySet()) {
++                    String val = (String) entry.getValue();
+                     String[] modules = val.split(", *");
+                     if (Arrays.asList(modules).contains(path)) {
+                         String key = entry.getKey();
+-                        clusterDir = properties.get(key + ".dir");
++                        clusterDir = (String) properties.get(key + ".dir");
+                         if (clusterDir != null) {
+                             faketask.setName("cluster.dir");
+                             faketask.setValue(clusterDir);
+@@ -440,7 +440,7 @@
+             File origBin = null;
+             if (binaryOrigin != null) {
+                 String reltext = XMLUtil.findText(binaryOrigin);
+-                String nball = properties.get("nb_all");
++                String nball = (String) properties.get("nb_all");
+                 if (nball != null) {
+                     faketask.setName("nb_all");
+                     faketask.setValue(nball);
+@@ -630,9 +630,9 @@
+             }
+     }
+     
+-    private static Map<String,Entry> scanSuiteSources(Map<String,String> properties, Project project) throws IOException {
+-        File basedir = new File(properties.get("basedir"));
+-        String suiteDir = properties.get("suite.dir");
++    private static Map<String,Entry> scanSuiteSources(Map<String,Object> properties, Project project) throws IOException {
++        File basedir = new File((String) properties.get("basedir"));
++        String suiteDir = (String) properties.get("suite.dir");
+         if (suiteDir == null) {
+             throw new IOException("No definition of suite.dir in " + basedir);
+         }
+@@ -655,7 +655,7 @@
+         return entries;
+     }
+     
+-    private static void doScanSuite(Map<String,Entry> entries, File suite, Map<String,String> properties, Project project) throws IOException {
++    private static void doScanSuite(Map<String,Entry> entries, File suite, Map<String,Object> properties, Project project) throws IOException {
+         Project fakeproj = new Project();
+         fakeproj.setBaseDir(suite); // in case ${basedir} is used somewhere
+         Property faketask = new Property();
+@@ -680,9 +680,9 @@
+         }
+     }
+     
+-    private static Entry scanStandaloneSource(Map<String,String> properties, Project project) throws IOException {
++    private static Entry scanStandaloneSource(Map<String,Object> properties, Project project) throws IOException {
+         if (properties.get("project") == null) return null; //Not a standalone module
+-        File basedir = new File(properties.get("project"));
++        File basedir = new File((String) properties.get("project"));
+         Entry entry = STANDALONE_SCAN_CACHE.get(basedir);
+         if (entry == null) {
+             Map<String,Entry> entries = new HashMap<String,Entry>();
+@@ -717,16 +717,16 @@
+      * @param type the type of project
+      * @param project a project ref, only for logging (may be null with no loss of semantics)
+      */
+-    public ModuleListParser(Map<String,String> properties, ModuleType type, Project project) throws IOException {
+-        String nball = properties.get("nb_all");
+-        File basedir = new File(properties.get("basedir"));
++    public ModuleListParser(Map<String,Object> properties, ModuleType type, Project project) throws IOException {
++        String nball = (String) properties.get("nb_all");
++        File basedir = new File((String) properties.get("basedir"));
+         final FileUtils fu = FileUtils.getFileUtils();
+ 
+         if (type != ModuleType.NB_ORG) {
+             // add extra clusters
+-            String suiteDirS = properties.get("suite.dir");
++            String suiteDirS = (String) properties.get("suite.dir");
+             boolean hasSuiteDir = suiteDirS != null && suiteDirS.length() > 0;
+-            String clusterPath = properties.get("cluster.path.final");
++            String clusterPath = (String) properties.get("cluster.path.final");
+             File[] clusters = null;
+ 
+             if (clusterPath != null) {
+@@ -768,7 +768,7 @@
+             }
+         } else {
+             // netbeans.org module.
+-            String buildS = properties.get("netbeans.dest.dir");
++            String buildS = (String) properties.get("netbeans.dest.dir");
+             if (buildS == null) {
+                 throw new IOException("No definition of netbeans.dest.dir in " + basedir);
+             }
+@@ -776,7 +776,7 @@
+             // Neither operation is likely to be needed, but just in case.
+             File build = fu.normalize(fu.resolveFile(basedir, buildS).getAbsolutePath());
+             if (nball == null) {
+-                throw new IOException("You must declare either <suite-component/> or <standalone/> for an external module in " + new File(properties.get("basedir")));
++                throw new IOException("You must declare either <suite-component/> or <standalone/> for an external module in " + new File((String) properties.get("basedir")));
+             }
+             if (!build.equals(new File(new File(nball, "nbbuild"), "netbeans"))) {
+                 // Potentially orphaned module to be built against specific binaries, plus perhaps other source deps.
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/ModuleTestDependencies.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/ModuleTestDependencies.java
+@@ -90,12 +90,11 @@
+      */
+     public @Override void execute() throws BuildException {
+         try {
+-            @SuppressWarnings("unchecked")
+-            Hashtable<String,String> props = getProject().getProperties();
++            Hashtable<String,Object> props = getProject().getProperties();
+             ModuleListParser mlp = new ModuleListParser(props, ModuleType.NB_ORG, getProject());
+             SortedMap<String,SortedSet<String>> deps = new TreeMap<String,SortedSet<String>>();
+             SortedMap<String,SortedSet<String>> reverseDeps = reverseOutput != null ? new TreeMap<String,SortedSet<String>>() : null;
+-            File nball = new File(props.get("nb_all"));
++            File nball = new File((String) props.get("nb_all"));
+             for (ModuleListParser.Entry entry : mlp.findAll()) {
+                 String myCnb = entry.getCnb();
+                 String myCluster = entry.getClusterName();
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/NbMerge.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/NbMerge.java
+@@ -79,7 +79,7 @@
+     private boolean mergedependentmodules = false; // merge also dependent modules
+     private String dummyName;
+     private Target dummy;
+-    private Hashtable targets;
++    private Hashtable<String,Target> targets;
+     private String builtmodulesproperty = ""; // if set, update property of the name
+                                          // to list of successfuly built modules
+     
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/ParseProjectXml.java
+@@ -446,8 +446,7 @@
+                     moduleClassPathProperty != null || 
+                     moduleRunClassPathProperty != null ||
+                     testTypes.size() > 0) {
+-                @SuppressWarnings("unchecked")
+-                Hashtable<String,String> properties = getProject().getProperties();
++                Hashtable<String,Object> properties = getProject().getProperties();
+                 properties.put("project", moduleProject.getAbsolutePath());
+                 modules = new ModuleListParser(properties, getModuleType(pDoc), getProject());
+                 ModuleListParser.Entry myself = modules.findByCodeNameBase(cnb);
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/PathFileSet.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/PathFileSet.java
+@@ -51,6 +51,7 @@
+ import org.apache.tools.ant.Project;
+ import org.apache.tools.ant.types.DataType;
+ import org.apache.tools.ant.types.Path;
++import org.apache.tools.ant.types.Resource;
+ import org.apache.tools.ant.types.ResourceCollection;
+ import org.apache.tools.ant.types.resources.FileResource;
+ import org.apache.tools.ant.types.selectors.AbstractSelectorContainer;
+@@ -83,7 +84,7 @@
+     private Path clusterPath;
+     private String include;
+     private AbstractSelectorContainer selectors = new AbstractSelectorContainer() {};
+-    private ArrayList<FileResource> files;
++    private ArrayList<Resource> files;
+ 
+     /**
+      * Optional include pattern for filtering files. The same as fileset's nested >include< tag.
+@@ -125,7 +126,7 @@
+ 
+     // SelectorContainer impl.
+ 
+-    public Enumeration selectorElements() {
++    public Enumeration<FileSelector> selectorElements() {
+         return selectors.selectorElements();
+     }
+ 
+@@ -223,7 +224,7 @@
+ 
+     // ResourceCollection impl.
+ 
+-    public Iterator iterator() {
++    public Iterator<Resource> iterator() {
+         initFiles();
+         return files.iterator();
+     }
+@@ -240,7 +241,7 @@
+     private void initFiles() throws BuildException {
+         if (files != null) return;
+         try {
+-            files = new ArrayList<FileResource>();
++            files = new ArrayList<Resource>();
+             log("ClusterPathSet: scanning " + paths.size() + " paths.", Project.MSG_VERBOSE);
+             DirectoryScanner scanner = new DirectoryScanner();
+             if (paths.size() == 0) {
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/RefreshDependencyVersions.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/RefreshDependencyVersions.java
+@@ -121,7 +121,7 @@
+ 
+         validateInjectedDependencies(injectDeps);
+ 
+-        @SuppressWarnings("unchecked") Map<String,String> properties = getProject().getProperties();
++        Map<String,Object> properties = getProject().getProperties();
+         ModuleListParser listParser;
+         try {
+             listParser = new ModuleListParser(properties, ModuleType.NB_ORG, getProject());
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/ShorterPaths.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/ShorterPaths.java
+@@ -182,8 +182,7 @@
+                 PrintWriter pw = new PrintWriter(testProperties);
+ 
+                 // copy extra unit.test.properties
+-                @SuppressWarnings("unchecked")
+-                Map<String, String> properties = getProject().getProperties();
++                Map<String,Object> properties = getProject().getProperties();
+                 StringBuffer outProp = new StringBuffer();
+                 for (String name : properties.keySet()) {
+                     if (name.matches("test-(unit|qa-functional)-sys-prop\\..+")) {
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/Sigtest.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/Sigtest.java
+@@ -296,7 +296,7 @@
+         setM(task, "setPackages", String.class, packages);
+         setM(task, "setVersion", String.class, version);
+         
+-        Class<?> actionType = url.loadClass("org.netbeans.apitest.Sigtest$ActionType");
++        Class<? extends EnumeratedAttribute> actionType = url.loadClass("org.netbeans.apitest.Sigtest$ActionType").asSubclass(EnumeratedAttribute.class);
+         setM(task, "setAction", EnumeratedAttribute.getInstance(actionType, action.getValue()));
+ 
+         Path path = getM(task, "createClasspath", Path.class);
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ReleaseFilesCopy.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ReleaseFilesCopy.java
+@@ -72,8 +72,8 @@
+     }
+ 
+     public @Override void execute() throws BuildException {
+-        for (Map.Entry<?,?> entry : ((Map<?,?>) getProject().getProperties()).entrySet()) {
+-            String k = (String) entry.getKey();
++        for (Map.Entry<String,Object> entry : ((Map<String,Object>) getProject().getProperties()).entrySet()) {
++            String k = entry.getKey();
+             if (k.startsWith("release.") && !k.matches("release\\.(files|files\\.extra|dir)")) {
+                 File to = FileUtils.getFileUtils().resolveFile(cluster, (String) entry.getValue());
+                 String fromString = k.substring(8);
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ReleaseFilesExtra.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ReleaseFilesExtra.java
+@@ -64,8 +64,8 @@
+ 
+     public @Override void execute() throws BuildException {
+         StringBuilder b = new StringBuilder();
+-        for (Map.Entry<?,?> entry : ((Map<?,?>) getProject().getProperties()).entrySet()) {
+-            String k = (String) entry.getKey();
++        for (Map.Entry<String,Object> entry : ((Map<String,Object>) getProject().getProperties()).entrySet()) {
++            String k = entry.getKey();
+             if (k.startsWith("release.")) {
+                 File f = getProject().resolveFile(k.substring(8).replaceFirst("!/.+$", ""));
+                 if (!f.isFile()) {
+--- a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ReleaseFilesLicense.java
++++ b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ReleaseFilesLicense.java
+@@ -122,8 +122,8 @@
+                     }
+                 }
+                 Map<File,Set<String>> inferredLicenses = new TreeMap<File,Set<String>>();
+-                RELEASE_FILE: for (Map.Entry<?,?> entry : ((Map<?,?>) getProject().getProperties()).entrySet()) {
+-                    String k = (String) entry.getKey();
++                RELEASE_FILE: for (Map.Entry<String,Object> entry : ((Map<String,Object>) getProject().getProperties()).entrySet()) {
++                    String k = entry.getKey();
+                     // XXX this does not work for release.../external/*; need to maybe match ^release\.(.+/)?external/
+                     if (k.startsWith("release.external/")) {
+                         String binary = k.substring("release.external/".length()).replaceFirst("!/.+$", "");
diff --git a/debian/patches/series b/debian/patches/series
index 094dc35..83248a7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -26,3 +26,4 @@ netbeans~db.patch
 netbeans-platform~osgi-4.3.patch
 netbeans~include-junit.patch
 netbeans~xerces.patch
+netbeans~ant-compatibility.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/netbeans.git



More information about the pkg-java-commits mailing list