src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java

changeset 1490
fc4cb1577ad6
parent 1359
25e14ad23cef
child 2525
2eb010b6cb22
     1.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java	Thu Jan 10 15:48:46 2013 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java	Thu Jan 10 19:38:57 2013 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -60,9 +60,9 @@
    1.11      private ResourceBundle messageRB;
    1.12  
    1.13      /**
    1.14 -     * Initilize the ResourceBundle with the given resource.
    1.15 +     * Initialize the ResourceBundle with the given resource.
    1.16       *
    1.17 -     * @param rb the esource bundle to read.
    1.18 +     * @param rb the resource bundle to read.
    1.19       */
    1.20      public MessageRetriever(ResourceBundle rb) {
    1.21          this.configuration = null;
    1.22 @@ -71,7 +71,7 @@
    1.23      }
    1.24  
    1.25      /**
    1.26 -     * Initilize the ResourceBundle with the given resource.
    1.27 +     * Initialize the ResourceBundle with the given resource.
    1.28       *
    1.29       * @param configuration the configuration
    1.30       * @param resourcelocation Resource.
    1.31 @@ -189,7 +189,8 @@
    1.32       * @param args arguments to be replaced in the message.
    1.33       */
    1.34      public void warning(SourcePosition pos, String key, Object... args) {
    1.35 -        printWarning(pos, getText(key, args));
    1.36 +        if (configuration.showMessage(pos, key))
    1.37 +            printWarning(pos, getText(key, args));
    1.38      }
    1.39  
    1.40      /**

mercurial