[kepler-dev] [Bug 5508] Link to "Additional background information on Ptolemy" brings up empty page

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Mon Nov 14 14:54:08 PST 2011


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5508

Christopher Brooks <cxh at eecs.berkeley.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
       Hours Worked|                            |5
             Status|NEW                         |ASSIGNED
    Remaining Hours|0.0                         |1.0

--- Comment #3 from Christopher Brooks <cxh at eecs.berkeley.edu> 2011-11-14 14:54:08 PST ---
This is a Java 1.7 problem, I'm able to replicate the problem under Java 1.7
under Mac OS X.

I checked in a fix:
bash-3.2$ svn diff -r 62410 ~/ptII/ptolemy/actor/gui/HTMLViewer.java
Index: /Users/cxh/ptII/ptolemy/actor/gui/HTMLViewer.java
===================================================================
--- /Users/cxh/ptII/ptolemy/actor/gui/HTMLViewer.java   (revision 62410)
+++ /Users/cxh/ptII/ptolemy/actor/gui/HTMLViewer.java   (working copy)
@@ -53,6 +53,7 @@

 import ptolemy.gui.Top;
 import ptolemy.kernel.util.StringAttribute;
+import ptolemy.util.ClassUtilities;
 import ptolemy.util.MessageHandler;

 ///////////////////////////////////////////////////////////////////
@@ -356,6 +357,16 @@
      *  @see #getPage()
      */
     public void setPage(URL page) throws IOException {
+        URL jarURL = ClassUtilities.jarURLEntryResource(page.toString());
+        if (jarURL != null) {
+            // Under Java 1.7, JEditorPane.setPage() handles jar urls
+            // differently.  In Java 1.6, setPage() would correctly open
+            //
jar:file:/Users/cxh/ptII/ptolemy/ptsupport.jar!/doc/mainVergilPtiny.htm
+            // even though doc/MainVergilPtiny.htm is in doc/docConfig.jar,
+            // not ptsupport.jar.  So, we look up the jar URL.
+            // See http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5508
+            page = jarURL;
+        }
         pane.setPage(page);
     }

This fix should be folded in to Kepler-2.3, which means creating another
release candidate.

-- 
Configure bugmail: http://bugzilla.ecoinformatics.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Kepler-dev mailing list