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 236761 - org.openide.text.DataEditorSupport$1: The file C:/projetos/mercedes-migracao/mercedes-migracao-service/src/main/java/br/com/tecsinapse/dealerprime/migracao/service/CarteiraService.java cannot be safel
Summary: org.openide.text.DataEditorSupport$1: The file C:/projetos/mercedes-migracao/...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal with 1 vote (vote)
Assignee: Miloslav Metelka
URL:
Keywords: 8.1_WAIVER_APPROVED
Depends on: 255122
Blocks:
  Show dependency tree
 
Reported: 2013-10-04 12:49 UTC by misterm
Modified: 2017-09-18 10:05 UTC (History)
32 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 204365


Attachments
stacktrace (1.01 KB, text/plain)
2013-10-04 12:49 UTC, misterm
Details
stacktrace (1012 bytes, text/plain)
2014-01-16 21:03 UTC, emiddio
Details
stacktrace (992 bytes, text/plain)
2014-08-18 22:16 UTC, _ tboudreau
Details
stacktrace (1008 bytes, text/plain)
2014-10-10 08:15 UTC, _ tboudreau
Details
stacktrace (1.12 KB, text/plain)
2015-05-22 06:45 UTC, _ tboudreau
Details
stacktrace (1.13 KB, text/plain)
2015-06-22 10:28 UTC, IrianR
Details
stacktrace (1.12 KB, text/plain)
2015-07-12 02:44 UTC, MackSix
Details
stacktrace (1.16 KB, text/plain)
2015-07-31 23:57 UTC, MackSix
Details
stacktrace (1002 bytes, text/plain)
2015-08-24 17:56 UTC, jyeary
Details
stacktrace (1.15 KB, text/plain)
2015-12-12 06:10 UTC, abien
Details
stacktrace (1.14 KB, text/plain)
2017-03-14 16:51 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2013-10-04 12:49:22 UTC
Build: NetBeans IDE Dev (Build 20131002-e5b3233adb3d)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b11
OS: Windows 7

User Comments:
misterm: .




Stacktrace: 
org.openide.text.DataEditorSupport$1: The file C:/projetos/mercedes-migracao/mercedes-migracao-service/src/main/java/br/com/tecsinapse/dealerprime/migracao/service/CarteiraService.java cannot be safely opened with encoding UTF-8. Do you want to continue opening it?
   at org.openide.text.DataEditorSupport.createAndThrowIncorrectCharsetUQE(DataEditorSupport.java:504)
   at org.openide.text.DataEditorSupport.loadFromStreamToKit(DataEditorSupport.java:494)
   at org.openide.text.DocumentOpenClose$DocumentLoad.atomicLockedRun(DocumentOpenClose.java:773)
   at org.openide.text.DocumentOpenClose$DocumentLoad.run(DocumentOpenClose.java:622)
   at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:321)
   at org.openide.text.NbDocument.runAtomic(NbDocument.java:436)
Comment 1 misterm 2013-10-04 12:49:24 UTC
Created attachment 140803 [details]
stacktrace
Comment 2 Exceptions Reporter 2014-01-15 20:21:47 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=204365
Comment 3 emiddio 2014-01-16 21:03:49 UTC
Created attachment 144047 [details]
stacktrace

changes character set in project
Comment 4 _ tboudreau 2014-08-18 22:16:51 UTC
Created attachment 148749 [details]
stacktrace

From the exception message, it looks like this exceptiion was supposed to result in a dialog being shown asking me if the file should be opened in UTF-8.
Comment 5 Exceptions Reporter 2014-09-26 21:08:08 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=204365
Comment 6 _ tboudreau 2014-10-10 08:15:25 UTC
Created attachment 149829 [details]
stacktrace

Opening a file with bad encoding - the exception should have been a question to the user.
Comment 7 _ tboudreau 2015-05-22 06:45:39 UTC
Created attachment 153804 [details]
stacktrace

Clearly supposed to show a dialog, judging from the exception message.  Maybe used to be UserQuestionException or something?
Comment 8 IrianR 2015-06-22 10:28:43 UTC
Created attachment 154325 [details]
stacktrace

Trying to open a class with encoding problems from a maven build failure link.
Comment 9 MackSix 2015-07-12 02:44:20 UTC
Created attachment 154573 [details]
stacktrace

Clicked on link warning in Run output window of Maven JSF project.

com/jsfcompref/Model.java:[50,38] unmappable character for encoding UTF-8
Comment 10 MackSix 2015-07-31 23:57:07 UTC
Created attachment 155104 [details]
stacktrace

Clicked on link in output window that said "com/jsfcompref/trainer/entity/accessor/UserRegistry.java:[65,42] unmappable character for encoding UTF-8"
Comment 11 jyeary 2015-08-24 17:56:33 UTC
Created attachment 155590 [details]
stacktrace

Attempting to do a maven build.
Comment 12 Ralph Ruijs 2015-09-14 08:18:47 UTC
The current behavior was intended, and is ensured by several tests. The fix would be with risk and, as issue 255122 plans to rewrite the document handling, short-lived I would like to ask for a waiver for 8.1.
Comment 13 _ tboudreau 2015-09-14 08:40:58 UTC
The bug here is that that exception's message should be appearing in an OK/Cancel dialog.  There should be some code that catches the exception and shows the dialog (the original behavior), and probably that code was deleted at some point.
Comment 14 Ralph Ruijs 2015-09-14 09:00:03 UTC
(In reply to _ tboudreau from comment #13)
> The bug here is that that exception's message should be appearing in an
> OK/Cancel dialog.  There should be some code that catches the exception and
> shows the dialog (the original behavior), and probably that code was deleted
> at some point.

The tests explicitly test for this not to happen when a document is loaded. Only when the UQE is thrown during reload, the dialog is shown.
Comment 15 Miloslav Metelka 2015-09-18 11:02:02 UTC
Unfortunately I don't remember if we used to be showing the dialog or not in the past :( But if we show it during the reload it makes sense to show it during the load as well.
I agree with Ralph that making a change that would popup a dialog during file loading process at this point could be dangerous and we should probably resolve it once the 8.1 is frozen. Although there are many tests any change in openide.text that involves threading should ideally be done soon in dev cycle to reveal potential problems.
Comment 16 Jiri Kovalsky 2015-09-18 13:22:27 UTC
OK. Let's fix this in trunk after 8.1 branch is created and if the fix will not cause any regressions we could deliver it in the first 8.1 patch release. Bug waiver for 8.1 approved.
Comment 17 abien 2015-12-12 06:10:19 UTC
Created attachment 157770 [details]
stacktrace

Happened during build
Comment 18 amobilia 2017-01-26 12:08:39 UTC
Bug still present on dev 201701020001
Comment 19 misterm 2017-03-14 16:51:38 UTC
Created attachment 163835 [details]
stacktrace

.