This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 132705 - compiler fails on non ascii characters
Summary: compiler fails on non ascii characters
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-13 16:40 UTC by anthavio
Modified: 2009-04-08 10:39 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anthavio 2008-04-13 16:40:33 UTC
I found bug related to non ascii characters presence (É for example) inside java source (in string literals). All java
files are UTF-8 encoded. Encoding is set inside maven2 pom.xml and recognized by NB (project->properties->sources).
Project tree shows errors in some (few) java files. When I open any one of them in editor, editor does NOT show any
error, and after closing, error mark disappears in project tree. Later, when background compilation step passes, same
java file is error marked again. So it looks like background compiler is bad boy.
Comment 1 Jan Lahoda 2008-04-14 14:11:36 UTC
I have took a look at the FileEncodingQuery impl in maven support, and it seems to me that it is possible that the query
does not return the correct encoding when the encoding is requested for the whole source root (it seems to use
FileUtil.isParentOf(f1, f2), which returns false if f1 == f2, which is I guess the situation when the encoding is
required for whole source root). Milos, any ideas?
Comment 2 Milos Kleint 2008-04-14 14:14:22 UTC
ok, possibly a bug in maven support then. 
*if* asking for encoding for a folder is documented contract. I've always assumed one asks about encoding for files only..

Comment 3 Dusan Balek 2008-04-15 14:36:06 UTC
The Java infrastructure calls FileEncodingQuery on the source root and uses the return value for the whole compilation
unit. The reason for this the fact that the project queries are incredibly slow.
Comment 4 Milos Kleint 2008-04-16 09:01:08 UTC
fixed both in trunk and the 3.0.x branch (current release branch)

http://fisheye.codehaus.org/changelog/mevenide/?cs=5154
http://fisheye.codehaus.org/changelog/mevenide/?cs=5156


please use the nbm files from the continuous integration machine to verify:
http://deadlock.netbeans.org/hudson/job/mevenide-fcs/lastSuccessfulBuild/artifact/mevenide-AU-SNAPSHOT.zip


Note: I'm not sure if we do another respin of 3.0.x branch or wait a few weeks til the 3.1.x codebase is ready to be
pushed to AU.
Comment 5 Antonin Nebuzelsky 2008-04-16 10:05:21 UTC
I suggest we respin the modules for 6.1 UC soon (before 6.1 FCS).
Comment 6 anthavio 2008-04-16 10:18:58 UTC
It works now.
Thanks
Comment 7 Ken Frank 2008-04-19 00:30:34 UTC
to nb developers - is there any use case or situation that might need to be
fixed for other modules or for feq api itself that could impact other modules ?

ken.frank@sun.com
Comment 8 Jaroslav Pospisil 2009-04-08 10:39:15 UTC
v.