Changeset 13231 in josm for trunk/src/org/glassfish/json/JsonMessages.java
- Timestamp:
- 2017-12-23T02:40:43+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/glassfish/json/JsonMessages.java
r6756 r13231 2 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 3 * 4 * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.4 * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 5 * 6 6 * The contents of this file are subject to the terms of either the GNU … … 9 9 * may not use this file except in compliance with the License. You can 10 10 * obtain a copy of the License at 11 * https:// glassfish.dev.java.net/public/CDDL+GPL_1_1.html12 * or packager/legal/LICENSE.txt. See the License for the specific11 * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 * or LICENSE.txt. See the License for the specific 13 13 * language governing permissions and limitations under the License. 14 14 * 15 15 * When distributing the software, include this License Header Notice in each 16 * file and include the License file at packager/legal/LICENSE.txt.16 * file and include the License file at LICENSE.txt. 17 17 * 18 18 * GPL Classpath Exception: … … 46 46 import java.text.MessageFormat; 47 47 import java.util.ResourceBundle; 48 import javax.json.JsonObject; 49 import javax.json.JsonValue; 48 50 49 51 /** … … 56 58 ResourceBundle.getBundle("org.glassfish.json.messages"); 57 59 60 // global/shared messages 61 static String INTERNAL_ERROR() { 62 return localize("internal.error"); 63 } 64 58 65 // tokenizer messages 59 66 static String TOKENIZER_UNEXPECTED_CHAR(int unexpected, JsonLocation location) { … … 91 98 } 92 99 100 static String PARSER_GETARRAY_ERR(JsonParser.Event event) { 101 return localize("parser.getArray.err", event); 102 } 103 104 static String PARSER_GETOBJECT_ERR(JsonParser.Event event) { 105 return localize("parser.getObject.err", event); 106 } 107 108 static String PARSER_GETVALUE_ERR(JsonParser.Event event) { 109 return localize("parser.getValue.err", event); 110 } 111 112 static String PARSER_GETVALUESTREAM_ERR() { 113 return localize("parser.getValueStream.err"); 114 } 115 93 116 static String PARSER_EXPECTED_EOF(JsonTokenizer.JsonToken token) { 94 117 return localize("parser.expected.eof", token); … … 103 126 } 104 127 128 static String PARSER_STATE_ERR(JsonValue.ValueType type) { 129 return localize("parser.state.err", type); 130 } 131 132 static String PARSER_SCOPE_ERR(JsonValue value) { 133 return localize("parser.scope.err", value); 134 } 135 136 static String PARSER_INPUT_ENC_DETECT_FAILED() { 137 return localize("parser.input.enc.detect.failed"); 138 } 139 140 static String PARSER_INPUT_ENC_DETECT_IOERR() { 141 return localize("parser.input.enc.detect.ioerr"); 142 } 105 143 106 144 // generator messages … … 140 178 } 141 179 142 143 180 // reader messages 144 181 static String READER_READ_ALREADY_CALLED() { … … 146 183 } 147 184 148 static String READER_EXPECTED_ARRAY_GOT_OBJECT() {149 return localize("reader.expected.array.got.object");150 }151 152 static String READER_EXPECTED_OBJECT_GOT_ARRAY() {153 return localize("reader.expected.object.got.array");154 }155 156 185 157 186 // obj builder messages … … 184 213 static String ARRBUILDER_ARRAY_BUILDER_NULL() { 185 214 return localize("arrbuilder.array.builder.null"); 215 } 216 217 static String ARRBUILDER_VALUELIST_NULL(int index, int size) { 218 return localize("arrbuilder.valuelist.null", index, size); 219 } 220 221 // json pointer messages 222 static String POINTER_FORMAT_INVALID() { 223 return localize("pointer.format.invalid"); 224 } 225 226 static String POINTER_MAPPING_MISSING(JsonObject object, String key) { 227 return localize("pointer.mapping.missing", object, key); 228 } 229 230 static String POINTER_REFERENCE_INVALID(JsonValue.ValueType type) { 231 return localize("pointer.reference.invalid", type.name()); 232 } 233 234 static String POINTER_ARRAY_INDEX_ERR(String token) { 235 return localize("pointer.array.index.err", token); 236 } 237 238 static String POINTER_ARRAY_INDEX_ILLEGAL(String token) { 239 return localize("pointer.array.index.illegal", token); 240 } 241 242 // nodereference messages 243 static String NODEREF_VALUE_ADD_ERR() { 244 return localize("noderef.value.add.err"); 245 } 246 247 static String NODEREF_VALUE_CANNOT_REMOVE() { 248 return localize("noderef.value.cannot.remove"); 249 } 250 251 static String NODEREF_OBJECT_MISSING(String key) { 252 return localize("noderef.object.missing", key); 253 } 254 255 static String NODEREF_ARRAY_INDEX_ERR(int index, int size) { 256 return localize("noderef.array.index.err", index, size); 257 } 258 259 // json patch messages 260 static String PATCH_MUST_BE_ARRAY() { 261 return localize("patch.must.be.array"); 262 } 263 264 static String PATCH_MOVE_PROPER_PREFIX(String from, String path) { 265 return localize("patch.move.proper.prefix", from, path); 266 } 267 268 static String PATCH_MOVE_TARGET_NULL(String from) { 269 return localize("patch.move.target.null", from); 270 } 271 272 static String PATCH_TEST_FAILED(String path, String value) { 273 return localize("patch.test.failed", path, value); 274 } 275 276 static String PATCH_ILLEGAL_OPERATION(String operation) { 277 return localize("patch.illegal.operation", operation); 278 } 279 280 static String PATCH_MEMBER_MISSING(String operation, String member) { 281 return localize("patch.member.missing", operation, member); 186 282 } 187 283
Note:
See TracChangeset
for help on using the changeset viewer.