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

review Add a new warning in verifySourceClasspath #1937

Merged
merged 3 commits into from
Apr 4, 2018

Conversation

surli
Copy link
Collaborator

@surli surli commented Mar 30, 2018

This PR aims at avoiding issues like #1933

@surli surli changed the title Add a new warning in verifySourceClasspath review Add a new warning in verifySourceClasspath Mar 30, 2018
@pvojtechovsky
Copy link
Collaborator

Let's improve the javadoc too. Actually there is

	/**
	 * Sets the source class path of the Spoon model.
	 * After the class path is set, it can be retrieved by
	 * {@link #getSourceClasspath()}. Only .jar files or directories
	 * are accepted.
	 *
	 * @throws InvalidClassPathException if a given classpath does not exists or
	 * does not have the right format (.jar file or directory)
	 */
	void setSourceClasspath(String[] sourceClasspath);

Let's replace

Only .jar files or directories are accepted.

by: Only .jar files or directories with *.java files are accepted. The directories with *.jar files or *.class files are ignored.

Or may be we should automatically replace classpath which point to a directory by list of contained jar files? ... looks like clients expects .that .. and the java doc would be easier too...

WDYT?

@surli
Copy link
Collaborator Author

surli commented Apr 3, 2018

by: Only .jar files or directories with *.java files are accepted. The directories with *.jar files or *.class files are ignored.

I changed a bit the text:
Only .jar files or directories with *.class files are accepted. The *.jar or *.java files contained in given directories are ignored.

Or may be we should automatically replace classpath which point to a directory by list of contained jar files? ... looks like clients expects .that .. and the java doc would be easier too...

I though about that but it could be quite expensive: in #1933 the user tried to add its complete .m2 directory as sourceClasspath...

@monperrus monperrus merged commit 0135b1f into INRIA:master Apr 4, 2018
@surli surli deleted the fix-classpath-verify branch April 4, 2018 07:33
@surli surli mentioned this pull request Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants