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 255908 - NullPointerException at org.netbeans.modules.versioning.util.Utils.getLineEnding
Summary: NullPointerException at org.netbeans.modules.versioning.util.Utils.getLineEnding
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-13 15:55 UTC by aquaglia
Modified: 2016-02-02 13:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 220523


Attachments
stacktrace (1.51 KB, text/plain)
2015-10-13 15:55 UTC, aquaglia
Details
sample project (61.40 KB, application/octet-stream)
2015-10-14 17:22 UTC, Ondrej Vrabec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aquaglia 2015-10-13 15:55:46 UTC
Build: NetBeans IDE 8.1 RC2 (Build 201510082301)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.45-b02, Java(TM) SE Runtime Environment, 1.8.0_45-b15
OS: Windows 7

User Comments:
aquaglia: Editing html file




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.versioning.util.Utils.getLineEnding(Utils.java:1728)
   at org.netbeans.modules.subversion.ui.update.ResolveConflictsExecutor.handleMergeFor(ResolveConflictsExecutor.java:157)
   at org.netbeans.modules.subversion.ui.update.ResolveConflictsExecutor.exec(ResolveConflictsExecutor.java:115)
   at org.netbeans.modules.subversion.ui.update.ResolveConflictsAction$1$1.run(ResolveConflictsAction.java:136)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
Comment 1 aquaglia 2015-10-13 15:55:47 UTC
Created attachment 156695 [details]
stacktrace
Comment 2 Ondrej Vrabec 2015-10-13 17:41:32 UTC
fixed: core-main #0567c770ebf2
Comment 3 Jiri Kovalsky 2015-10-14 06:43:31 UTC
Angelo, any steps to reproduce this NPE? Thanks.
Comment 4 Ondrej Vrabec 2015-10-14 17:22:13 UTC
Created attachment 156725 [details]
sample project

steps to reproduce:
1) Create new versioned project (Git, Mercurial, Svn, does not matter)
2) Prepare a merge conflict - e.g.:
   - on branch A set FILE's content to "A"
   - on branch B set FILE's content to "B"
3) merge B into A
4) edit the file's content - remove all <<<< and >>>> and set the
content to:
   "B"
note it has to be just a single line
5) Git -> Conflicts -> Resolve Conflicts

or just open the attached project and Resolve Conflicts on src/pkg251409/newfile
Comment 5 aquaglia 2015-10-14 17:26:53 UTC
Thanks, but I have just tried again but I am not getting any exception.
Comment 6 Jiri Kovalsky 2015-10-14 17:51:18 UTC
I was also not able to reproduce the exception in #201510110923. :(
Comment 7 Quality Engineering 2015-10-15 01:22:36 UTC
Integrated into 'main-silver', will be available in build *201510150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0567c770ebf2
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #255908 - NullPointerException at org.netbeans.modules.versioning.util.Utils.getLineEnding
Comment 8 Jiri Prox 2015-12-17 11:43:54 UTC
verified in trunk
Comment 9 Ondrej Vrabec 2015-12-23 15:40:41 UTC
8.1 patch: http://hg.netbeans.org/releases/rev/9a95a4c563f2