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 234351 - IllegalArgumentException: Copying to 7978 is greater then its size (7869).
Summary: IllegalArgumentException: Copying to 7978 is greater then its size (7869).
Status: RESOLVED DUPLICATE of bug 217498
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-13 21:37 UTC by alied
Modified: 2014-06-06 11:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 203026


Attachments
stacktrace (5.81 KB, text/plain)
2013-08-13 21:37 UTC, alied
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alied 2013-08-13 21:37:25 UTC
This bug was originally marked as duplicate of bug 228066, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201308062300)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b16
OS: Windows 7

User Comments:
alied: deleting lines fron a java source file




Stacktrace: 
java.lang.IllegalArgumentException: Copying to 7978 is greater then its size (7869).
   at org.netbeans.modules.java.source.save.CasualDiff.copyTo(CasualDiff.java:4789)
   at org.netbeans.modules.java.source.save.CasualDiff.copyTo(CasualDiff.java:4768)
   at org.netbeans.modules.java.source.save.CasualDiff.diffCommentLists(CasualDiff.java:3412)
   at org.netbeans.modules.java.source.save.CasualDiff.diffPrecedingComments(CasualDiff.java:3323)
   at org.netbeans.modules.java.source.save.CasualDiff.diffPrecedingComments(CasualDiff.java:3311)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTreeImpl(CasualDiff.java:4231)
Comment 1 alied 2013-08-13 21:37:31 UTC
Created attachment 138661 [details]
stacktrace
Comment 2 Jaroslav Havlin 2013-08-14 06:43:26 UTC
Seems to be another duplicate of incomplete bug 228066, but probably no new useful information is provided by the exception report.

Couldn't it be related to different line endings in source and target files (2-byte CRLF vs 1-byte LF)? (Just an instant idea, I didn't debug the code).

Reassigning to java/Source. Thank you.
Comment 3 Svata Dedic 2014-06-06 11:26:59 UTC
I doubt it, CRLF is handled by Source class on file read before it is parsed. This error originated from deleting some content from the java file (= no target file)

*** This bug has been marked as a duplicate of bug 217498 ***