From a5c0f6fe8787df483b1fe914e13bc6576bdd3342 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Mon, 15 Jan 2007 10:25:38 +0000 Subject: [PATCH] URLClassLoader.java: Removed. 2007-01-15 Gary Benson * java/net/URLClassLoader.java: Removed. * gnu/java/net/loader/Load_gcjlib.java: New file. * gnu/gcj/runtime/BootClassLoader.java: Ensure core URL handler is present in static executables. * sources.am, Makefile.in: Rebuilt. From-SVN: r120791 --- libjava/ChangeLog | 8 + libjava/Makefile.in | 3 +- .../lib/gnu/gcj/runtime/BootClassLoader.class | Bin 1561 -> 1706 bytes .../net/loader/Load_gcjlib$SoResource.class | Bin 0 -> 1102 bytes .../lib/gnu/java/net/loader/Load_gcjlib.class | Bin 0 -> 1645 bytes .../lib/java/net/URLClassLoader$1.class | Bin 1022 -> 1022 bytes .../lib/java/net/URLClassLoader$2.class | Bin 908 -> 908 bytes .../net/URLClassLoader$CoreResource.class | Bin 1826 -> 0 bytes .../net/URLClassLoader$CoreURLLoader.class | Bin 1344 -> 0 bytes .../net/URLClassLoader$FileResource.class | Bin 1739 -> 0 bytes .../net/URLClassLoader$FileURLLoader.class | Bin 1278 -> 0 bytes .../net/URLClassLoader$JarURLLoader.class | Bin 3418 -> 0 bytes .../net/URLClassLoader$JarURLResource.class | Bin 2202 -> 0 bytes .../net/URLClassLoader$RemoteResource.class | Bin 1152 -> 0 bytes .../net/URLClassLoader$RemoteURLLoader.class | Bin 1724 -> 0 bytes .../java/net/URLClassLoader$Resource.class | Bin 1217 -> 0 bytes .../java/net/URLClassLoader$SoResource.class | Bin 1097 -> 0 bytes .../java/net/URLClassLoader$SoURLLoader.class | Bin 1625 -> 0 bytes .../java/net/URLClassLoader$URLLoader.class | Bin 1354 -> 0 bytes .../lib/java/net/URLClassLoader.class | Bin 14234 -> 14476 bytes libjava/gnu/gcj/runtime/BootClassLoader.h | 3 + libjava/gnu/gcj/runtime/BootClassLoader.java | 8 +- .../java/net/loader/Load_gcjlib$SoResource.h | 50 + libjava/gnu/java/net/loader/Load_gcjlib.h | 58 + libjava/gnu/java/net/loader/Load_gcjlib.java | 77 + libjava/java/net/URLClassLoader.h | 25 +- libjava/java/net/URLClassLoader.java | 1448 ----------------- libjava/sources.am | 3 +- 28 files changed, 224 insertions(+), 1459 deletions(-) create mode 100644 libjava/classpath/lib/gnu/java/net/loader/Load_gcjlib$SoResource.class create mode 100644 libjava/classpath/lib/gnu/java/net/loader/Load_gcjlib.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$CoreResource.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$CoreURLLoader.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$FileResource.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$FileURLLoader.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$JarURLLoader.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$JarURLResource.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$RemoteResource.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$RemoteURLLoader.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$Resource.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$SoResource.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$SoURLLoader.class delete mode 100644 libjava/classpath/lib/java/net/URLClassLoader$URLLoader.class create mode 100644 libjava/gnu/java/net/loader/Load_gcjlib$SoResource.h create mode 100644 libjava/gnu/java/net/loader/Load_gcjlib.h create mode 100644 libjava/gnu/java/net/loader/Load_gcjlib.java delete mode 100644 libjava/java/net/URLClassLoader.java diff --git a/libjava/ChangeLog b/libjava/ChangeLog index af4a1a7cfbae..ad6c1fba4ef3 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,11 @@ +2007-01-15 Gary Benson + + * java/net/URLClassLoader.java: Removed. + * gnu/java/net/loader/Load_gcjlib.java: New file. + * gnu/gcj/runtime/BootClassLoader.java: Ensure core + URL handler is present in static executables. + * sources.am, Makefile.in: Rebuilt. + 2007-01-14 H.J. Lu * Makefile.am (libgcj_la_LDFLAGS): Add diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 0f052e67b9d3..e03542934f2b 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -1922,6 +1922,7 @@ classpath/gnu/java/net/loader/FileResource.java \ classpath/gnu/java/net/loader/FileURLLoader.java \ classpath/gnu/java/net/loader/JarURLLoader.java \ classpath/gnu/java/net/loader/JarURLResource.java \ +gnu/java/net/loader/Load_gcjlib.java \ classpath/gnu/java/net/loader/RemoteResource.java \ classpath/gnu/java/net/loader/RemoteURLLoader.java \ classpath/gnu/java/net/loader/Resource.java \ @@ -4402,7 +4403,7 @@ classpath/java/net/SocketTimeoutException.java \ classpath/java/net/URI.java \ classpath/java/net/URISyntaxException.java \ classpath/java/net/URL.java \ -java/net/URLClassLoader.java \ +classpath/java/net/URLClassLoader.java \ classpath/java/net/URLConnection.java \ classpath/java/net/URLDecoder.java \ classpath/java/net/URLEncoder.java \ diff --git a/libjava/classpath/lib/gnu/gcj/runtime/BootClassLoader.class b/libjava/classpath/lib/gnu/gcj/runtime/BootClassLoader.class index 1635a30404009ad59a0701f9777d1e354cba70ec..857b7a17cbae26fe6ebc9f2d9185e45cd236f5bc 100644 GIT binary patch literal 1706 zc-nK?OpZZTg}W@D+(r6SSZ>eq461xXxxTbF*pfujtS4 zt4?QNrp~kA9P2i~(zAvU~4+o_o%D&VBa&{m<`z0H|OmhdzM|`*F+N_g}iY z6(?asx_6aI)*`RjtSK*$I){FNi@ix3GCGjDD@|a~S6Xg(aS)l=XziuW#S%al_+0Du7Pwj%+nAUvM~TlV7L~> za;w$Yllrl@7fAu9rhG5j^>k?F*`l?Y(Vbc7lCzWOFy3ET+%4b~#%zpWTwrRUS8%&7 zrsXj~d=o9pI8eGNgK`k+W`TkxZG4VVZuf%VUZ|y?C>_dXRjbA$t!Pp5OCDbcoM(My z8d%N@{17RJ^8$9K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?x`wZE8G6XgAam>S_o@&d_~|-ea_+&M~+fJHznLZv<$^Fz(a00po<|^ME}B z??p4M+A-o;$1s71n4}RHC?!Lb*6?OAJRs5-nh=LUBu2godOq@`GCcOEl6F*NBszJD zr>WR4w5r*Q)G_=YSt@oyo*LQ^CjXL}ZYmMP@)J#?8xzJ9IxvGS%vC9gRFp)>rj+>U z-7$-oo{~Atm)kT=>jrxIRn}K0G%ICMZ3GrQVpqwdLiCr3jO^tfaI8QimLEFDBC>2= z-uK;8-|Ovm!$T2=!^jmnvV@IU_%VWz8Ad)~$(|tI9okJo{+Sne$pPU}#hxSB{JXY# zM98+nV__hJMH4zq!p>|K#@j05ssgwT6FKAw%eEJYSHrWOh~7FqpWD1@hpyuvIguy# z>0vfG@nS;5{(np4Xd?h&d+uc1QC}pTU@%O&NhF*z!fK^Dn%4`hsRTof_D5F?5-$v5 z9XALo6WHrX#=uS7(y>7>r%f|)8=EW^4n)ujgFv_vOjsX_rMN%2rh#qT(Xm4)&qkQI zjxu}X@(E$>Up#~Yk7$dapPcY(s8l=b5T7uLP`acqr|c>pUwHBYN>gU-Ng&VFVd|*m zJ8>-7hdsjP9G4a6_C0!MG4sr+KC{tZU0@fF3-yw$MG z|0R`r%!N;2;3-PH+Zw@fg$bde6ZGkW%uzPwAXHFIE3LFL dC!0CHRQz(PIF}Y{sHuOQMP;+H`~lOf{RSXA@nrx2 literal 0 Hc-jL100001 diff --git a/libjava/classpath/lib/gnu/java/net/loader/Load_gcjlib.class b/libjava/classpath/lib/gnu/java/net/loader/Load_gcjlib.class new file mode 100644 index 0000000000000000000000000000000000000000..3293b2e59e7c578a976c1a50f872f709a356f18e GIT binary patch literal 1645 zc-oazTTc@~6#fQUN|#k?MWo2ZR*>Fc#VcCGOA~_0$^#V=eKFhZ&@S0-&30?T5Aelb zgNcIC#8(r4l<~~$7AUkdKJ4zDbo#unntQfYjv&M^-OXuxOV_2vFjV9A2Vo?2;YpF2+j2as&b3m_aCt?y${W(9 zK+da{V|i-~pVIm@gquKNk3wn=)CC}wXeZz1nHg}7LS>uHcjE?Ney7Ko zzswFpsMx4*1%nt-5y7y6OBjvdGJ|^BRYeR}7$Q~fty?x{7)xh-EZcCZ8fCVeY9R`S zt18BDjUnbVirn=Cda2QJO^TWHBbwZ7xt6!Do$M79Tt^~;iC`ob^iahlZZIgjmQ&dX z8edJH;?mK{a};}1c$eurK2hJaiZF&4Ms>^Ko2`18yKjuLXh~den1;P$xR&@27DHam zYPO|ufzn7CBc@<(2dYZ+lm|oD6vJo8{fAO$c)PwN7*hRZ!!X!#ZHCL8iXoOpx!JH= z9^V$*!z2jFjbT20zT26zbCH8yQlTNw5EU~FqNB3-O`|Rwc@Bv3Ql>5545W0oYqDfcjFLuYWxW#MI8B21 aElc>AtU_>IlPJ&doW2U}tgu86;WyC!b(80|2b*2`>Nu diff --git a/libjava/classpath/lib/java/net/URLClassLoader$2.class b/libjava/classpath/lib/java/net/URLClassLoader$2.class index 64c9e24573b0d59374d7712803576b5f5d59b436..741aa3bf03ffe0692c4c8625f7e1df044691fb13 100644 GIT binary patch delta 29 kc-re>?_uA-$jrnXJeir?_uA-$jrn#XEHOhCl~7i1`gJR4E(GMCWkSb0RUvn29p2) diff --git a/libjava/classpath/lib/java/net/URLClassLoader$CoreResource.class b/libjava/classpath/lib/java/net/URLClassLoader$CoreResource.class deleted file mode 100644 index f37294203816396a639c8c2f7fd6b5660afcaf1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1826 zc-oCrSyR(c6#i~lLSqCeDz2p}YFi4yeJSEnL94+9u*zd-uO&`Mm^4*?g}=lHok5t9 z8GZM~<-r%f?Ykh%AsbG~!Fv*pdtm#+XE!JG<(VeoFb?F{i&mNhGe_5y(zy3LYXF-nC8hH#Q0xoa(wJZef8 zj^&n&nZUQ*66rd}Y}XFP8LlPFe{msE^_5xgr8!pHv zs}orAy}&DYjv;y}3)y3o_`c_Bm_$y*xh5N) z7jIL?6mHNkh{euYl`^eHx{?3vg6};ND^pA152=b<46!<=Da*O<`HQ?r+W~p&#}4u;ZX%K*Zz8tfu@k#UvRlSy*dt?~B#p4w*ASaaEu&`@@n`k8okFL4 zl(F=xT^Nhj3xgs5qjU;gm%uOM;L|_wpBnI8b^H+0A^u6oZ*&dAf`hS)qjdCEucxD9 zD>%1`>@#x>lXI)MI+Y$;!S%c8*V1DQ1GpK+i&554K2v?ZU^kru%2&jdZ%8QLF{1pC mJmS?@A&)rK=QgIvQ-Zk7V3s^7xFa*j<1U?=%x)a_u;UjzvcK#A diff --git a/libjava/classpath/lib/java/net/URLClassLoader$CoreURLLoader.class b/libjava/classpath/lib/java/net/URLClassLoader$CoreURLLoader.class deleted file mode 100644 index 050f529734c058f06e8ccac681ce9cf564474568..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1344 zc-oCrZBr6a6n^ePtgag1F!Rk7_!15e5VrKd_uV=Q;Oz?s?fie^0&vSi(yg62nZ{I55&Schm2;^sHr6t9r#K zawnFpIGkLKHyM70Xg_ER#^5WO^bG4B)H3W+dfRnOyOd!FteUpzt}$qFz0XORjzA`n zWAJAyMXtbyAr&$P2ElMyMGzqdId4>jM228zo`MmK$_O*4?S2(w7^k!ncQ;InGmOO( z-9iP!6&05dU&KKXdxsk7ku&PQOqssT4y65wy-~ z7U^3Ks%Ooy2v3r?c(qb<3PiUY?^d1Y%iYY&$e5;^ozGmanHIqm#4sykhGFwQCBV>7G38c&gYVhS>j_+AOYu z6|9Q8K4y3wzu+8n^LNsF<8K>#V!{gK5OdxEU{JO_`o=hqcCsyqlJld=dfmozf@X@z|K@$5wmP9|=Lh=lf^?{-y9@dhnBPg2o8EPHFUoi2>!%osO zC=k*K0@5i)q_2pO?^YuVS8)yStm~MfGlg{nA&=!Ip&BeMaSOb5is%keOdR9(5faHd zQgtjIR*}9OPw@Ssnx-@X+i^)#E~Pc47bk(x4U{A}4Nol2kZk4bM(cI& zPrXPyR+U=OKJ*Qtws}aUl1N2@_x`A=->lagQwZW=cW2HybH49<=gj`|@81srOk&x9 z6d3*3`NWyM-Y(aidfoP&6%~xmxHUDe>V6}rDg&JYBYQ=*q69i`@sPj)I|_CE z37w=Quh zY1{SG<;MC=6)ZY8HPt@buR67g6S#UG8#}`_w@v{2d9=~x)grUN@#n0Lj8;`R>uof` zg)mUgy1-yApVZvuV5m9$SygR>uJ6?iWCi+@uq%nj#9_Q>;D~_LE}Vs7yd===)~DP+ zRYO1cT%aSDziv{Lmn|H{D`Zb9q$cn}i$cu5WMT}*4IFD_jqMh4$dH%6p}Zzb0|i#l zj@(v)i9CwBXRiwM=ALY9MvS=Ksp$PB3m<^3N$LAjb{cg~XED|= z%CNW=_@C;jE#;qTHE>yAI3YOa)Nc8~x>_NbWOxJw(~j8Bj$%us%ebt)2Y)@P3(=LB ziT(opk6(ck`WPo^mih#dU2&e5T6#QrXBgXl&+r;&wu65zwo2b-t~&V`*iTD}tE-Ta zzq>HL1G7-PkDfodl}Ph_K)d7@=#pQ;lwUCgFwzW1FZzIJ)sF!t(<==ixjKjpzk?AN zTO9%2;5qFZDg1?=Z4CX4p29Zu8{fw0)&u01wS5QUTM2rfrYgTC^0!FK?=T>5M+`E} zJTZebQBPokID*Aa#$|mImo=849c-b!K3Ckvnaw4++4PleZ}L!@G_!n~(8E*+@_R!6 zK807@^=i%Kia^vF?fo$EBKHZdU^gT=9xiaAyRS? O*Z4IfeJc0}hyDZd{*d|r diff --git a/libjava/classpath/lib/java/net/URLClassLoader$FileURLLoader.class b/libjava/classpath/lib/java/net/URLClassLoader$FileURLLoader.class deleted file mode 100644 index d750821a99e68f363b88448ffa4f5d12f5db51e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1278 zc-oCqZBNrs6n<_usdQyb-Uhy)$dGm$3{eps;tOg*QZ)gY!7p0IbzD+f(sl+v`ZM%b zV4^IM#2?^~GM?M5!~r9w>FvGe zEYIHLe(t$&IGLI!6-kD%PN7F(42exaYubuJg;$a&WrnT=;fipPVcxJhpp@Gj$4+L2 zA-Uvjat#Tjbf`G5qK85Mw~mHhTu_mT&8=h|eduRUYdn-u3pL6Ve{F9_&_2tn+D^sxg*>;6$#6>q43pM> ziA*}Bs?zDS#2o3U6$xGUog<-RnFzq%2t21A@-^vBQO_$p@ale**vy^QR!3@aUZl)~ zROSZ5xY2&Ir|Bf)4IL)(3>hM@WV@a#NSvnnnOOZ8L&g_%OktYlgzt$UB*_wn`Bpk+ zbedFhq(tyk_`Di={wEc;7;=xSDnH3fD4E?cj`PH+%D&Gx- z=hFSU_D*#7CuAVshp1g`HDc22y}!Niv`nLEU3OjWM|K{lc*KzHz?7k(M66k`a73(td$>;s a84ROLDk$_UM6Er*B7HUTF+9X$4F3fe7c_YQ diff --git a/libjava/classpath/lib/java/net/URLClassLoader$JarURLLoader.class b/libjava/classpath/lib/java/net/URLClassLoader$JarURLLoader.class deleted file mode 100644 index 11c1e9dc61ad6a38e1a3b63e0f8b4aad06d836dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 3418 zc-oCu>vI!T6#t#RHrZ}VNhx-#R2~J=2ZV=$CKQEQppZhLkP=W}({9_8bQd=pDfRt8 zKvaCo!#4`P(Beos*cr#snKI)SXY`YP(Z57JcQ;K_N&sd^ZtgwjchBQ@&bj^d-yePi zupE~q6cFkLw8yl7q1%C7JHjmqEtw3PT90nkZPqN_aeqiCBFxJtnH3{Q1De$vPw0d@ z!j5>#jwb@V8DO{#d=MhYF)gXP=!EicE-IgTy9IKGX7>|(IT#VW+cqs0C|MIX;`Um? zeg1GBi$YUDr~ays5QhjgQd(Bz+P&U6c1Q$im22?g^40;xek zqwvsUo34x(ge3~RkUa>nF?^-WOj#*m1!pu*v=!WgdkK|&y3Gd+q-%qlG@~aW2ocC{ zTLx*0LP(@ywebBu!dm~0@|cTs6QKHtfC?%IVGZZdPCE6w>;=3&|Db@pbM>D!eW0u0!|@! zMCkM@h>Obd8v2m!fC@Gq6i5lef?E<>pzMXAz{DZ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%h?kjl=50tbPA(_MUKBM+=CZr&ZT1geQbHcPR!#*BP`Vqc6OQJExUtpZGTN)}9Ow--7Gjq;2-#2sS<)6n-0rX%}!6w3i+xi_n zVF@>JWimZ#>bYFn)@Ov%HYw(9SFq9lRuCZUDHmJ}BUEM`+qE;cNvKJC@uqIgCN8;- zVa+B9p<{++xI=_^EM4ZfWQilGO%Vd4_KXOl0udDoD#O@`i`?lYMbIeWp$a0b1x)kM}y$KU61-KAnTnhDCZo|7p`+g=q7 zXbhtb`xWdX)R#F)#R0@vF3yD=j4Sl{aow6RC8@-QIhAZk%F4xM4ciGrr5%u5ebPDy zX;bp3P8D59uyS@*SfjROiHvL57NIHjk1|Ccr_h5#3JwzL){and7)J=zOqh+Xu-vq; zX5Be1Q%p@bEgBIO+=OvnDaRX0#RxhAKSHl^ScH%8HU{?y%!$od5c zSo%EoY&f%`C=KOG!ehZKNK7gI$Q9(QT@#pxj8o8u0WNvO#|(K#x0UkjlDm0Eq!`HY z?1FD_^dI)<=F3pQGm$U8oCv(y#D5+$Y}w4KE9{m2XuQ2+3E_B09_l01Jn#ay^Rr62 z=@k!?*F2Nnpq6dB{Vk|NJ>aeQvhjg()r4jbVh37$2#PSA!j@Z4u;qIEA$GR&V-Npp z@@QRxc8)PSCOY%z?hWv>cOcmL90T`I-}wv!c^vBv)rP8P%;0?lX|XZ*0yR%Ce4X=c z4AusgaAJ`buhOCiI)WQG$-k@K+b1x@NrB#>p5CH?-lK&+pp`yCqfh9jFX*Gs-0oj7 zLf>$bz9U6HaE*TA2K~ZK`t1=O_X!jU-@+Jc$wg;GpKuEXahl^Q(272!a0UTre4EZ9 d&ARs^f^%#OapZ(2?Ri|_cbLy09#R+4@E05py!rqD diff --git a/libjava/classpath/lib/java/net/URLClassLoader$Resource.class b/libjava/classpath/lib/java/net/URLClassLoader$Resource.class deleted file mode 100644 index bb4d13a6ba0a72e9ef51b3a99bc7dd0e3170d131..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1217 zc-oCrZBNrs6n@Uu(QTBsfq;mz0pebeD!ymNFGP|hjU=EX#!q+U3MHc@ZD;gfVSr_{JH0Q@e9IA`9JWLU4pR@ z?8!XR7`9--BBaZe-5dy`7BUzjj5(e!U$u{#GJGwXElDUifh$_OBJ|X~qcq|JFCr{D zgDT}LNA_i`Xm_-NFkh}DZjp4`p%;I$FRk@F=Q3?!2D6-ta+G20z4u%ZOXgcDSKj^O z>oUOZLDh4Z!@P+bgwnvCSh$H>JPAKg5qguH>z|^DB4M_lSG%S8MpUJ zqqxcitf&dxA*^4WU43AIYK|GD<%X07qIpZWjXH_(ZsWUDgdE!(>F>t}dKDU+DQg=3 zaXa3LLn)33GhHt)uzL*boPYVzmB+Cc_>qZq!sG>P>%zjQq%WJE+MCI%lUP$81gqiu zGSqs>p`I{lpV1Mr-OVzJyeet_)p22JcUe-ei7ab!ENvpi50I~(@mu?Xkx$SJO$e8$N;a1ULnLzlrk%BW~MUj7cbNE9_a#A^v8H=Wd8#5fF1Av diff --git a/libjava/classpath/lib/java/net/URLClassLoader$SoResource.class b/libjava/classpath/lib/java/net/URLClassLoader$SoResource.class deleted file mode 100644 index 4e7417a7d6328318c4fd85785fd9bfef2c8e0e64..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1097 zc-oCpO>fgc5PiG(aN;^`X&^1-E3_%ZNomT3OQ0M=k%BBL8pz#sSFMq2N4A6bQ5=c{ zMdH8@;71{5*N#amEI8Pnoq6-#%=7;I_5BBc$Jo`t88+VAAMBnl;@-PMYv9>YWCixI z2wS7zP(;BrbcBW?Lo*LILopPlp~tXj%_I8^<)^Oi#(NA;+E%_8C6c&*x!)W!6bHev z&{4pG0SyMjgM6kxJm$Cx8pl8hWriio^~LMy*^vm}+D9IZyJ7{7?TziwmFF~Bj8EN& zp=JHs7P*?Ik_=n_wHZxwBI2PxnZ~0y6!sazYTHa&-JmyDAgI3o(Gio_4g5&MO@?{~ zJIE?JZsCrG+YH9MzJa^AM`FQ5_=CXrg(JZX>oc+0oLQ}}<32VuY%nzbjxcZo4f4mK z48vL;4?~q!w1j^WpVEzJn?rJmGK6ASzM?O;94Rkfy3+jmW$$(*mR1`Qd#Lh)tk@yb za?DnAv)_YV`uhdC>7*;K07XT5G*l>4rRWW~sxNf9-=KH4zoPb;jvPz$UX&&N3?;q? zoj)fEpqapN4J&|(>bOp1GLizEA~K1-t4fS)QbPL_$y%-R1+@#TTipvZ&oe1q7Wn`b z{zAz#5^yS0A?g;kh=Q&?9;UNzt24FnPZ>{HX80?`VIq>JC>Txr z)x{`dvp0iLT+7^aTxQ`>a8Z@%5PcFK0OYE|qa z_onj|+6d+DN|Ebe=r*9jVA!~6bSqY`<+yyWc5=wQH}+wfGxS@Pf?Yna zJx8p=&6t1WR2gQh8%RZUbr*!G97>Xi%#NX>=9L+4T}@0!2fB5PAfaNE!Du!b7{eU~ zwZ#1wj!11Vl@6lIwp%juzUR25oJQ*0GjJc{41I28hkL#dEnlg51&SF9BC5Pl^Bn)P z*{~6J5>qNB8OGc6&%iWh81xU0TigwsUP?9P(%OgS6r)pkpKg0}M16AxI?+X9S5CR- zIYmzDFvLk1Nle{JwX&xF&rcSdHL!pTgC=STqcz#XJ^MtSi54K@C8m8|4JBQVCcEai zT*gWE6$7hSqdp7v2I6E}#GHzU1?D5QeHhTg6 z3(Xbu&{wAsN)oCviCeUu2>j5CK0wZHqhI32F@QngE$)sG_Y<)RrUchKyCVM_QVy2}HoLa0z8gj#-`{f$m`_7m&xG9=kX1G-;i pt1LrPR;ZFy^eSsj(lu9+lQbHwgDMnkN|Y^ZOX(RsPw)(*{{TFzgH8Yd diff --git a/libjava/classpath/lib/java/net/URLClassLoader$URLLoader.class b/libjava/classpath/lib/java/net/URLClassLoader$URLLoader.class deleted file mode 100644 index 8b272bdb36db93f3e4839605d8c5f2ffc5439748..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc-jL100001 literal 1354 zc-oCq(M}Ul5IwhDX(=mIzyhUe5z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jF+VJE= zl#SW5G?HU7s%R>o)MVAw0Dx1QK{GTtC1L8k3 z^Ncd8Mc;B`rhTMU4iniUHDpn;Op})*4XxADRKL!#B&au2rN37zYV8-FXycvW zrC6KLqfJa{le=l2P31Lmx~5g9wCRo#6=QU!JzCzQ&BCa^Pd@YI1F)gN;jGZzlnVViV&&P+gc>~wEBxjvG`=!KLXThL#o=?96or9Q1R1N7rOZu-Z zJP6b+YOa1#t35zdd#T(B`LxBjuj+KXqMdoPS6kXzRo$c29oAMnK`aRH_0as>M9#U7 z>qr@&0cNkKBI8DyXnc;Q8J`DcZ>9w(KWN-aD~(%dm2nR>8~5g@<2h;erRF?sDQdF4 zoCcHz;MZ2+K2`zC2O%z1=+YXr)oIz+q;WddSLH7)Q3$NGvk|ZjkQV-B9yT?t(f)1H zno-6P({F@+uTd^;M!6Pw%vC7Qp-CDtdTj&D>WwHjqP+>_X0-RAY(;wu%5%}a7Uedy c&qH|u+Sj8DqP-nu8%^RH?4uQFOP%t60rT)A7XSbN diff --git a/libjava/gnu/gcj/runtime/BootClassLoader.h b/libjava/gnu/gcj/runtime/BootClassLoader.h index dbfd1567162b..df9fcdbe43bb 100644 --- a/libjava/gnu/gcj/runtime/BootClassLoader.h +++ b/libjava/gnu/gcj/runtime/BootClassLoader.h @@ -37,6 +37,9 @@ public: ::java::lang::Class * bootLoadClass(::java::lang::String *); ::java::net::URL * bootGetResource(::java::lang::String *); ::java::util::Enumeration * bootGetResources(::java::lang::String *); +public: // actually package-private + static ::java::lang::Class * coreHandler; +public: static ::java::lang::Class class$; }; diff --git a/libjava/gnu/gcj/runtime/BootClassLoader.java b/libjava/gnu/gcj/runtime/BootClassLoader.java index 84952359aabb..731703ab8f34 100644 --- a/libjava/gnu/gcj/runtime/BootClassLoader.java +++ b/libjava/gnu/gcj/runtime/BootClassLoader.java @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation +/* Copyright (C) 2005, 2007 Free Software Foundation This file is part of libgcj. @@ -8,6 +8,7 @@ details. */ package gnu.gcj.runtime; +import gnu.java.net.protocol.core.Handler; import java.io.IOException; import java.net.URL; import java.util.Enumeration; @@ -21,6 +22,11 @@ import java.util.Enumeration; */ public final class BootClassLoader extends HelperClassLoader { + // This forces the core URL handler to be included in statically + // linked executables. The line that adds core:/ to the search + // path fails otherwise. + static Class coreHandler = gnu.java.net.protocol.core.Handler.class; + BootClassLoader(String libdir) { // The BootClassLoader is the top of the delegation chain. It does not diff --git a/libjava/gnu/java/net/loader/Load_gcjlib$SoResource.h b/libjava/gnu/java/net/loader/Load_gcjlib$SoResource.h new file mode 100644 index 000000000000..da8a2aca194a --- /dev/null +++ b/libjava/gnu/java/net/loader/Load_gcjlib$SoResource.h @@ -0,0 +1,50 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_Load_gcjlib$SoResource__ +#define __gnu_java_net_loader_Load_gcjlib$SoResource__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class Load_gcjlib; + class Load_gcjlib$SoResource; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + } +} + +class gnu::java::net::loader::Load_gcjlib$SoResource : public ::gnu::java::net::loader::Resource +{ + +public: // actually package-private + Load_gcjlib$SoResource(::gnu::java::net::loader::Load_gcjlib *, ::java::net::URL *); +public: + ::java::io::InputStream * getInputStream(); + jint getLength(); + ::java::net::URL * getURL(); +private: + ::java::net::URL * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::Resource)))) url; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_Load_gcjlib$SoResource__ diff --git a/libjava/gnu/java/net/loader/Load_gcjlib.h b/libjava/gnu/java/net/loader/Load_gcjlib.h new file mode 100644 index 000000000000..69d2ef5ac6f5 --- /dev/null +++ b/libjava/gnu/java/net/loader/Load_gcjlib.h @@ -0,0 +1,58 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_net_loader_Load_gcjlib__ +#define __gnu_java_net_loader_Load_gcjlib__ + +#pragma interface + +#include +extern "Java" +{ + namespace gnu + { + namespace gcj + { + namespace runtime + { + class SharedLibHelper; + } + } + namespace java + { + namespace net + { + namespace loader + { + class Load_gcjlib; + class Resource; + class URLStreamHandlerCache; + } + } + } + } + namespace java + { + namespace net + { + class URL; + class URLClassLoader; + class URLStreamHandlerFactory; + } + } +} + +class gnu::java::net::loader::Load_gcjlib : public ::gnu::java::net::loader::URLLoader +{ + +public: + Load_gcjlib(::java::net::URLClassLoader *, ::gnu::java::net::loader::URLStreamHandlerCache *, ::java::net::URLStreamHandlerFactory *, ::java::net::URL *, ::java::net::URL *); + ::java::lang::Class * getClass(::java::lang::String *); + ::gnu::java::net::loader::Resource * getResource(::java::lang::String *); +private: + ::gnu::gcj::runtime::SharedLibHelper * __attribute__((aligned(__alignof__( ::gnu::java::net::loader::URLLoader)))) helper; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_net_loader_Load_gcjlib__ diff --git a/libjava/gnu/java/net/loader/Load_gcjlib.java b/libjava/gnu/java/net/loader/Load_gcjlib.java new file mode 100644 index 000000000000..ea392041f91f --- /dev/null +++ b/libjava/gnu/java/net/loader/Load_gcjlib.java @@ -0,0 +1,77 @@ +/* Copyright (C) 2007 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +package gnu.java.net.loader; + +import gnu.gcj.runtime.SharedLibHelper; +import java.io.InputStream; +import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; +import java.net.URLConnection; +import java.net.URLStreamHandlerFactory; + +/** + * A Load_gcjlib is a type of URLLoader + * that loads classes and resources from a shared library. + */ +public final class Load_gcjlib extends URLLoader +{ + private SharedLibHelper helper; + + public Load_gcjlib(URLClassLoader classloader, + URLStreamHandlerCache cache, + URLStreamHandlerFactory factory, + URL url, URL absoluteUrl) + { + super(classloader, cache, factory, url, absoluteUrl); + helper = SharedLibHelper.findHelper(classloader, url.getFile(), + noCertCodeSource, true); + } + + public Class getClass(String className) + { + return helper.findClass(className); + } + + public Resource getResource(String name) + { + URL url = helper.findResource(name); + if (url == null) + return null; + return new SoResource(this, url); + } + + final static class SoResource extends Resource + { + private final URL url; + + SoResource(Load_gcjlib loader, URL url) + { + super(loader); + this.url = url; + } + + public InputStream getInputStream() throws IOException + { + URLConnection conn = url.openConnection(); + return conn.getInputStream(); + } + + public int getLength() + { + // FIXME we could find this by asking the core object. + return -1; + } + + public URL getURL () + { + return url; + } + } +} diff --git a/libjava/java/net/URLClassLoader.h b/libjava/java/net/URLClassLoader.h index 25fe59ab7855..2e5f15c9bdad 100644 --- a/libjava/java/net/URLClassLoader.h +++ b/libjava/java/net/URLClassLoader.h @@ -11,14 +11,26 @@ extern "Java" { + namespace gnu + { + namespace java + { + namespace net + { + namespace loader + { + class Resource; + class URLStreamHandlerCache; + } + } + } + } namespace java { namespace net { class URL; class URLClassLoader; - class URLClassLoader$Resource; - class URLStreamHandler; class URLStreamHandlerFactory; } namespace security @@ -52,12 +64,9 @@ public: // actually protected public: virtual ::java::lang::String * toString(); private: - ::java::net::URLClassLoader$Resource * findURLResource(::java::lang::String *); + ::gnu::java::net::loader::Resource * findURLResource(::java::lang::String *); public: virtual ::java::net::URL * findResource(::java::lang::String *); -public: // actually package-private - virtual ::java::net::URLStreamHandler * getURLStreamHandler(::java::lang::String *); -public: virtual ::java::util::Enumeration * findResources(::java::lang::String *); public: // actually protected virtual ::java::security::PermissionCollection * getPermissions(::java::security::CodeSource *); @@ -68,8 +77,8 @@ public: public: // actually package-private static ::java::lang::Class * access$0(::java::net::URLClassLoader *, ::java::lang::String *, JArray< jbyte > *, jint, jint, ::java::security::CodeSource *); private: - static ::java::util::HashMap * urlloaders; - static ::java::util::HashMap * factoryCache; + static ::gnu::java::net::loader::URLStreamHandlerCache * factoryCache; + static ::java::lang::String * URL_LOADER_PREFIX; ::java::util::Vector * __attribute__((aligned(__alignof__( ::java::security::SecureClassLoader)))) urls; ::java::util::Vector * urlinfos; ::java::net::URLStreamHandlerFactory * factory; diff --git a/libjava/java/net/URLClassLoader.java b/libjava/java/net/URLClassLoader.java deleted file mode 100644 index fd70fdf2045a..000000000000 --- a/libjava/java/net/URLClassLoader.java +++ /dev/null @@ -1,1448 +0,0 @@ -/* URLClassLoader.java -- ClassLoader that loads classes from one or more URLs - Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package java.net; - -import java.io.ByteArrayOutputStream; -import java.io.EOFException; -import java.io.File; -import java.io.FileInputStream; -import java.io.FilePermission; -import java.io.IOException; -import java.io.InputStream; -import java.security.AccessControlContext; -import java.security.AccessController; -import java.security.CodeSource; -import java.security.PermissionCollection; -import java.security.PrivilegedAction; -import java.security.SecureClassLoader; -import java.security.cert.Certificate; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.StringTokenizer; -import java.util.Vector; -import java.util.jar.Attributes; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.jar.Manifest; -import gnu.gcj.runtime.SharedLibHelper; -import gnu.gcj.Core; -import gnu.java.net.protocol.core.CoreInputStream; - -/** - * A secure class loader that can load classes and resources from - * multiple locations. Given an array of URLs this class - * loader will retrieve classes and resources by fetching them from - * possible remote locations. Each URL is searched in - * order in which it was added. If the file portion of the - * URL ends with a '/' character then it is interpreted - * as a base directory, otherwise it is interpreted as a jar file from - * which the classes/resources are resolved. - * - *

New instances can be created by two static - * newInstance() methods or by three public - * contructors. Both ways give the option to supply an initial array - * of URLs and (optionally) a parent classloader (that is - * different from the standard system class loader).

- * - *

Normally creating a URLClassLoader throws a - * SecurityException if a SecurityManager is - * installed and the checkCreateClassLoader() method does - * not return true. But the newInstance() methods may be - * used by any code as long as it has permission to acces the given - * URLs. URLClassLoaders created by the - * newInstance() methods also explicitly call the - * checkPackageAccess() method of - * SecurityManager if one is installed before trying to - * load a class. Note that only subclasses of - * URLClassLoader can add new URLs after the - * URLClassLoader had been created. But it is always possible to get - * an array of all URLs that the class loader uses to resolve classes - * and resources by way of the getURLs() method.

- * - *

Open issues: - *

    - * - *
  • Should the URLClassLoader actually add the locations found in - * the manifest or is this the responsibility of some other - * loader/(sub)class? (see - * Extension Mechanism Architecture - Bundles Extensions)
  • - * - *
  • How does definePackage() and sealing work - * precisely?
  • - * - *
  • We save and use the security context (when a created by - * newInstance() but do we have to use it in more - * places?
  • - * - *
  • The use of URLStreamHandlers has not been tested.
  • - * - *
- *

- * - * @since 1.2 - * - * @author Mark Wielaard (mark@klomp.org) - * @author Wu Gansha (gansha.wu@intel.com) - */ -public class URLClassLoader extends SecureClassLoader -{ - // Class Variables - - /** - * A global cache to store mappings between URLLoader and URL, - * so we can avoid do all the homework each time the same URL - * comes. - * XXX - Keeps these loaders forever which prevents garbage collection. - */ - private static HashMap urlloaders = new HashMap(); - - /** - * A cache to store mappings between handler factory and its - * private protocol handler cache (also a HashMap), so we can avoid - * create handlers each time the same protocol comes. - */ - private static HashMap factoryCache = new HashMap(5); - - // Instance variables - - /** Locations to load classes from */ - private final Vector urls = new Vector(); - - /** - * Store pre-parsed information for each url into this vector: each - * element is a URL loader. A jar file has its own class-path - * attribute which adds to the URLs that will be searched, but this - * does not add to the list of urls. - */ - private final Vector urlinfos = new Vector(); - - /** Factory used to get the protocol handlers of the URLs */ - private final URLStreamHandlerFactory factory; - - /** - * The security context when created from newInstance() - * or null when created through a normal constructor or when no - * SecurityManager was installed. - */ - private final AccessControlContext securityContext; - - // Helper classes - - /** - * A URLLoader contains all logic to load resources from a - * given base URL. - */ - abstract static class URLLoader - { - /** - * Our classloader to get info from if needed. - */ - final URLClassLoader classloader; - - /** - * The base URL from which all resources are loaded. - */ - final URL baseURL; - - /** - * A CodeSource without any associated certificates. - * It is common for classes to not have certificates associated - * with them. If they come from the same URLLoader - * then it is safe to share the associated CodeSource - * between them since CodeSource is immutable. - */ - final CodeSource noCertCodeSource; - - URLLoader(URLClassLoader classloader, URL baseURL) - { - this(classloader, baseURL, baseURL); - } - - URLLoader(URLClassLoader classloader, URL baseURL, URL overrideURL) - { - this.classloader = classloader; - this.baseURL = baseURL; - this.noCertCodeSource = new CodeSource(overrideURL, null); - } - - /** - * Returns a Class loaded by this - * URLLoader, or null when this loader - * either can't load the class or doesn't know how to load classes - * at all. - */ - Class getClass(String className) - { - return null; - } - - /** - * Returns a Resource loaded by this - * URLLoader, or null when no - * Resource with the given name exists. - */ - abstract Resource getResource(String s); - - /** - * Returns the Manifest associated with the - * Resources loaded by this URLLoader or - * null there is no such Manifest. - */ - Manifest getManifest() - { - return null; - } - - Vector getClassPath() - { - return null; - } - } - - /** - * A Resource represents a resource in some - * URLLoader. It also contains all information (e.g., - * URL, CodeSource, Manifest and - * InputStream) that is necessary for loading resources - * and creating classes from a URL. - */ - abstract static class Resource - { - final URLLoader loader; - - Resource(URLLoader loader) - { - this.loader = loader; - } - - /** - * Returns the non-null CodeSource associated with - * this resource. - */ - CodeSource getCodeSource() - { - Certificate[] certs = getCertificates(); - if (certs == null) - return loader.noCertCodeSource; - else - return new CodeSource(loader.baseURL, certs); - } - - /** - * Returns Certificates associated with this - * resource, or null when there are none. - */ - Certificate[] getCertificates() - { - return null; - } - - /** - * Return a URL that can be used to access this resource. - */ - abstract URL getURL(); - - /** - * Returns the size of this Resource in bytes or - * -1 when unknown. - */ - abstract int getLength(); - - /** - * Returns the non-null InputStream through which - * this resource can be loaded. - */ - abstract InputStream getInputStream() throws IOException; - } - - /** - * A JarURLLoader is a type of URLLoader - * only loading from jar url. - */ - static final class JarURLLoader extends URLLoader - { - final JarFile jarfile; // The jar file for this url - final URL baseJarURL; // Base jar: url for all resources loaded from jar - - Vector classPath; // The "Class-Path" attribute of this Jar's manifest - - public JarURLLoader(URLClassLoader classloader, URL baseURL, - URL absoluteUrl) - { - super(classloader, baseURL, absoluteUrl); - - // Cache url prefix for all resources in this jar url. - String external = baseURL.toExternalForm(); - StringBuffer sb = new StringBuffer(external.length() + 6); - sb.append("jar:"); - sb.append(external); - sb.append("!/"); - String jarURL = sb.toString(); - - this.classPath = null; - URL baseJarURL = null; - JarFile jarfile = null; - try - { - baseJarURL = - new URL(null, jarURL, classloader.getURLStreamHandler("jar")); - - jarfile = - ((JarURLConnection) baseJarURL.openConnection()).getJarFile(); - - Manifest manifest; - Attributes attributes; - String classPathString; - - if ((manifest = jarfile.getManifest()) != null - && (attributes = manifest.getMainAttributes()) != null - && ((classPathString - = attributes.getValue(Attributes.Name.CLASS_PATH)) - != null)) - { - this.classPath = new Vector(); - - StringTokenizer st = new StringTokenizer(classPathString, " "); - while (st.hasMoreElements ()) - { - String e = st.nextToken (); - try - { - URL url = new URL(baseURL, e); - this.classPath.add(url); - } - catch (java.net.MalformedURLException xx) - { - // Give up - } - } - } - } - catch (IOException ioe) - { - /* ignored */ - } - - this.baseJarURL = baseJarURL; - this.jarfile = jarfile; - } - - /** get resource with the name "name" in the jar url */ - Resource getResource(String name) - { - if (jarfile == null) - return null; - - if (name.startsWith("/")) - name = name.substring(1); - - JarEntry je = jarfile.getJarEntry(name); - if (je != null) - return new JarURLResource(this, name, je); - else - return null; - } - - Manifest getManifest() - { - try - { - return (jarfile == null) ? null : jarfile.getManifest(); - } - catch (IOException ioe) - { - return null; - } - } - - Vector getClassPath() - { - return classPath; - } - } - - static final class JarURLResource extends Resource - { - private final JarEntry entry; - private final String name; - - JarURLResource(JarURLLoader loader, String name, JarEntry entry) - { - super(loader); - this.entry = entry; - this.name = name; - } - - InputStream getInputStream() throws IOException - { - return ((JarURLLoader) loader).jarfile.getInputStream(entry); - } - - int getLength() - { - return (int) entry.getSize(); - } - - Certificate[] getCertificates() - { - // We have to get the entry from the jar file again, because the - // certificates will not be available until the entire entry has - // been read. - return ((JarEntry) ((JarURLLoader) loader).jarfile.getEntry(name)) - .getCertificates(); - } - - URL getURL() - { - try - { - return new URL(((JarURLLoader) loader).baseJarURL, name, - loader.classloader.getURLStreamHandler("jar")); - } - catch (MalformedURLException e) - { - InternalError ie = new InternalError(); - ie.initCause(e); - throw ie; - } - } - } - - /** - * Loader for remote directories. - */ - static final class RemoteURLLoader extends URLLoader - { - private final String protocol; - - RemoteURLLoader(URLClassLoader classloader, URL url) - { - super(classloader, url); - protocol = url.getProtocol(); - } - - /** - * Get a remote resource. - * Returns null if no such resource exists. - */ - Resource getResource(String name) - { - try - { - URL url = - new URL(baseURL, name, classloader.getURLStreamHandler(protocol)); - URLConnection connection = url.openConnection(); - - // Open the connection and check the stream - // just to be sure it exists. - int length = connection.getContentLength(); - InputStream stream = connection.getInputStream(); - - // We can do some extra checking if it is a http request - if (connection instanceof HttpURLConnection) - { - int response = - ((HttpURLConnection) connection).getResponseCode(); - if (response / 100 != 2) - return null; - } - - if (stream != null) - return new RemoteResource(this, name, url, stream, length); - else - return null; - } - catch (IOException ioe) - { - return null; - } - } - } - - /** - * A resource from some remote location. - */ - static final class RemoteResource extends Resource - { - private final URL url; - private final InputStream stream; - private final int length; - - RemoteResource(RemoteURLLoader loader, String name, URL url, - InputStream stream, int length) - { - super(loader); - this.url = url; - this.stream = stream; - this.length = length; - } - - InputStream getInputStream() throws IOException - { - return stream; - } - - public int getLength() - { - return length; - } - - public URL getURL() - { - return url; - } - } - - /** - * A SoURLLoader is a type of URLLoader - * that loads classes and resources from a shared library. - */ - final static class SoURLLoader extends URLLoader - { - SharedLibHelper helper; - - SoURLLoader(URLClassLoader classloader, URL url) - { - this(classloader, url, url); - } - - SoURLLoader(URLClassLoader classloader, URL url, URL overrideURL) - { - super(classloader, url, overrideURL); - helper = SharedLibHelper.findHelper(classloader, url.getFile(), - noCertCodeSource, true); - } - - Class getClass(String className) - { - return helper.findClass(className); - } - - Resource getResource(String name) - { - URL url = helper.findResource(name); - if (url == null) - return null; - return new SoResource(this, url); - } - } - - final static class SoResource extends Resource - { - SoResource(SoURLLoader loader, URL url) - { - super(loader); - this.url = url; - } - - InputStream getInputStream() throws IOException - { - URLConnection conn = url.openConnection(); - return conn.getInputStream(); - } - - public int getLength() - { - // FIXME we could find this by asking the core object. - return -1; - } - - public URL getURL () - { - return url; - } - - final URL url; - } - - /** - * A FileURLLoader is a type of URLLoader - * only loading from file url. - */ - static final class FileURLLoader extends URLLoader - { - File dir; //the file for this file url - - FileURLLoader(URLClassLoader classloader, URL url, URL absoluteUrl) - { - super(classloader, url, absoluteUrl); - dir = new File(absoluteUrl.getFile()); - } - - /** get resource with the name "name" in the file url */ - Resource getResource(String name) - { - try - { - File file = new File(dir, name).getCanonicalFile(); - if (file.exists() && !file.isDirectory()) - return new FileResource(this, file); - } - catch (IOException e) - { - // Fall through... - } - return null; - } - } - - static final class FileResource extends Resource - { - final File file; - - FileResource(FileURLLoader loader, File file) - { - super(loader); - this.file = file; - } - - InputStream getInputStream() throws IOException - { - // Delegate to the URL content handler mechanism to retrieve an - // HTML representation of the directory listing if a directory - if (file.isDirectory()) - { - URL url = getURL(); - return url.openStream(); - } - // Otherwise simply return a FileInputStream - return new FileInputStream(file); - } - - public int getLength() - { - // Delegate to the URL content handler mechanism to retrieve the - // length of the HTML representation of the directory listing if - // a directory, or -1 if an exception occurs opening the directory. - if (file.isDirectory()) - { - URL url = getURL(); - try - { - URLConnection connection = url.openConnection(); - return connection.getContentLength(); - } - catch (IOException e) - { - return -1; - } - } - // Otherwise simply return the file length - return (int) file.length(); - } - - public URL getURL() - { - try - { - return file.toURL(); - } - catch (MalformedURLException e) - { - InternalError ie = new InternalError(); - ie.initCause(e); - throw ie; - } - } - } - - /** - * A CoreURLLoader is a type of URLLoader - * only loading from core url. - */ - static final class CoreURLLoader extends URLLoader - { - private String dir; - - CoreURLLoader(URLClassLoader classloader, URL url) - { - super(classloader, url); - dir = baseURL.getFile(); - } - - /** get resource with the name "name" in the core url */ - Resource getResource(String name) - { - Core core = Core.find (dir + name); - if (core != null) - return new CoreResource(this, name, core); - return null; - } - } - - static final class CoreResource extends Resource - { - private final Core core; - private final String name; - - CoreResource(CoreURLLoader loader, String name, Core core) - { - super(loader); - this.core = core; - this.name = name; - } - - InputStream getInputStream() throws IOException - { - return new CoreInputStream(core); - } - - public int getLength() - { - return core.length; - } - - public URL getURL() - { - try - { - return new URL(loader.baseURL, name, - loader.classloader.getURLStreamHandler("core")); - } - catch (MalformedURLException e) - { - InternalError ie = new InternalError(); - ie.initCause(e); - throw ie; - } - } - } - - // Constructors - - /** - * Creates a URLClassLoader that gets classes from the supplied URLs. - * To determine if this classloader may be created the constructor of - * the super class (SecureClassLoader) is called first, which - * can throw a SecurityException. Then the supplied URLs are added - * in the order given to the URLClassLoader which uses these URLs to - * load classes and resources (after using the default parent ClassLoader). - * - * @param urls Locations that should be searched by this ClassLoader when - * resolving Classes or Resources. - * @exception SecurityException if the SecurityManager disallows the - * creation of a ClassLoader. - * @see SecureClassLoader - */ - public URLClassLoader(URL[] urls) throws SecurityException - { - super(); - this.factory = null; - this.securityContext = null; - addURLs(urls); - } - - /** - * Creates a URLClassLoader that gets classes from the supplied - * URLs. - * To determine if this classloader may be created the constructor of - * the super class (SecureClassLoader) is called first, which - * can throw a SecurityException. Then the supplied URLs are added - * in the order given to the URLClassLoader which uses these URLs to - * load classes and resources (after using the supplied parent ClassLoader). - * @param urls Locations that should be searched by this ClassLoader when - * resolving Classes or Resources. - * @param parent The parent class loader used before trying this class - * loader. - * @exception SecurityException if the SecurityManager disallows the - * creation of a ClassLoader. - * @exception SecurityException - * @see SecureClassLoader - */ - public URLClassLoader(URL[] urls, ClassLoader parent) - throws SecurityException - { - super(parent); - this.factory = null; - this.securityContext = null; - addURLs(urls); - } - - // Package-private to avoid a trampoline constructor. - /** - * Package-private constructor used by the static - * newInstance(URL[]) method. Creates an - * URLClassLoader with the given parent but without any - * URLs yet. This is used to bypass the normal security - * check for creating classloaders, but remembers the security - * context which will be used when defining classes. The - * URLs to load from must be added by the - * newInstance() method in the security context of the - * caller. - * - * @param securityContext the security context of the unprivileged code. - */ - URLClassLoader(ClassLoader parent, AccessControlContext securityContext) - { - super(parent); - this.factory = null; - this.securityContext = securityContext; - } - - /** - * Creates a URLClassLoader that gets classes from the supplied URLs. - * To determine if this classloader may be created the constructor of - * the super class (SecureClassLoader) is called first, which - * can throw a SecurityException. Then the supplied URLs are added - * in the order given to the URLClassLoader which uses these URLs to - * load classes and resources (after using the supplied parent ClassLoader). - * It will use the supplied URLStreamHandlerFactory to get the - * protocol handlers of the supplied URLs. - * @param urls Locations that should be searched by this ClassLoader when - * resolving Classes or Resources. - * @param parent The parent class loader used before trying this class - * loader. - * @param factory Used to get the protocol handler for the URLs. - * @exception SecurityException if the SecurityManager disallows the - * creation of a ClassLoader. - * @exception SecurityException - * @see SecureClassLoader - */ - public URLClassLoader(URL[] urls, ClassLoader parent, - URLStreamHandlerFactory factory) - throws SecurityException - { - super(parent); - this.securityContext = null; - this.factory = factory; - addURLs(urls); - - // If this factory is still not in factoryCache, add it, - // since we only support three protocols so far, 5 is enough - // for cache initial size - synchronized (factoryCache) - { - if (factory != null && factoryCache.get(factory) == null) - factoryCache.put(factory, new HashMap(5)); - } - } - - // Methods - - /** - * Adds a new location to the end of the internal URL store. - * @param newUrl the location to add - */ - protected void addURL(URL newUrl) - { - urls.add(newUrl); - addURLImpl(newUrl); - } - - private void addURLImpl(URL newUrl) - { - synchronized (this) - { - if (newUrl == null) - return; // Silently ignore... - - // Reset the toString() value. - thisString = null; - - // Check global cache to see if there're already url loader - // for this url. - URLLoader loader = (URLLoader) urlloaders.get(newUrl); - if (loader == null) - { - String file = newUrl.getFile(); - String protocol = newUrl.getProtocol(); - - // If we have a file: URL, we want to make it absolute - // here, before we decide whether it is really a jar. - URL absoluteURL; - if ("file".equals (protocol)) - { - File dir = new File(file); - URL absUrl; - try - { - absoluteURL = dir.getCanonicalFile().toURL(); - } - catch (IOException ignore) - { - try - { - absoluteURL = dir.getAbsoluteFile().toURL(); - } - catch (MalformedURLException _) - { - // This really should not happen. - absoluteURL = newUrl; - } - } - } - else - { - // This doesn't hurt, and it simplifies the logic a - // little. - absoluteURL = newUrl; - } - - // Check that it is not a directory - if ("gcjlib".equals(protocol)) - loader = new SoURLLoader(this, newUrl); - else if (! (file.endsWith("/") || file.endsWith(File.separator))) - loader = new JarURLLoader(this, newUrl, absoluteURL); - else if ("file".equals(protocol)) - loader = new FileURLLoader(this, newUrl, absoluteURL); - else if ("core".equals(protocol)) - loader = new CoreURLLoader(this, newUrl); - else - loader = new RemoteURLLoader(this, newUrl); - - // Cache it. - urlloaders.put(newUrl, loader); - } - - urlinfos.add(loader); - - Vector extraUrls = loader.getClassPath(); - if (extraUrls != null) - { - Iterator it = extraUrls.iterator(); - while (it.hasNext()) - { - URL url = (URL)it.next(); - URLLoader extraLoader = (URLLoader) urlloaders.get(url); - if (! urlinfos.contains (extraLoader)) - addURLImpl(url); - } - } - - } - } - - /** - * Adds an array of new locations to the end of the internal URL - * store. Called from the the constructors. Should not call to the - * protected addURL() method since that can be overridden and - * subclasses are not yet in a good state at this point. - * jboss 4.0.3 for example depends on this. - * - * @param newUrls the locations to add - */ - private void addURLs(URL[] newUrls) - { - for (int i = 0; i < newUrls.length; i++) - { - urls.add(newUrls[i]); - addURLImpl(newUrls[i]); - } - } - - /** - * Look in both Attributes for a given value. The first Attributes - * object, if not null, has precedence. - */ - private String getAttributeValue(Attributes.Name name, Attributes first, - Attributes second) - { - String result = null; - if (first != null) - result = first.getValue(name); - if (result == null) - result = second.getValue(name); - return result; - } - - /** - * Defines a Package based on the given name and the supplied manifest - * information. The manifest indicates the title, version and - * vendor information of the specification and implementation and whether the - * package is sealed. If the Manifest indicates that the package is sealed - * then the Package will be sealed with respect to the supplied URL. - * - * @param name The name of the package - * @param manifest The manifest describing the specification, - * implementation and sealing details of the package - * @param url the code source url to seal the package - * @return the defined Package - * @throws IllegalArgumentException If this package name already exists - * in this class loader - */ - protected Package definePackage(String name, Manifest manifest, URL url) - throws IllegalArgumentException - { - // Compute the name of the package as it may appear in the - // Manifest. - StringBuffer xform = new StringBuffer(name); - for (int i = xform.length () - 1; i >= 0; --i) - if (xform.charAt(i) == '.') - xform.setCharAt(i, '/'); - xform.append('/'); - String xformName = xform.toString(); - - Attributes entryAttr = manifest.getAttributes(xformName); - Attributes attr = manifest.getMainAttributes(); - - String specTitle - = getAttributeValue(Attributes.Name.SPECIFICATION_TITLE, - entryAttr, attr); - String specVersion - = getAttributeValue(Attributes.Name.SPECIFICATION_VERSION, - entryAttr, attr); - String specVendor - = getAttributeValue(Attributes.Name.SPECIFICATION_VENDOR, - entryAttr, attr); - String implTitle - = getAttributeValue(Attributes.Name.IMPLEMENTATION_TITLE, - entryAttr, attr); - String implVersion - = getAttributeValue(Attributes.Name.IMPLEMENTATION_VERSION, - entryAttr, attr); - String implVendor - = getAttributeValue(Attributes.Name.IMPLEMENTATION_VENDOR, - entryAttr, attr); - - // Look if the Manifest indicates that this package is sealed - // XXX - most likely not completely correct! - // Shouldn't we also check the sealed attribute of the complete jar? - // http://java.sun.com/products/jdk/1.4/docs/guide/extensions/spec.html#bundled - // But how do we get that jar manifest here? - String sealed = attr.getValue(Attributes.Name.SEALED); - if ("false".equals(sealed)) - // make sure that the URL is null so the package is not sealed - url = null; - - return definePackage(name, - specTitle, specVendor, specVersion, - implTitle, implVendor, implVersion, - url); - } - - /** - * Finds (the first) class by name from one of the locations. The locations - * are searched in the order they were added to the URLClassLoader. - * - * @param className the classname to find - * @exception ClassNotFoundException when the class could not be found or - * loaded - * @return a Class object representing the found class - */ - protected Class findClass(final String className) - throws ClassNotFoundException - { - // Just try to find the resource by the (almost) same name - String resourceName = className.replace('.', '/') + ".class"; - int max = urlinfos.size(); - Resource resource = null; - for (int i = 0; i < max && resource == null; i++) - { - URLLoader loader = (URLLoader)urlinfos.elementAt(i); - if (loader == null) - continue; - - Class k = loader.getClass(className); - if (k != null) - return k; - - resource = loader.getResource(resourceName); - } - if (resource == null) - { - String message = className + " not found"; - // Calling this.toString() during VM startup when a - // security manager is in force causes the stack to - // be unwound before it can properly be decoded. - if (Thread.currentThread() != null) - message += " in " + this; - throw new ClassNotFoundException(message); - } - - // Try to read the class data, create the CodeSource, Package and - // construct the class (and watch out for those nasty IOExceptions) - try - { - byte[] data; - InputStream in = resource.getInputStream(); - try - { - int length = resource.getLength(); - if (length != -1) - { - // We know the length of the data. - // Just try to read it in all at once - data = new byte[length]; - int pos = 0; - while (length - pos > 0) - { - int len = in.read(data, pos, length - pos); - if (len == -1) - throw new EOFException("Not enough data reading from: " - + in); - pos += len; - } - } - else - { - // We don't know the data length. - // Have to read it in chunks. - ByteArrayOutputStream out = new ByteArrayOutputStream(4096); - byte[] b = new byte[4096]; - int l = 0; - while (l != -1) - { - l = in.read(b); - if (l != -1) - out.write(b, 0, l); - } - data = out.toByteArray(); - } - } - finally - { - in.close(); - } - final byte[] classData = data; - - // Now get the CodeSource - final CodeSource source = resource.getCodeSource(); - - // Find out package name - String packageName = null; - int lastDot = className.lastIndexOf('.'); - if (lastDot != -1) - packageName = className.substring(0, lastDot); - - if (packageName != null && getPackage(packageName) == null) - { - // define the package - Manifest manifest = resource.loader.getManifest(); - if (manifest == null) - definePackage(packageName, null, null, null, null, null, null, - null); - else - definePackage(packageName, manifest, resource.loader.baseURL); - } - - // And finally construct the class! - SecurityManager sm = System.getSecurityManager(); - Class result = null; - if (sm != null && securityContext != null) - { - result = (Class)AccessController.doPrivileged - (new PrivilegedAction() - { - public Object run() - { - return defineClass(className, classData, - 0, classData.length, - source); - } - }, securityContext); - } - else - result = defineClass(className, classData, 0, classData.length, source); - - // Avoid NullPointerExceptions. - Certificate[] resourceCertificates = resource.getCertificates(); - if(resourceCertificates != null) - super.setSigners(result, resourceCertificates); - - return result; - } - catch (IOException ioe) - { - ClassNotFoundException cnfe; - cnfe = new ClassNotFoundException(className + " not found in " + this); - cnfe.initCause(ioe); - throw cnfe; - } - } - - // Cached String representation of this URLClassLoader - private String thisString; - - /** - * Returns a String representation of this URLClassLoader giving the - * actual Class name, the URLs that are searched and the parent - * ClassLoader. - */ - public String toString() - { - synchronized (this) - { - if (thisString == null) - { - StringBuffer sb = new StringBuffer(); - sb.append(this.getClass().getName()); - sb.append("{urls=[" ); - URL[] thisURLs = getURLs(); - for (int i = 0; i < thisURLs.length; i++) - { - sb.append(thisURLs[i]); - if (i < thisURLs.length - 1) - sb.append(','); - } - sb.append(']'); - sb.append(", parent="); - sb.append(getParent()); - sb.append('}'); - thisString = sb.toString(); - } - return thisString; - } - } - - /** - * Finds the first occurrence of a resource that can be found. The locations - * are searched in the order they were added to the URLClassLoader. - * - * @param resourceName the resource name to look for - * @return the URLResource for the resource if found, null otherwise - */ - private Resource findURLResource(String resourceName) - { - int max = urlinfos.size(); - for (int i = 0; i < max; i++) - { - URLLoader loader = (URLLoader) urlinfos.elementAt(i); - if (loader == null) - continue; - - Resource resource = loader.getResource(resourceName); - if (resource != null) - return resource; - } - return null; - } - - /** - * Finds the first occurrence of a resource that can be found. - * - * @param resourceName the resource name to look for - * @return the URL if found, null otherwise - */ - public URL findResource(String resourceName) - { - Resource resource = findURLResource(resourceName); - if (resource != null) - return resource.getURL(); - - // Resource not found - return null; - } - - /** - * If the URLStreamHandlerFactory has been set this return the appropriate - * URLStreamHandler for the given protocol, if not set returns null. - * - * @param protocol the protocol for which we need a URLStreamHandler - * @return the appropriate URLStreamHandler or null - */ - URLStreamHandler getURLStreamHandler(String protocol) - { - if (factory == null) - return null; - - URLStreamHandler handler; - synchronized (factoryCache) - { - // Check if there're handler for the same protocol in cache. - HashMap cache = (HashMap) factoryCache.get(factory); - handler = (URLStreamHandler) cache.get(protocol); - if (handler == null) - { - // Add it to cache. - handler = factory.createURLStreamHandler(protocol); - cache.put(protocol, handler); - } - } - return handler; - } - - /** - * Finds all the resources with a particular name from all the locations. - * - * @param resourceName the name of the resource to lookup - * @return a (possible empty) enumeration of URLs where the resource can be - * found - * @exception IOException when an error occurs accessing one of the - * locations - */ - public Enumeration findResources(String resourceName) - throws IOException - { - Vector resources = new Vector(); - int max = urlinfos.size(); - for (int i = 0; i < max; i++) - { - URLLoader loader = (URLLoader) urlinfos.elementAt(i); - Resource resource = loader.getResource(resourceName); - if (resource != null) - resources.add(resource.getURL()); - } - return resources.elements(); - } - - /** - * Returns the permissions needed to access a particular code - * source. These permissions includes those returned by - * SecureClassLoader.getPermissions() and the actual - * permissions to access the objects referenced by the URL of the - * code source. The extra permissions added depend on the protocol - * and file portion of the URL in the code source. If the URL has - * the "file" protocol ends with a '/' character then it must be a - * directory and a file Permission to read everything in that - * directory and all subdirectories is added. If the URL had the - * "file" protocol and doesn't end with a '/' character then it must - * be a normal file and a file permission to read that file is - * added. If the URL has any other protocol then a - * socket permission to connect and accept connections from the host - * portion of the URL is added. - * - * @param source The codesource that needs the permissions to be accessed - * @return the collection of permissions needed to access the code resource - * @see java.security.SecureClassLoader#getPermissions(CodeSource) - */ - protected PermissionCollection getPermissions(CodeSource source) - { - // XXX - This implementation does exactly as the Javadoc describes. - // But maybe we should/could use URLConnection.getPermissions()? - // First get the permissions that would normally be granted - PermissionCollection permissions = super.getPermissions(source); - - // Now add any extra permissions depending on the URL location. - URL url = source.getLocation(); - String protocol = url.getProtocol(); - if (protocol.equals("file")) - { - String file = url.getFile(); - - // If the file end in / it must be an directory. - if (file.endsWith("/") || file.endsWith(File.separator)) - { - // Grant permission to read everything in that directory and - // all subdirectories. - permissions.add(new FilePermission(file + "-", "read")); - } - else - { - // It is a 'normal' file. - // Grant permission to access that file. - permissions.add(new FilePermission(file, "read")); - } - } - else - { - // Grant permission to connect to and accept connections from host - String host = url.getHost(); - if (host != null) - permissions.add(new SocketPermission(host, "connect,accept")); - } - - return permissions; - } - - /** - * Returns all the locations that this class loader currently uses the - * resolve classes and resource. This includes both the initially supplied - * URLs as any URLs added later by the loader. - * @return All the currently used URLs - */ - public URL[] getURLs() - { - return (URL[]) urls.toArray(new URL[urls.size()]); - } - - /** - * Creates a new instance of a URLClassLoader that gets - * classes from the supplied URLs. This class loader - * will have as parent the standard system class loader. - * - * @param urls the initial URLs used to resolve classes and - * resources - * - * @return the class loader - * - * @exception SecurityException when the calling code does not have - * permission to access the given URLs - */ - public static URLClassLoader newInstance(URL[] urls) - throws SecurityException - { - return newInstance(urls, null); - } - - /** - * Creates a new instance of a URLClassLoader that gets - * classes from the supplied URLs and with the supplied - * loader as parent class loader. - * - * @param urls the initial URLs used to resolve classes and - * resources - * @param parent the parent class loader - * - * @return the class loader - * - * @exception SecurityException when the calling code does not have - * permission to access the given URLs - */ - public static URLClassLoader newInstance(URL[] urls, final ClassLoader parent) - throws SecurityException - { - SecurityManager sm = System.getSecurityManager(); - if (sm == null) - return new URLClassLoader(urls, parent); - else - { - final Object securityContext = sm.getSecurityContext(); - - // XXX - What to do with anything else then an AccessControlContext? - if (! (securityContext instanceof AccessControlContext)) - throw new SecurityException("securityContext must be AccessControlContext: " - + securityContext); - - URLClassLoader loader = - (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction() - { - public Object run() - { - return new URLClassLoader(parent, - (AccessControlContext) securityContext); - } - }); - loader.addURLs(urls); - return loader; - } - } -} diff --git a/libjava/sources.am b/libjava/sources.am index fea09f26961c..418bd8d7c52a 100644 --- a/libjava/sources.am +++ b/libjava/sources.am @@ -1338,6 +1338,7 @@ classpath/gnu/java/net/loader/FileResource.java \ classpath/gnu/java/net/loader/FileURLLoader.java \ classpath/gnu/java/net/loader/JarURLLoader.java \ classpath/gnu/java/net/loader/JarURLResource.java \ +gnu/java/net/loader/Load_gcjlib.java \ classpath/gnu/java/net/loader/RemoteResource.java \ classpath/gnu/java/net/loader/RemoteURLLoader.java \ classpath/gnu/java/net/loader/Resource.java \ @@ -4846,7 +4847,7 @@ classpath/java/net/SocketTimeoutException.java \ classpath/java/net/URI.java \ classpath/java/net/URISyntaxException.java \ classpath/java/net/URL.java \ -java/net/URLClassLoader.java \ +classpath/java/net/URLClassLoader.java \ classpath/java/net/URLConnection.java \ classpath/java/net/URLDecoder.java \ classpath/java/net/URLEncoder.java \ -- 2.47.2