Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong call detected on Date.parse(String, String) #372

Closed
mauromol opened this issue Nov 7, 2017 · 5 comments
Closed

Wrong call detected on Date.parse(String, String) #372

mauromol opened this issue Nov 7, 2017 · 5 comments
Assignees
Labels

Comments

@mauromol
Copy link

mauromol commented Nov 7, 2017

Consider the following:

class TestDateParse {
	static main(args) {
		Date.parse('dd/MM/y', "16/09/1980")
	}
}

As you can see, Greclipse is highlighting the call as deprecated, but if you use F2 or F3 over parse you see that this is because it's thinking it's calling Date.parse(String) rather than Date.parse(String, String) (which is not deprecated).

This is a regression, because the exact same problem was fixed already in the past with GRECLIPSE-1396.

@eric-milles
Copy link
Member

I only see one parse method.

date-parse

@mauromol
Copy link
Author

mauromol commented Nov 7, 2017

Groovy JDK adds more methods to Date: http://docs.groovy-lang.org/latest/html/groovy-jdk/java/util/Date.html#parse(java.lang.String,%20java.lang.String)
I think it's implemented through org.codehaus.groovy.runtime.DefaultGroovyStaticMethods.parse(Date, String, String).

@eric-milles
Copy link
Member

eric-milles commented Nov 7, 2017 via email

@eric-milles
Copy link
Member

ready to test

@eric-milles eric-milles self-assigned this Nov 12, 2017
@mauromol
Copy link
Author

Hi Eric, I tested this with 2.9.2.xx-201711130408-e46 and it seems to be fixed, thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants