Skip to content

Commit 2bba5dd

Browse files
committed
Remove redundant casts
1 parent d1d4382 commit 2bba5dd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/main/java/com/fasterxml/jackson/core/JsonFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public static int collectDefaults() {
249249
* and this reuse only works within context of a single
250250
* factory instance.
251251
*/
252-
public JsonFactory() { this((ObjectCodec) null); }
252+
public JsonFactory() { this(null); }
253253

254254
public JsonFactory(ObjectCodec oc) { _objectCodec = oc; }
255255

src/main/java/com/fasterxml/jackson/core/JsonGenerationException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ public JsonGenerationException(String msg)
2727

2828
public JsonGenerationException(String msg, Throwable rootCause)
2929
{
30-
super(msg, (JsonLocation)null, rootCause);
30+
super(msg, null, rootCause);
3131
}
3232
}

src/main/java/com/fasterxml/jackson/core/json/UTF8StreamJsonParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,7 +2792,7 @@ protected char _decodeEscaped() throws IOException
27922792
}
27932793
int c = (int) _inputBuffer[_inputPtr++];
27942794

2795-
switch ((int) c) {
2795+
switch (c) {
27962796
// First, ones that are mapped
27972797
case 'b':
27982798
return '\b';
@@ -2838,7 +2838,7 @@ protected char _decodeEscaped() throws IOException
28382838

28392839
protected int _decodeCharForError(int firstByte) throws IOException
28402840
{
2841-
int c = (int) firstByte;
2841+
int c = firstByte;
28422842
if (c < 0) { // if >= 0, is ascii and fine as is
28432843
int needed;
28442844

src/main/java/com/fasterxml/jackson/core/util/TextBuffer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ private char[] resultArray()
700700
final char[] result = carr(size);
701701
if (_segments != null) {
702702
for (int i = 0, len = _segments.size(); i < len; ++i) {
703-
char[] curr = (char[]) _segments.get(i);
703+
char[] curr = _segments.get(i);
704704
int currLen = curr.length;
705705
System.arraycopy(curr, 0, result, offset, currLen);
706706
offset += currLen;

0 commit comments

Comments
 (0)