| 1 | package com.github.dakusui.json; | |
| 2 | ||
| 3 | import java.io.Serial; | |
| 4 | import java.util.Arrays; | |
| 5 | ||
| 6 | import com.google.gson.JsonElement; | |
| 7 | ||
| 8 | public class JsonIndexOutOfBoundsException extends JsonInvalidPathException { | |
| 9 | ||
| 10 | /** | |
| 11 | * A serial version UID string. | |
| 12 | */ | |
| 13 | @Serial | |
| 14 | private static final long serialVersionUID = -1088233926881743647L; | |
| 15 | ||
| 16 | ||
| 17 | public JsonIndexOutOfBoundsException(JsonElement base, Object[] path, int index) { | |
| 18 | super(base, path, index); | |
| 19 | } | |
| 20 | ||
| 21 | @Override | |
| 22 | protected String formatMessage(JsonElement base, Object[] path) { | |
| 23 |
1
1. formatMessage : replaced return value with "" for com/github/dakusui/json/JsonIndexOutOfBoundsException::formatMessage → SURVIVED |
return String.format("This element doesn't have path (array out of bounds): %s", Arrays.toString(path)); |
| 24 | } | |
| 25 | } | |
Mutations | ||
| 23 |
1.1 |