src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java
changeset 48721 ef3557eb4306
parent 47216 71c04702a3d5
child 53773 454d54d8af1c
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java	Fri Feb 02 23:21:12 2018 +0530
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/JCDiagnostic.java	Fri Feb 02 07:43:54 2018 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -295,7 +295,7 @@
         /**
          * Create a new error key.
          */
-        Error errorKey(String code, Object... args) {
+        public Error errorKey(String code, Object... args) {
             return (Error)DiagnosticInfo.of(ERROR, prefix, code, args);
         }
 
@@ -309,7 +309,7 @@
         /**
          * Create a new note key.
          */
-        Note noteKey(String code, Object... args) {
+        public Note noteKey(String code, Object... args) {
             return (Note)DiagnosticInfo.of(NOTE, prefix, code, args);
         }
 
@@ -527,6 +527,23 @@
             }
         }
 
+        /**
+         * Returns the code for this diagnostic info, provided mainly for backward compatibility
+         */
+        public String getCode() {
+            return code;
+        }
+
+        /**
+         * Returns the arguments for this diagnostic info, provided mainly for backward compatibility
+         */
+        public Object[] getArgs() {
+            return args;
+        }
+
+        public void setArgs(Object[] args) {
+            this.args = args;
+        }
     }
 
     /**