Skip to content

Commit f4cd815

Browse files
committed
Fix for CodeAPI 3.1.6.
- Info: Version 3.2 will be released later
1 parent 1f76b23 commit f4cd815

File tree

4 files changed

+30
-3
lines changed

4 files changed

+30
-3
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
}
1919

2020
group 'com.github.jonathanxd'
21-
version '3.1.6-3.1.4'
21+
version '3.1.6-3.1.5'
2222

2323
apply from: project(":CodeAPI").file("gradle/common.gradle")
2424

src/main/kotlin/com/github/jonathanxd/codeapi/bytecode/common/Frame.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ internal class Frame(val parent: Frame? = null, variables: List<Variable> = empt
7878
return this.getVarByName(name)
7979
}
8080

81-
return this.variables.find { `var` -> `var`.isVisible && `var`.name == name && `var`.type.compareTo(type) == 0 }
81+
return this.variables.find { `var` -> `var`.isVisible && `var`.name == name && `var`.type.`is`(type) }
8282
}
8383

8484
/**

src/main/kotlin/com/github/jonathanxd/codeapi/bytecode/common/Variable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ data class Variable @JvmOverloads constructor(val name: String, val type: CodeTy
5050
if (other !is Variable)
5151
return false
5252

53-
return other.name == this.name && other.type.compareTo(this.type) == 0
53+
return other.name == this.name && other.type.`is`(this.type)
5454

5555
}
5656

src/main/kotlin/com/github/jonathanxd/codeapi/bytecode/exception/ClassCheckException.kt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
/*
2+
* CodeAPI-BytecodeWriter - Framework to generate Java code and Bytecode code. <https://github.com/JonathanxD/CodeAPI-BytecodeWriter>
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2017 TheRealBuggy/JonathanxD (https://github.com/JonathanxD/ & https://github.com/TheRealBuggy/) <[email protected]>
7+
* Copyright (c) contributors
8+
*
9+
*
10+
* Permission is hereby granted, free of charge, to any person obtaining a copy
11+
* of this software and associated documentation files (the "Software"), to deal
12+
* in the Software without restriction, including without limitation the rights
13+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14+
* copies of the Software, and to permit persons to whom the Software is
15+
* furnished to do so, subject to the following conditions:
16+
*
17+
* The above copyright notice and this permission notice shall be included in
18+
* all copies or substantial portions of the Software.
19+
*
20+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26+
* THE SOFTWARE.
27+
*/
128
package com.github.jonathanxd.codeapi.bytecode.exception
229

330
import com.github.jonathanxd.codeapi.bytecode.BytecodeClass

0 commit comments

Comments
 (0)