Bug 102629 - FileEncodingQuery instantiates DataObject too soon
FileEncodingQuery instantiates DataObject too soon
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: Data Systems
6.x
All All
: P1 (vote)
: 6.x
Assigned To: Jaroslav Tulach
issues@platform
J1_STOPPER
:
Depends on:
Blocks: 92595 99509
  Show dependency treegraph
 
Reported: 2007-04-26 15:01 UTC by David Kaspar
Modified: 2010-04-09 04:49 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Stack trace of createFromTemplate to DataObject creation (2.30 KB, text/plain)
2007-04-26 15:03 UTC, David Kaspar
Details
stacktrace (4.25 KB, text/plain)
2007-04-26 15:16 UTC, Martin Ryzl
Details
The JAR with fix built against M9 (1.13 MB, application/x-compressed)
2007-04-30 11:02 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Kaspar 2007-04-26 15:01:34 UTC
I have MultiDataObject (.java as primary file, .vmd as secondary entry).
Calling MyDataObject.createFromTemplate sometimes returns invalid dataobject.

The problem is that during copying of the MyDataObject, there is
"DataObject.find" method called right after the primary entry is called - at
that time the secondary entry is not copied.

Setting as P1 since it affect UI of file creation.
Comment 1 David Kaspar 2007-04-26 15:03:10 UTC
Created attachment 41736 [details]
Stack trace of createFromTemplate to DataObject creation
Comment 2 David Kaspar 2007-04-26 15:05:45 UTC
I have attached a stack trace where:
1) the VisualMIDlet_3.java is a primary file of my data object that is being
created.
2) pub.J2MEDataObject.<init> means that a data object is going to be create -
this data object represents a single ".java" file only.
Comment 3 Martin Ryzl 2007-04-26 15:16:20 UTC
Created attachment 41738 [details]
stacktrace
Comment 4 Martin Ryzl 2007-04-26 15:20:29 UTC
another case - creating Frame in Mobile project (CDC) - clash between
J2MEDataObject (this one has been invalidated and thus appear in stack trace)
and FormDataObject (this should be result)
Comment 5 Marian Mirilovic 2007-04-27 09:35:05 UTC
Jarda, 
this is a P1, could you please look at this?

David, 
is it something new ? Is it necessary to fix this for M9 ?
Comment 6 David Kaspar 2007-04-27 10:00:12 UTC
It is a long-term issue. Previously we just know about symptoms, yesterday we
have found the root cause. It is really a P1 - showstopper for J1 demos.
Comment 7 Jaroslav Tulach 2007-04-27 10:37:57 UTC
Cause is known. I agree it is desirable to fix it. 
Comment 8 Jaroslav Tulach 2007-04-27 15:53:09 UTC
#102629: do not ask dataobjects for FileEncodingQuery when doing instantiation 
from a template

David, please verify, so I can backport to M9.

IDE: [27.4.07 16:51] Committing started
Checking in 
templates/test/unit/src/org/netbeans/modules/templates/SCFTHandlerTest.java;
/cvs/openide/templates/test/unit/src/org/netbeans/modules/templates/SCFTHandlerTest.java,v  
<--  SCFTHandlerTest.java
new revision: 1.5; previous revision: 1.4
done
Checking in 
loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java;
/cvs/openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java,v  
<--  DataObjectEncodingQueryImplementation.java
new revision: 1.2; previous revision: 1.1
done
Checking in loaders/src/org/openide/loaders/DataObjectPool.java;
/cvs/openide/loaders/src/org/openide/loaders/DataObjectPool.java,v  <--  
DataObjectPool.java
new revision: 1.44; previous revision: 1.43
Comment 9 Jaroslav Tulach 2007-04-28 07:44:59 UTC
I need verification. Otherwise I cannot backport this patch.
Comment 10 Jaroslav Tulach 2007-04-28 21:06:40 UTC
Additional improvement.

IDE:-------------------------------------------------
IDE: [28.4.07 22:03] Committing started
Checking in loaders/src/org/openide/loaders/DataObject.java;
/cvs/openide/loaders/src/org/openide/loaders/DataObject.java,v  <--  
DataObject.java
new revision: 1.37; previous revision: 1.36
done
Checking in loaders/src/org/openide/loaders/DataObjectPool.java;
/cvs/openide/loaders/src/org/openide/loaders/DataObjectPool.java,v  <--  
DataObjectPool.java
new revision: 1.45; previous revision: 1.44
done
Checking in 
templates/test/unit/src/org/netbeans/modules/templates/SCFTHandlerTest.java;
/cvs/openide/templates/test/unit/src/org/netbeans/modules/templates/SCFTHandlerTest.java,v  
<--  SCFTHandlerTest.java
new revision: 1.6; previous revision: 1.5
done
Checking in 
loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java;
/cvs/openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java,v  
<--  DataObjectEncodingQueryImplementation.java
new revision: 1.3; previous revision: 1.2
Comment 11 David Kaspar 2007-04-30 10:39:35 UTC
Verified in main trunk
Comment 12 Jaroslav Tulach 2007-04-30 11:02:18 UTC
Created attachment 41955 [details]
The JAR with fix built against  M9
Comment 13 Jaroslav Tulach 2007-04-30 11:02:42 UTC
Backported to M9.

Checking in 
openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java;
/cvs/openide/loaders/src/org/netbeans/modules/openide/loaders/DataObjectEncodingQueryImplementation.java,v  
<--  DataObjectEncodingQueryImplementation.java
new revision: 1.1.8.1; previous revision: 1.1
done
Checking in openide/loaders/src/org/openide/loaders/DataObject.java;
/cvs/openide/loaders/src/org/openide/loaders/DataObject.java,v  <--  
DataObject.java
new revision: 1.36.2.1; previous revision: 1.36
done
Checking in 
openide/templates/test/unit/src/org/netbeans/modules/templates/SCFTHandlerTest.java;
/cvs/openide/templates/test/unit/src/org/netbeans/modules/templates/SCFTHandlerTest.java,v  
<--  SCFTHandlerTest.java
new revision: 1.4.8.1; previous revision: 1.4
Comment 14 Fabiola Rios 2007-04-30 11:43:54 UTC
verified by QE
Comment 15 Jaroslav Tulach 2010-04-07 14:06:09 UTC
Additional fix for bug 138973 as core-main#64f590e0c3b6
Comment 16 Quality Engineering 2010-04-09 04:49:02 UTC
Integrated into 'main-golden', will be available in build *201004090201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/64f590e0c3b6
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #102629: Using MimeLookup registered encoding implementations even before the actual data object is contructed


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo