|
What this is
Other links
The source codepackage nbbuild.misc.bugcompare; /* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun * Microsystems, Inc. All Rights Reserved. */ import java.util.*; import java.net.*; import java.io.*; import org.xml.sax.*; /** * * @author ph97928 * @version */ public class Compare_1 { Map release32; Map dev; public Map fillTable(String name) { Map map = new TreeMap(); try { ChangelogRecognizer.parse(new InputSource(name), new ChangelogHandlerImpl(map), new ChangelogParslet()); } catch (Exception exc) { exc.printStackTrace(); } return map; } public List compare(Map source, Map dest) { List result = new ArrayList(); Iterator it = source.keySet().iterator(); while (it.hasNext()) { Integer key = (Integer) it.next(); if (!dest.containsKey(key)) { result.add(key); } } return result; } public void start() { System.out.println("Filling release32"); release32 = fillTable("d:\\petr\\bugs\\release32.xml"); System.out.println("Filling dev"); dev = fillTable("d:\\petr\\bugs\\dev.xml"); System.out.println("Comparing"); List notInDev = compare(release32, dev); output("d:\\petr\\bugs\\bugs.html", notInDev); } public void output(String name, List list) { try { PrintWriter writer = new PrintWriter(new FileWriter(name)); writer.println(""); writer.println(""); writer.println("Found "+list.size()+" differences"); writer.println("
| Product: | ") > 0) { i = 1; } } else if (i == 1) { int index = line.indexOf("
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.