equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, 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 |
771 /** |
771 /** |
772 * Adds a new catalog file. |
772 * Adds a new catalog file. |
773 */ |
773 */ |
774 public void addCatalog(File catalogFile) throws IOException { |
774 public void addCatalog(File catalogFile) throws IOException { |
775 if(entityResolver==null) { |
775 if(entityResolver==null) { |
776 CatalogManager.getStaticManager().setIgnoreMissingProperties(true); |
776 final CatalogManager staticManager = CatalogManager.getStaticManager(); |
|
777 // hack to force initialization so catalog manager system properties take effect |
|
778 staticManager.getVerbosity(); |
|
779 staticManager.setIgnoreMissingProperties(true); |
777 entityResolver = new CatalogResolver(true); |
780 entityResolver = new CatalogResolver(true); |
778 } |
781 } |
779 ((CatalogResolver)entityResolver).getCatalog().parseCatalog(catalogFile.getPath()); |
782 ((CatalogResolver)entityResolver).getCatalog().parseCatalog(catalogFile.getPath()); |
780 } |
783 } |
781 |
784 |