Thanks Byron!
Amy, revision 47389 (and related 47383) were yours. Please take a look.
Thanks,
Dies
From: Byron Nevins [mailto:byron.nevins_at_oracle.com]
Sent: Monday, 13 June 2011 05:01
To: dev_at_glassfish.java.net
Subject: Re: hundreds of warnings during QL on GF 3.2 workspace
See SVN 47389
I've seen this before. Another REAL bug caused by trying to fix a
low-level FindBugs "bug".
FindBugs was complaining that the return value of mkdirs() was being
ignored. I added a utility method for dealing
with this exact problem. Please read and keep it in mind if you get
this FindBugs issue.
Here is the code from that checkin:
if (!resourceFile.getParentFile().mkdirs()) {
errorHere();
Hmmm. What happens if the directory already exists?
This is the easiest fix:
import static com.sun.enterprise.util.io.FileUtils.mkdirsMaybe;
if (!mkdirsMaybe(resourceFile.getParentFile())) {
errorHere();
==========
reference:
/**
* Wrapper for File.mkdirs
* This version will return true if the directory exists when the
method returns.
* Unlike File.mkdirs which returns false if the directory already
exists.
* @param f The file pointing to the directory to be created
* @return
*/
public static boolean mkdirsMaybe(File f) {
return f != null && (f.isDirectory() || f.mkdirs());
}
On 6/11/2011 1:37 AM, Koper, Dies wrote:
Hundreds of WEB0360 and WEB0361 messages are flooding my server.log when
I run QL on the 3.2 workspace.
Hudson continuous build has them too. Is this a known issue?
Example of message in my server.log:
[#|2011-06-11T16:30:36.020+1000|WARNING|glassfish3.2|javax.enterprise.sy
stem.container.web.org.glassfish.web.loader|_ThreadID=26;_ThreadName=Thr
ead-1;|WEB0360: Unable to create
D:\sources\OSS\GF\V3\v3\distributions\glassfish\target\stage\glassfish3\
glassfish\domains\domain1\generated\jsp\__admingui\loader_28513476\com\s
un\webui\jsf\suntheme\images\commontaskssection|#]
Example from Hudson's server.log:
[#|2011-06-11T00:22:17.132-0700|WARNING|glassfish3.2|javax.enterprise.sy
stem.container.web.org.glassfish.web.loader|_ThreadID=25;_ThreadName=Thr
ead-1;|WEB0360: Unable to create
/export/home1/java_re/BUILD_AREA/workspace/gf-trunk-build-continuous/gfv
3-gp/glassfish3/glassfish/domains/domain1/generated/jsp/__admingui/loade
r_15638245/META-INF/resources/resources/jmaki/blockList|#]
http://hudson.glassfish.org/job/gf-trunk-build-continuous/lastSuccessful
Build/artifact/bundles/server-gp.log
Thanks,
Dies
--
<http://www.oracle.com>
Byron Nevins | Principal MTS
Phone: +1 6503958992 <tel:+1%206503958992>
<http://www.oracle.com/commitment> Oracle is committed to developing
practices and products that help protect the environment