Skip to content

Commit

Permalink
Add Const.MAJOR_22
Browse files Browse the repository at this point in the history
Add Const.MINOR_22
  • Loading branch information
garydgregory committed Jul 13, 2024
1 parent 9818c89 commit e9aa068
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ The <action> type attribute can be add,update,fix,remove.
<action type="update" dev="ggregory" due-to="Gary Gregory">Deprecate TransitiveHull.INGORED in favor of TransitiveHull.getIgnored().</action>
<!-- ADD -->
<action type="update" dev="ggregory" due-to="nbauma109, Gary Gregory, Mark Roberts">Add accessors to model and unit tests, Javadoc #183.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">Add Const.MAJOR_22.</action>
<action type="update" dev="ggregory" due-to="Gary Gregory">Add Const.MINOR_22.</action>
<!-- UPDATE -->
<action type="update" dev="ggregory" due-to="Dependabot">Bump tests from org.assertj:assertj-core 3.25.3 to 3.26.3 #322, #332.</action>
<action type="update" dev="ggregory" due-to="Dependabot">Bump tests from org.jetbrains.kotlin:kotlin-stdlib 1.9.23 to 2.0.0 #309, #318.</action>
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/org/apache/bcel/Const.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,14 @@ public final class Const {
*/
public static final short MINOR_21 = 0;

/**
* Minor version number of class files for Java 22: {@value}.
*
* @see #MAJOR_22
* @since 6.10.0
*/
public static final short MINOR_22 = 0;

/**
* Major version number of class files for Java 14: {@value}.
*
Expand Down Expand Up @@ -356,6 +364,14 @@ public final class Const {
*/
public static final short MAJOR_21 = 65;

/**
* Major version number of class files for Java 22: {@value}.
*
* @see #MINOR_22
* @since 6.10.0
*/
public static final short MAJOR_22 = 66;

/**
* Default major version number. Class file is for Java 1.1: {@value}.
*
Expand Down
34 changes: 34 additions & 0 deletions src/test/java/org/apache/bcel/ConstTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.bcel;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;

/**
* Tests {@link Const}.
*/
public class ConstTest {

@Test
public void testJava22() throws Exception {
assertEquals(66, Const.MAJOR_22);
assertEquals(0, Const.MINOR_22);
}
}

0 comments on commit e9aa068

Please sign in to comment.