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 149557 - DiffFileEncodingQueryImpl class is loaded twice during NetBeans startup with LimeWire project
Summary: DiffFileEncodingQueryImpl class is loaded twice during NetBeans startup with ...
Status: REOPENED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: Ondrej Vrabec
URL: http://wiki.netbeans.org/FitnessViaWh...
Keywords: PERFORMANCE, TEST
Depends on:
Blocks:
 
Reported: 2008-10-08 20:25 UTC by Alexander Kouznetsov
Modified: 2014-06-05 12:19 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stacktraces (4.24 KB, text/plain)
2008-10-08 20:25 UTC, Alexander Kouznetsov
Details
Stacktrace (2.11 KB, text/plain)
2008-10-14 14:37 UTC, Alexander Kouznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kouznetsov 2008-10-08 20:25:30 UTC
Performance whitelist test reports that following classes are loaded during NetBeans startup with LimeWire project:

org.netbeans.modules.versioning.diff.DiffFileEncodingQueryImpl
org.netbeans.modules.versioning.util.queries.DiffFileEncodingQueryImpl

Please don't load these classes unless they are really necessary. More information about the test available via the URL
specified.

Comment from jtulach: 
Why is there similar class twice? maybe P4 or P3.
Comment 1 Alexander Kouznetsov 2008-10-08 20:25:57 UTC
Created attachment 71409 [details]
Stacktraces
Comment 2 Tomas Stupka 2008-10-09 11:08:04 UTC
> Please don't load these classes unless they are really necessary
versionig utilities exprts FileEncodingQueryImplementation. That's what DiffFileEncodingQueryImpl is for.
if DiffFileEncodingQueryImpl gets loaded it's not a cause or fault of vcs 

> Why is there similar class twice?
diff can't use the encoding query facility provided by vcs utilities as it is vcs utilitities which depends on diff ... 


Comment 3 Jaroslav Tulach 2008-10-10 12:22:36 UTC
It is not Alexander's nor performance team primary responsibility to identify whether vcs is responsible or not. We 
just identified that a class is loaded uselessly and reported bug to fix that.

Looking at the DiffFileEncodingQueryImpl, I can see that it returns null for every file having other mimetype than 
text/x-diff. This seems to me that you need to change the registration of the DiffFileEncodingQueryImpl to make the 
class activated only when encoding of such file is in question. Currently I know only about one way to achieve that: 
you can put the query into proper DataObject's getLookup.

> diff can't use the encoding query facility provided by vcs utilities as it is vcs utilitities which depends on diff
It does not sound like real argument to me. Cann't you let vcs use the diff functionality?

Comment 4 Alexander Kouznetsov 2008-10-14 14:36:20 UTC
Another similar class in the list of loaded classes during startup with LimeWire project:

org.netbeans.modules.diff.DiffFileEncodingQueryImplementation

Please don't load this class unless it is really necessary.
Comment 5 Alexander Kouznetsov 2008-10-14 14:37:01 UTC
Created attachment 71768 [details]
Stacktrace