[rfc] [icedtea-web] providing little bit more debug outputs for few methods

Jiri Vanek jvanek at redhat.com
Thu May 24 02:16:34 PDT 2012


>
> Can you please either back this out or change it to not make it throw
> exceptions (just printing it instead)? This patch breaks
> http://jmol.sourceforge.net/demo/atoms/
>
> Thanks for Danesh for tracing this!
>
> Thanks,
> Deepak

Hmmm.. I have look inside this, and I do not feel guilty. Actually it looks like another occurrence 
of RH816592. The fact that we see why it is failing does not mean that it caused the app to fail. 
AFAIK my debbuging outputs have not changed the behaviour at all. Adding sout printing before 
returning null and rethrowing "exception which would be thrown anyway". So the just printing WILL 
change older behaviour.
Although I addmit that I have one small mistake - fixed in attached patch. However this did not help.

The original pathc for RH816592 is solving this issue, but 1.2 is working as well! So I think this 
reproducer had to be broken much longer ago!

I'm going to attach enhanced patch for RH816592 later today.


OpenJDK Runtime Environment (IcedTea6 1.11.1) (fedora-65.1.11.1.fc16-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
ClassPreloader - javax.vecmath.Vector3f+
ClassPreloader - javax.vecmath.Point3i+
ClassPreloader - org.jmol.g3d.Graphics3D
ClassPreloader - javax.vecmath.Point3f+
ClassPreloader - javax.vecmath.Matrix3f+
ClassPreloader - org.jmol.g3d.Sphere3D
Jmol applet jmolApplet0__752170922377234__ initializing
AppletRegistry.checkIn(jmolApplet0__752170922377234__)
ClassPreloader - org.jmol.g3d.Line3D
ClassPreloader - org.jmol.g3d.Cylinder3D
ClassPreloader - org.jmol.g3d.Colix3D
ClassPreloader - org.jmol.g3d.Shade3D
ClassPreloader - org.jmol.adapter.smarter.SmarterJmolAdapter
ClassPreloader - org.jmol.adapter.smarter.Atom
ClassPreloader - org.jmol.adapter.smarter.Bond
ClassPreloader - org.jmol.adapter.smarter.AtomSetCollection
ClassPreloader - org.jmol.adapter.smarter.AtomSetCollectionReader
ClassPreloader - org.jmol.adapter.smarter.Resolver
ClassPreloader - org.jmol.popup.JmolPopup
urlImage=jar:http://jmol.sourceforge.net/jmol/JmolApplet0.jar!/jmol75x29x8.gif
*Error: No security instance for http://jmol.sourceforge.net/jmol/JmolApplet0_Popup.jar. The 
application may have trouble continuing* injected jar
error preloading org.jmol.popup.JmolPopup: Code source security was null
net.sourceforge.jnlp.runtime.JNLPClassLoader - 923 - getPermissions
java.security.SecureClassLoader - 210 - getProtectionDomain
java.security.SecureClassLoader - 142 - defineClass
java.net.URLClassLoader - 277 - defineClass
java.net.URLClassLoader - 73 - access$000
java.net.URLClassLoader$1 - 212 - run
java.security.AccessController - -2 - doPrivileged
java.net.URLClassLoader - 205 - findClass
net.sourceforge.jnlp.runtime.JNLPClassLoader - 1521 - findClass
net.sourceforge.jnlp.runtime.JNLPClassLoader - 1548 - loadClassExt
net.sourceforge.jnlp.runtime.JNLPClassLoader - 1363 - loadClass
java.lang.Class - -2 - forName0
java.lang.Class - 186 - forName
org.jmol.applet.ClassPreloader - -1 - run
1822 script command tokens
applet context: -applet
appletDocumentBase=http://jmol.sourceforge.net/demo/atoms/
appletCodeBase=http://jmol.sourceforge.net/jmol/
(C) 2009 Jmol Development
Jmol Version: 12.2.2  2011-10-11 22:29
java.vendor: Sun Microsystems Inc.
java.version: 1.6.0_24
os.name: Linux
memory: 7.0/123.7
processors available: 4
useCommandThread: false
appletId:jmolApplet0__752170922377234__
defaults = "Jmol"
backgroundColor = "black"
language=en_US
Jmol applet jmolApplet0__752170922377234__ ready

FileManager.getAtomSetCollectionFromFile(caffeine.xyz.gz)
FileManager opening http://jmol.sourceforge.net/demo/atoms/caffeine.xyz.gz
*The Resolver thinks Xyz* thsi is also wrong, ony 
http://jmol.sourceforge.net/demo/atoms/caffeine.xyz.gz exists
*Error: No security instance for http://jmol.sourceforge.net/jmol/JmolApplet0_ReadersMolXyz.jar. * 
injected jar. The application may have trouble continuing
File reader was not found:Xyz
openFile(caffeine.xyz.gz): 743 ms
eval ERROR: File reader was not found:Xyz
----
          load >> "caffeine.xyz.gz" <<


J.
-------------- next part --------------
diff -r f6eddd071004 ChangeLog
--- a/ChangeLog	Wed May 23 13:02:58 2012 -0400
+++ b/ChangeLog	Thu May 24 11:08:44 2012 +0200
@@ -1,3 +1,9 @@
+2012-05-24  Jiri Vanek  <jvanek at redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (getPermissions):
+	Originally NullPointerException was changed to RuntimeException. 
+	Rewerting back.
+
 2012-05-23  Deepak Bhole <dbhole at redhat.com>
 
 	* AUTHORS: Added Martin Olsson to list.
diff -r f6eddd071004 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Wed May 23 13:02:58 2012 -0400
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java	Thu May 24 11:08:44 2012 +0200
@@ -914,16 +914,16 @@
                 // 1. Code must be signed
                 // 2. ALL or J2EE permissions must be requested (note: plugin requests ALL automatically)
                 if (cs == null) {
-                    throw new RuntimeException("Code source was null");
+                    throw new NullPointerException("Code source was null");
                 }
                 if (cs.getLocation() == null) {
-                    throw new RuntimeException("Code source location was null");
+                    throw new NullPointerException("Code source location was null");
                 }
                 if (getCodeSourceSecurity(cs.getLocation()) == null) {
-                    throw new RuntimeException("Code source security was null");
+                    throw new NullPointerException("Code source security was null");
                 }
                 if (getCodeSourceSecurity(cs.getLocation()).getSecurityType() == null) {
-                    throw new RuntimeException("Code source security type was null");
+                    throw new NullPointerException("Code source security type was null");
                 }
                 if (cs.getCodeSigners() != null
                         && (getCodeSourceSecurity(cs.getLocation()).getSecurityType().equals(SecurityDesc.ALL_PERMISSIONS)


More information about the distro-pkg-dev mailing list