langtools/src/share/classes/com/sun/tools/javac/util/Context.java
changeset 8032 e1aa25ccdabb
parent 5847 1908176fd6e3
child 8614 06e42328ddab
equal deleted inserted replaced
8031:d5fe2c1cecfc 8032:e1aa25ccdabb
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   143         if (o instanceof Factory<?>) {
   143         if (o instanceof Factory<?>) {
   144             Factory<?> fac = (Factory<?>)o;
   144             Factory<?> fac = (Factory<?>)o;
   145             o = fac.make();
   145             o = fac.make();
   146             if (o instanceof Factory<?>)
   146             if (o instanceof Factory<?>)
   147                 throw new AssertionError("T extends Context.Factory");
   147                 throw new AssertionError("T extends Context.Factory");
   148             assert ht.get(key) == o;
   148             Assert.check(ht.get(key) == o);
   149         }
   149         }
   150 
   150 
   151         /* The following cast can't fail unless there was
   151         /* The following cast can't fail unless there was
   152          * cheating elsewhere, because of the invariant on ht.
   152          * cheating elsewhere, because of the invariant on ht.
   153          * Since we found a key of type Key<T>, the value must
   153          * Since we found a key of type Key<T>, the value must