--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/BuildState.java Wed Jul 05 19:56:33 2017 +0200
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/BuildState.java Mon Aug 18 10:59:44 2014 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,15 +31,17 @@
import java.util.Map;
import java.util.Set;
+import com.sun.tools.javac.util.Assert;
+
/**
* The build state class captures the source code and generated artifacts
* from a build. There are usually two build states, the previous one (prev),
* loaded from the javac_state file, and the current one (now).
*
- * <p><b>This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own
- * risk. This code and its internal interfaces are subject to change
- * or deletion without notice.</b></p>
+ * <p><b>This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.</b>
*/
public class BuildState {
private Map<String,Module> modules = new HashMap<>();
@@ -75,7 +77,7 @@
*/
Module findModuleFromPackageName(String pkg) {
int cp = pkg.indexOf(':');
- assert(cp != -1);
+ Assert.check(cp != -1);
String mod = pkg.substring(0, cp);
return lookupModule(mod);
}
@@ -94,7 +96,7 @@
for (Map.Entry<String,Package> j : i.packages().entrySet()) {
Package p = packages.get(j.getKey());
// Check that no two different packages are stored under same name.
- assert(p == null || p == j.getValue());
+ Assert.check(p == null || p == j.getValue());
if (p == null) {
p = j.getValue();
packages.put(j.getKey(),j.getValue());
@@ -102,7 +104,7 @@
for (Map.Entry<String,Source> k : p.sources().entrySet()) {
Source s = sources.get(k.getKey());
// Check that no two different sources are stored under same name.
- assert(s == null || s == k.getValue());
+ Assert.check(s == null || s == k.getValue());
if (s == null) {
s = k.getValue();
sources.put(k.getKey(), k.getValue());
@@ -111,7 +113,7 @@
for (Map.Entry<String,File> g : p.artifacts().entrySet()) {
File f = artifacts.get(g.getKey());
// Check that no two artifacts are stored under the same file.
- assert(f == null || f == g.getValue());
+ Assert.check(f == null || f == g.getValue());
if (f == null) {
f = g.getValue();
artifacts.put(g.getKey(), g.getValue());
@@ -134,13 +136,13 @@
for (Map.Entry<String,Package> j : i.packages().entrySet()) {
Package p = packages.get(j.getKey());
// Check that no two different packages are stored under same name.
- assert(p == null || p == j.getValue());
+ Assert.check(p == null || p == j.getValue());
p = j.getValue();
packages.put(j.getKey(),j.getValue());
for (Map.Entry<String,File> g : p.artifacts().entrySet()) {
File f = artifacts.get(g.getKey());
// Check that no two artifacts are stored under the same file.
- assert(f == null || f == g.getValue());
+ Assert.check(f == null || f == g.getValue());
artifacts.put(g.getKey(), g.getValue());
}
}