Skip to content

Commit

Permalink
Warn only when ASM is not capable of handling java classes instead of…
Browse files Browse the repository at this point in the history
… throwing

Signed-off-by: jansupol <[email protected]>
  • Loading branch information
jansupol authored and senivam committed Feb 16, 2023
1 parent a542fa9 commit ad1e0cd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2023 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 @@ -319,7 +319,7 @@ private ClassReaderWrapper(InputStream inputStream) throws IOException {

private void accept(final ClassVisitor classVisitor, final int parsingOptions) {
final int originalVersion = getMajorVersion(b);
if (originalVersion == WARN_VERSION + 1) {
if (originalVersion > WARN_VERSION) {
// temporarily downgrade version to bypass check in ASM
setMajorVersion(WARN_VERSION, b);
LOGGER.warning("Unsupported class file major version " + originalVersion);
Expand Down

0 comments on commit ad1e0cd

Please sign in to comment.