Skip to content

Commit

Permalink
JACOBIN-575 Initialized MethodList with the methods found in java/lan…
Browse files Browse the repository at this point in the history
…g/Object
  • Loading branch information
platypusguy committed Jan 20, 2025
1 parent f00bfed commit 4bf883b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/classloader/classloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,19 @@ func convertToPostableClass(fullyParsedClass *ParsedClass) ClData {
}
}

kd.MethodList = make(map[string]string)
// insert the methods from java/lang/Object into the MethodList
kd.MethodList["clone()Ljava/lang/Object;"] = "java/lang/Object.clone()Ljava/lang/Object;"
kd.MethodList["equals(Ljava/lang/Object;)Z"] = "java/lang/Object.equals(Ljava/lang/Object;)Z"
kd.MethodList["getClass()Ljava/lang/Object;"] = "java/lang/Object.getClass()Ljava/lang/Object;"
kd.MethodList["hashCode()I"] = "java/lang/Object.hashCode()I"
kd.MethodList["notify()V"] = "java/lang/Object.notify()V"
kd.MethodList["notifyAll()V"] = "java/lang/Object.notifyAll()V"
kd.MethodList["toString()Ljava/lang/Object;"] = "java/lang/Object.toString()Ljava/lang/Object;"
kd.MethodList["wait()V"] = "java/lang/Object.wait()V"
kd.MethodList["wait(J)V"] = "java/lang/Object.wait(J)V"
kd.MethodList["wait(JI)V"] = "java/lang/Object.wait(JI)V"

kd.MethodTable = make(map[string]*Method)
if len(fullyParsedClass.methods) > 0 {
for i := 0; i < len(fullyParsedClass.methods); i++ {
Expand Down
2 changes: 1 addition & 1 deletion src/config/buildno.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

package config

var BuildNo = 3424
var BuildNo = 3425

0 comments on commit 4bf883b

Please sign in to comment.