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 64666 - RepositoryUpdater.getRootURL should not call FileUtil.isArchiveFile()
Summary: RepositoryUpdater.getRootURL should not call FileUtil.isArchiveFile()
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Martin Matula
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-09-19 14:46 UTC by Antonin Nebuzelsky
Modified: 2007-09-26 09:14 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 Antonin Nebuzelsky 2005-09-19 14:46:34 UTC
FileUtil.isArchiveFile() is unnecessarily slow because it reads a few bytes from
the file beginning to verify that it is a ZIP/JAR archive.

The semantics of FileUtil.isArchiveFile() perhaps will not be changed now so it
has to be fixed in RepositoryUpdater.getRootURL.
Comment 1 Jan Becicka 2005-09-19 15:24:41 UTC
Checking in Util.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/Util.java,v  <--  Util.java
new revision: 1.11; previous revision: 1.10
done
Checking in RepositoryUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/RepositoryUpdater.java,v 
<--  RepositoryUpdater.java
new revision: 1.38; previous revision: 1.37
done
Comment 2 Jan Becicka 2005-09-23 12:42:53 UTC
This fix is wrong. See issue 64980.
Checking in Util.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/Util.java,v  <--  Util.java
new revision: 1.13; previous revision: 1.12
done
Checking in RepositoryUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/RepositoryUpdater.java,v 
<--  RepositoryUpdater.java
new revision: 1.39; previous revision: 1.38
done
Comment 3 Jan Becicka 2005-09-23 12:47:58 UTC
See description of issue 64980.
Reopen this issue if you can provide better method than FileUtil.isArchiveFile().
Comment 4 Jan Chalupa 2005-09-26 12:31:07 UTC
Re-opening. Regardless of the FileUtil.isArchiveFile implementation, there seems
to be enough information on the javacore side to make the querying more efficient. 
Comment 5 Martin Matula 2005-09-29 23:01:39 UTC
Fixed.

Checking in src/org/netbeans/modules/javacore/RepositoryUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/RepositoryUpdater.java,v 
<--  RepositoryUpdater.java
new revision: 1.40; previous revision: 1.39
done
Comment 6 Quality Engineering 2007-09-20 09:49:53 UTC
Reorganization of java component