equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2014, 2018, 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 |
788 allLayers.add(layer); |
788 allLayers.add(layer); |
789 |
789 |
790 // push in reverse order |
790 // push in reverse order |
791 for (int i = layer.parents.size() - 1; i >= 0; i--) { |
791 for (int i = layer.parents.size() - 1; i >= 0; i--) { |
792 ModuleLayer parent = layer.parents.get(i); |
792 ModuleLayer parent = layer.parents.get(i); |
793 if (!visited.contains(parent)) { |
793 if (visited.add(parent)) { |
794 visited.add(parent); |
|
795 stack.push(parent); |
794 stack.push(parent); |
796 } |
795 } |
797 } |
796 } |
798 } |
797 } |
799 |
798 |