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 59994 - Editing 1st line throws exceptions
Summary: Editing 1st line throws exceptions
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks: 59972
  Show dependency tree
 
Reported: 2005-06-15 09:55 UTC by zikmund
Modified: 2005-09-05 10:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
java.lang.NullPointerException at org.netbeans.modules.web.core.syntax.JspFormatter.getReformatBlock(JspFormatter.java:320) (2.20 KB, text/plain)
2005-06-15 09:59 UTC, zikmund
Details
Exception thrown when code completion is used at 1st line. (2.37 KB, text/plain)
2005-06-16 09:06 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zikmund 2005-06-15 09:55:47 UTC
Build 200506142000

1) Create new WebApp
2) Press Enter on 1st line in index.jsp
3) EXCEPTION: see attachment

Notice: same exception is thrown while editing 1st line of a JSP
Comment 1 zikmund 2005-06-15 09:59:58 UTC
Created attachment 22680 [details]
java.lang.NullPointerException at org.netbeans.modules.web.core.syntax.JspFormatter.getReformatBlock(JspFormatter.java:320)
Comment 2 Petr Pisl 2005-06-15 10:05:37 UTC
Probably it's connected with the Marek's changes
Comment 3 Marek Fukala 2005-06-15 15:19:57 UTC
For sure Petre. I will fix it. The some problem is very likely in HTML editor
and a similar one is for XML editor - see Issue #59561
Comment 4 Marek Fukala 2005-06-15 16:50:42 UTC
I can reproduce it only when pressing enter key on the beginning of the first
line. I fixed this case in trunk for HTML and JSP as well. So I am marking the
issue as fixed. If you still can reproduce it, please reopen, otherwise I will
commit the fix into q-build branch tomorrow.

Checking in
web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspFormatter.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspFormatter.java,v
 <--  JspFormatter.java
new revision: 1.28; previous revision: 1.27
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/HTMLFormatter.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/HTMLFormatter.java,v  <--
 HTMLFormatter.java
new revision: 1.7; previous revision: 1.6
done
Comment 5 Jiri Kovalsky 2005-06-16 09:04:36 UTC
It still throws exception although it's another one. Trying to verify in
development build #200506151800.

Steps to reproduce:
===================
1. Create new JSP page.
2. Set cursor at position 1:10 i.e. <%@page c|ontentType="text/html"%>
3. Press CTRL+Space to invoke code completion.
4. Press Enter.
5. Exception is thrown.
Comment 6 Jiri Kovalsky 2005-06-16 09:06:02 UTC
Created attachment 22727 [details]
Exception thrown when code completion is used at 1st line.
Comment 7 Marek Fukala 2005-06-16 10:06:09 UTC
Thanks Jirko. I have just fixed the hopefuly last problem. BTW: Have you tried
last line? :-)))

Checking in jspsyntax/src/org/netbeans/modules/web/core/syntax/JspFormatter.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspFormatter.java,v
 <--  JspFormatter.java
new revision: 1.29; previous revision: 1.28
done
Comment 8 Jiri Kovalsky 2005-06-17 08:08:24 UTC
I agree that the latest fix is stable enough for integration to appropriate
Q-build branch. Could you please Marku proceed ? Thanks.
Comment 9 Marek Fukala 2005-06-17 08:48:36 UTC
Accomplished - fix intergarated into QBE200506142000 branch.

Checking in html/editor/lib/src/org/netbeans/editor/ext/html/HTMLFormatter.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/HTMLFormatter.java,v  <--
 HTMLFormatter.java
new revision: 1.6.2.1; previous revision: 1.6
done
Checking in
web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspFormatter.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspFormatter.java,v
 <--  JspFormatter.java
new revision: 1.27.4.1; previous revision: 1.27
done