[libjsyntaxpane-java] 02/02: fix another upstream bug (NPE when the line number ruler is installed before the scroll pane)

Martin Quinson mquinson at alioth.debian.org
Tue Aug 27 09:57:29 UTC 2013


This is an automated email from the git hooks/post-receive script.

mquinson pushed a commit to branch master
in repository libjsyntaxpane-java.

commit 676552da7aeba6592a534fe819fc1612bc87bc67
Author: Martin Quinson <martin.quinson at loria.fr>
Date:   Tue Aug 27 11:57:20 2013 +0200

    fix another upstream bug (NPE when the line number ruler is installed before the scroll pane)
---
 debian/changelog                    |    7 +++++++
 debian/patches/NPE_null_scroll_pane |   26 ++++++++++++++++++++++++++
 debian/patches/series               |    1 +
 3 files changed, 34 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index a143ca8..b0054d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libjsyntaxpane-java (0.9.6~r156-5) UNRELEASED; urgency=low
+
+  * d/p/NPE_null_scroll_pane: upstream bug fix (NPE when the line
+    number ruler is installed before the scroll pane)
+
+ -- Martin Quinson <mquinson at debian.org>  Tue, 27 Aug 2013 11:32:52 +0200
+
 libjsyntaxpane-java (0.9.6~r156-4) unstable; urgency=low
 
   * d/p/scala-property-comments: fix upstream bug where # was used as
diff --git a/debian/patches/NPE_null_scroll_pane b/debian/patches/NPE_null_scroll_pane
new file mode 100644
index 0000000..d5e8b0b
--- /dev/null
+++ b/debian/patches/NPE_null_scroll_pane
@@ -0,0 +1,26 @@
+Description: Avoid a NPE when the ruler is installed before the scrollPane
+ This could happen by passing the content type to the JEditorPane
+ constructor, ie clearly before the addition of the editor pane to a
+ scroll pane.
+Author: Martin Quinson
+Upstream-status: Forwarded
+Upstream-bug: https://code.google.com/p/jsyntaxpane/issues/detail?id=191
+
+---
+ src/main/java/jsyntaxpane/components/LineNumbersRuler.java |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: b/src/main/java/jsyntaxpane/components/LineNumbersRuler.java
+===================================================================
+--- a/src/main/java/jsyntaxpane/components/LineNumbersRuler.java
++++ b/src/main/java/jsyntaxpane/components/LineNumbersRuler.java
+@@ -127,7 +127,8 @@
+ 		editor.addCaretListener(this);
+ 		editor.addPropertyChangeListener(this);
+ 		JScrollPane sp = getScrollPane(editor);
+-		sp.setRowHeaderView(this);
++	   	if (sp != null)
++			sp.setRowHeaderView(this);
+ 		mouseListener = new MouseAdapter() {
+ 
+ 			@Override
diff --git a/debian/patches/series b/debian/patches/series
index 0f52ac1..5c433c5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+NPE_null_scroll_pane
 load-bundle-i18n
 scala-property-comments

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libjsyntaxpane-java.git



More information about the pkg-java-commits mailing list