未验证 提交 b5ada3b9 编写于 作者: P Phodal Huang

refactor: remove unused code

上级 0f5ccb7c
......@@ -67,7 +67,7 @@ func startParse(nodes []JClassNode, relates []support3.RefactorChangeRelate) {
for _, methodCall := range pkgNode.MethodCalls {
if methodCall.Package+methodCall.Class == oldInfo.Package+oldInfo.Class {
if methodCall.MethodName == oldInfo.Method {
updateSelfRefs(pkgNode, *methodCallToMethodModel(methodCall), newInfo)
updateSelfRefs(pkgNode, methodCallToMethodModel(methodCall), newInfo)
}
}
}
......@@ -75,8 +75,8 @@ func startParse(nodes []JClassNode, relates []support3.RefactorChangeRelate) {
}
}
func methodCallToMethodModel(call JMethodCall) *JMethod {
return &JMethod{call.MethodName, call.Type, call.StartLine, call.StartLinePosition, call.StopLine, call.StopLinePosition, nil, nil, false, nil}
func methodCallToMethodModel(call JMethodCall) JMethod {
return *&JMethod{call.MethodName, call.Type, call.StartLine, call.StartLinePosition, call.StopLine, call.StopLinePosition, nil, nil, false, nil}
}
func updateSelfRefs(node JClassNode, method JMethod, info *support3.PackageClassInfo) {
......
......@@ -87,10 +87,6 @@ func removeImportByLines(file string, errorLines []int) {
}
}
func removeImportByLineNum(imp models2.JImport, line int) {
removeLine(currentFile, line)
}
func removeLine(path string, lineNumber int) {
file, err := ioutil.ReadFile(path)
if err != nil {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册