Revert "Bug 367982 - Test failures in nightly build"

This reverts commit 67b2ea6074c2a2bc6701e678c843b3adf688fc24.
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java
index f366ce4..37dfea9 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009 IBM Corporation and others. All rights reserved.
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
@@ -92,7 +92,7 @@
 	}
 
 	public static void printRequires(StringBuffer buffer, String prefix, int i, String namespace, String name, VersionRange range, String filter, boolean greedy) {
-		printRequires(buffer, prefix, i, namespace, name, Utils.toString(range), filter, greedy);
+		printRequires(buffer, prefix, i, namespace, name, range.toString(), filter, greedy);
 	}
 
 	public static void printRequires(StringBuffer buffer, String prefix, int i, String namespace, String name, String range, String filter, boolean greedy) {
@@ -118,7 +118,7 @@
 			prefix = ""; //$NON-NLS-1$
 		buffer.append(prefix + "hostRequirements." + i + ".namespace=" + namespace + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		buffer.append(prefix + "hostRequirements." + i + ".name=" + name + '\n'); //$NON-NLS-1$ //$NON-NLS-2$
-		buffer.append(prefix + "hostRequirements." + i + ".range=" + Utils.toString(range) + '\n'); //$NON-NLS-1$ //$NON-NLS-2$
+		buffer.append(prefix + "hostRequirements." + i + ".range=" + range.toString() + '\n'); //$NON-NLS-1$ //$NON-NLS-2$
 		buffer.append(prefix + "hostRequirements." + i + ".greedy=" + Boolean.toString(greedy) + '\n'); //$NON-NLS-1$ //$NON-NLS-2$ 
 	}
 
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
index aed86da..fc89d73 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2012 IBM Corporation and others.
+ * Copyright (c) 2006, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -199,7 +199,7 @@
 			productVersionString = productVersion.getMajor() + "." + productVersion.getMinor() + "." + productVersion.getMicro() + ".$qualifier$"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 			productRangeString = "[" + productVersionString + "," + productVersionString + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		} else {
-			productRangeString = Utils.toString(new VersionRange(new Version(productVersionString), true, new Version(productVersionString), true));
+			productRangeString = new VersionRange(new Version(productVersionString), true, new Version(productVersionString), true).toString();
 		}
 
 		if (cus) {
@@ -256,7 +256,7 @@
 			//in case of no version on the product, the branding defaults to the version of the launcher provider
 			if (executableFeature != null && productVersionString.equals(Version.emptyVersion.toString())) {
 				String brandedVersion = executableFeature.getVersion();
-				brandedRange = Utils.toString(new VersionRange(new Version(brandedVersion), true, new Version(brandedVersion), true));
+				brandedRange = new VersionRange(new Version(brandedVersion), true, new Version(brandedVersion), true).toString();
 			}
 
 			List configs = getConfigInfos();
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
index e3bf801..ed1bf91 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1050,67 +1050,4 @@
 		}
 		return result.toString();
 	}
-
-	static public String toString(VersionRange range) {
-		// never qualify for now since p2 does not support fully qualified versions with empty qualifiers
-		return toString(range, false);
-	}
-
-	private static String toString(VersionRange range, boolean qualify) {
-		// Do not use the VersionRange.toString method because it will fully qualify the versions
-		Version left = range.getLeft();
-		Version right = range.getRight();
-		String leftVersion = left.toString();
-		if (right == null) {
-			return toString(left, range.getLeftType(), qualify);
-		}
-		String rightVerion = right.toString();
-		StringBuffer result = new StringBuffer(leftVersion.length() + rightVerion.length() + 5);
-		result.append(range.getLeftType());
-		result.append(toString(left, range.getLeftType(), qualify));
-		result.append(',');
-		result.append(toString(right, range.getRightType(), qualify));
-		result.append(range.getRightType());
-		return result.toString();
-	}
-
-	private static String toString(Version version, char endPointType, boolean qualify) {
-		// need to avoid fully qualifying the versions if not needed.
-		if (version == null)
-			return ""; //$NON-NLS-1$
-		int q = version.getQualifier().length();
-		if (q > 0) {
-			return version.toString();
-		}
-		StringBuffer buffer = new StringBuffer(version.toString().length() + 1);
-		buffer.append(version.getMajor());
-		buffer.append('.');
-		buffer.append(version.getMinor());
-		buffer.append('.');
-		buffer.append(version.getMicro());
-		if (!qualify) // we never want to qualify in this case
-			return buffer.toString();
-		char separator = version.isReleaseVersion() ? '.' : '-';
-		switch (endPointType) {
-			case VersionRange.LEFT_CLOSED :
-				if (separator == '.') // left release version [x.y.z. must fully qualify
-					buffer.append(separator);
-				break;
-			case VersionRange.LEFT_OPEN :
-				if (separator == '-') // left pre-release version [x.y.z- must fully qualify
-					buffer.append(separator);
-				break;
-			case VersionRange.RIGHT_CLOSED :
-				if (separator == '-') // right release version x.y.z.) must fully qualify
-					buffer.append(separator);
-				break;
-			case VersionRange.RIGHT_OPEN :
-				if (separator == '.') // right pre-release version x.y.z-] must fully qualify
-					buffer.append(separator);
-				break;
-			default :
-				break;
-		}
-		return buffer.toString();
-	}
 }
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
index c5f6d20..7c0ffdc 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -280,7 +280,7 @@
 		VersionRange versionSpec = constraint.getVersionRange();
 		if (versionSpec == null)
 			return constraint.getName();
-		return constraint.getName() + '_' + Utils.toString(versionSpec);
+		return constraint.getName() + '_' + versionSpec;
 	}
 
 	public BuildTimeFeature findFeature(String featureId, String versionId, boolean throwsException) throws CoreException {