Skip to content

Commit

Permalink
Bugfix for Faulty char SAXUnmarshaller.getMediaType (eclipse-ee4j#2030)
Browse files Browse the repository at this point in the history
Signed-off-by: Radek Felcman <[email protected]>
  • Loading branch information
rfelcman authored Jan 23, 2024
1 parent 44610ca commit 266b1d9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -1124,9 +1124,9 @@ private MediaType getMediaType(BufferedReader br) {
try {
br.mark(READ_AHEAD_LIMIT);
try {
char c = 0;
int c = 0;
for (int i = 0; c != -1 && i < READ_AHEAD_LIMIT; i++) {
c = (char) br.read();
c = br.read();
if (c == '[' || c == '{') {
return Constants.APPLICATION_JSON;
} else if (c == '<') {
Expand Down

0 comments on commit 266b1d9

Please sign in to comment.