You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Alex Boisvert (JIRA)" <ji...@apache.org> on 2012/05/04 15:56:49 UTC

[jira] [Commented] (BUILDR-641) should allow java files without a class definition (e.g package-info.java)

    [ https://issues.apache.org/jira/browse/BUILDR-641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268370#comment-13268370 ] 

Alex Boisvert commented on BUILDR-641:
--------------------------------------

The challenge here is to find a simple, cheap (computationally) and correct way to determine source files without any class definition.

I was initially thinking about excluding files whose names are not valid Java class identifiers.  This would take care of cases such as package-info.java (since Java class names cannot contain a dash) but it would not cover the general case of files potentially containing package definition and/or comments and no class definition.
                
> should allow java files without a class definition (e.g package-info.java)
> --------------------------------------------------------------------------
>
>                 Key: BUILDR-641
>                 URL: https://issues.apache.org/jira/browse/BUILDR-641
>             Project: Buildr
>          Issue Type: Bug
>          Components: Compilers
>    Affects Versions: 1.4.6
>            Reporter: Niklaus Giger
>
> A project with a project-info.java file consisting only of a line like "package java.lang.applet;" will always get recompiled, as running javac will not create a package-info.class file.
> See http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/javadoc.html#sourcefiles
> Rewording the title to 'should allow java files without a class definition', as there are may be other (pathological) cases where a *.java file consists only of comments.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira