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 .../java/net/loader/Load_gcjlib$SoResource.class | Bin 0 -> 1102 bytes .../lib/gnu/java/net/loader/Load_gcjlib.class | Bin 0 -> 1645 bytes .../classpath/lib/java/net/URLClassLoader$1.class | Bin 1022 -> 1022 bytes .../classpath/lib/java/net/URLClassLoader$2.class | Bin 908 -> 908 bytes .../lib/java/net/URLClassLoader$CoreResource.class | Bin 1826 -> 0 bytes .../java/net/URLClassLoader$CoreURLLoader.class | Bin 1344 -> 0 bytes .../lib/java/net/URLClassLoader$FileResource.class | Bin 1739 -> 0 bytes .../java/net/URLClassLoader$FileURLLoader.class | Bin 1278 -> 0 bytes .../lib/java/net/URLClassLoader$JarURLLoader.class | Bin 3418 -> 0 bytes .../java/net/URLClassLoader$JarURLResource.class | Bin 2202 -> 0 bytes .../java/net/URLClassLoader$RemoteResource.class | Bin 1152 -> 0 bytes .../java/net/URLClassLoader$RemoteURLLoader.class | Bin 1724 -> 0 bytes .../lib/java/net/URLClassLoader$Resource.class | Bin 1217 -> 0 bytes .../lib/java/net/URLClassLoader$SoResource.class | Bin 1097 -> 0 bytes .../lib/java/net/URLClassLoader$SoURLLoader.class | Bin 1625 -> 0 bytes .../lib/java/net/URLClassLoader$URLLoader.class | Bin 1354 -> 0 bytes .../classpath/lib/java/net/URLClassLoader.class | Bin 14234 -> 14476 bytes libjava/gnu/gcj/runtime/BootClassLoader.h | 3 + libjava/gnu/gcj/runtime/BootClassLoader.java | 8 +- .../gnu/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 af4a1a7..ad6c1fb 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 0f052e6..e035429 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 zcmah}T~8ZF6g@*=?JP?Ph7d{tFhSOUZK zFqT{G=AP8gyuC;YlxcaPTQcc-#wuhoP2!qI4)*HLaRYwPK2rUyArl;1cy! zndNGh5} zNnon0t>Hy4lx|8BvkOG2$;+_CKCAaOT2D8!i>xTzWBN_WPpD=3nWNVN(;b5m@}J=d zGPK7oHw~VaTHsoq{&9ok@Q+*A?s9Gwu*y&;6jGNhmDE%_4!Uk8)ps1+#VvO2i!ct- zTh$3`Z1){JFt)SCmXYa?y(U{)_&j2GK9b3{Y^k>PxjXZ5rpJ{txEl^OQDavb+>_Ji zdhnR@#g7BFlQ44E<91VO&lG&6fQGsR}A0s{qe3bY`mNA zJNGLw4DM1{9HCS$oj=5da%s|x?{V>YX{t2cSDHD()kDm^!BFEp7N1v+@cEzb2rzP!jsXWacLvy0Mc!=AL%3l~ZvwMv8Kj_}DeNjEs&q~$g(cQJ|nMglTaZLV#hQK4^s(4!HD%F$AY=$988JI>$2m=4aC=m`>i@rda?F_m{)Zwo2aXk}8Cy~qv$-}tAfH3YdFhfHW_Y~tE zhABVese zwz8|60e8QDDSl+-_(kkDijw$79 zQobsgfMXV^P%KBiyM{xn;=at?bzTx>nWM3>9#sN>chm% zfMwS%7>iE1$fc=fB^|;NL%UZ8TNtbFFG*j~v5Ez%w?8E%&^A2kOSYPbj=Cl%6&QUx z7`?{o3edk1L9#>i^o>@vpNg|ngyYfX6STymZE8J3bUWG+?P`d|PSJgW-XpYR&oHo^ zIK|Mf?*tIR5FXI40b>Ml-vjI+@Ln{N6~VCQ9mO~vVS-kmzmg1bvelJB0uKpk6irCN zAS6byDY`!a zG>s;v9h2xl8eN$2F^Scf#K@uKWk_t;gWqKdi541poj5 diff --git a/libjava/classpath/lib/gnu/java/net/loader/Load_gcjlib$SoResource.class b/libjava/classpath/lib/gnu/java/net/loader/Load_gcjlib$SoResource.class new file mode 100644 index 0000000000000000000000000000000000000000..86c42ea8020e2017c4b286c1279b730e4479ac97 GIT binary patch literal 1102 zcmah{%Wl(96rAfk+&E4eD72vz`k+8w)P)rgR2ET?f-DdXWQ&~iDs`3Gk>emfiUmke zBo=%CABC9fyj&EimTaGU9y4>#Ie-5C`VHVQ4s~b(mA*H&&YVw<<;l<*_|Az8EStZN z{odKY?e4ezV>$B2K~L&P3T!RQpJfOn#=$@!Z_g1w9NTq)^b6N>!y|zwC3_h_jIe&W zw%id&HvAK5Ac3q29j3tEaujkYAQ{xloeU_$L<(tvRonICoAG&92JfBjKnh&9{hl-E zIDxCqQ)eiVs}#msqOLaSnZWK^u5^}UgfTLNoQOI6z2dBnhN+|jWmV8$D6;x4vH<`1RU@I6oV6pX;;j7*K1&056j z26k~z$DY7?9BGkZ;wIKPiXQOO63+iL=V{n3jgt|TehRs zdgZFA6k=;|pk(k~Ey@oX17|dn?8AY;_7(dRVa^s3hg^dM*PSC*yFe?+SH}uH8Cvh4 zMe%H<`V&T__5-b5l}r@tl+2S{gmM%6H^0uxVE>u=ACU36&8AkErWqM56$hJf&G7^giwrLf`=&@~gDhqB9Y+ zFLRtUeLyq9Fe6)=VhEH_o>p4Z%9Ikb5HTr!9V<>vi#1dtiYiILUML}tV4?UAAUpA8 literal 0 HcmV?d00001 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 zcmb7ETTc@~7(D|mrOOIf5h-#j7oite@1g~~G$EK&9;lG$ijNi;|ON&+FL$@>YeRIy4?>jR;e|`N9;1-_6(8DlYbsEM2f5#0+_=fHB zitvmg{k^H02ews?A;K`(EopbBDD#BJ&{q@oTRBJ-WhU)3yoTdjhr%e;xF;$_tGuOB z@|3)0IhMb{@P4V-A||kc&Fl35F|S}+!B7?DlzdO{!!7PqY~dBSSrhpVjE?vwH+|PT z>dZJdOYbp63T{Pc=*57J82U9_!cYu@40=leQR^7SWrkQ)_?wn37)F-T0k_SaszJ<_ zQ_aW0a7D)mt}+ZeZb5jyL@&7w&!j!$!H&8x8=mDK8E3J)hHFU1Fc!AtA2rl5j_VBC zzU5Scsxnl=S}H9al~iYFm-u%HuhSQ{Po8g5M-+VwLq*FG+l|Ar@Luw=EJ>p1n%v&w zo+anuV#Kdm^`9l`46;?%EAs?8K4^MAHze2OgDnI zCeD}KCa8v0gu86;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 64c9e24573b0d59374d7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naAc=mUkwg!5A+7Y# z=p*fl{iHUNJBFfZU!WeL|0_m5d)QHWCj>$|MVEAj0qGl3w06gj!gbuB8O7r!#^_8j zx`jTEzY;tWeWo(%nv9THlCU{4}W w!yiaVKQSi#LPq)>QlOnH(6B=HqgJFp$10vtw1ns0DQhUuSD`(I7g)#We?P=hbpQYW diff --git a/libjava/classpath/lib/java/net/URLClassLoader$FileResource.class b/libjava/classpath/lib/java/net/URLClassLoader$FileResource.class deleted file mode 100644 index e7a12687ef3ace5bc33cd42ce722aca8e5189210..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1739 zcmaJ>OHUhD7(Mr5n0OfCLI_}zQrbd-jT?tP(>i?`(mFAD05Kt}PRs-*8fMUV-1n*v zDa)!-tF(*mqNptkDzzXrQoHYus(S9c>^#WA<2(2J?m6c>-#7Q)|Ni21DS)!B`!fLL&R!`y8m4cn_jofCY}zdnJW*>>wJOgEEfYBT#1kD=RJ36QHFvum zEC;@2ZV8Oe6w;cz0z}srK51Ipf$h014S9hhiMh2)X+*~{JgwolfRRL%^#&&Jj6lEL znzwzc8F>Du0zET@>pD$&*1&Ukp6V%u(gdDLB*fjR=$OVy4JQ)Rc;CPbMySi%w%ka* zh9WEIX6`CMM*$_(vlj#gp&HxM_MLQQ5^8}gWz{WrBiIZj*OZu-47`k2n5?L) zp6jwE`XVs?kn~QBMZAXBHJlL`2?Zvjm!3B82Ig2j`FJd_+?ZB*de*?3;N12(9VO>k zdNVyOF!o^6(+HW5;XMOYWpZ!e(PIq@iBFE{Zj@`J^Ig+f@O{tMF^~6^PalK@H`M!i z0~f&7WYzamHQOzYY$^6IL|EDMy^q!CR^st_Xjj8Ufr+&6Mbo+I`CHaH#iYX{AP76z zDdVwOoJ46eFCXPSs$Y%ja(G>+(c_$wqw7LBr9^O&YV4XH?pvJa)x?jaEu9;Pxe6%x z&TyJD+ryiStx{hzR~h~^9O6!vt1FOUyuUcR54~9W69d04+5M$a)H8@(30?$EPamE9R)Or&G40 z3EPW{r9Hg5vnqF@SmpK(59KH`&tF76L5Co}CG~ft{+`r7ATRG=T>gaP^5-rirc)UM zv5a8~dK>Q$NvNwL7Uac(@)7B~yY>5+U)#sI#S$H;t(N{_V$_($Si}f{An)Rkyoap( t1%vWejLP4-$n!CImV1|QnFxby>=i5#L1LMB5-YgMe|2>UG;j@L{{!;=koo`s 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 HcmV?d00001 literal 1278 zcmaJ=ZBNrs6n<_usdQyb-Uhy)$dGj#3{epsf{L1uOie&$@Qapl9ha1rw4K3^{tW#U zm?%pm@dx;$jOX@cVd6~F-rn=_oO7Q0++V+c`~+|lk5woPQ+wtIvuty}yt!UowM@^e zI_3^{bI*ju$rSEXBpD{Ug|@>O5<9|WNLPbU;glsxg`sCj*ur0CSj>m6vjr<1j=y$B zjUl<}>~IYUq;#k_ucD7ZKV3&dKQ5@q#OA1mjsXlZs15GRZWxC0Mp(--?M8XScZJ=k zXwWe%fkzmIqb5)Ljan}lMs=J+4?}-d*!)Fvf1A6n%xwueP<862RWn^7_mMH_?+TA$ zx?{AiBoj}mx;z0ZI01&SZg~`$Xu4LL=x9<2U~YSk)%5wMbf;+Mb?!M$w@xiC{A;Xk zC310Iz|53n<_5!L1QDO?Sssm=WHPVAK!G7c4Xm2BV+$fDWIq$LA7jY)l8zb7l1})c z@O+{ykvHB*$DB?|B}YnlPlU_szT0>O^mWi+`EQ(+>xy>{7-qEQje4ucW2a8 zEHVtnLR)+J^svqkeBsz6N!#2H&OY#-mJ9jb2V&DU0`|k%2RrZBtV|=duGuzs16goS z#Y2W{m*E)tBvAXlVU9GJpxeyoC1KK6p_gt4S$gTOfh0XZwook1w4fDEpl{6_Bi+K# zcVxc?31jq4OBm%XROKB;6cZQ8RtQsZ372U{Ah?3@pi~xDaV;p7#RUDy7OrD5D*B1? zq@^f}6}}-`Y$11y>F1?m6hC8_mhu;*PcXk#D7A3==rubEV5gDCU4oSjjnF($c9Bs8 v#+5zf6$^%P5HuDREVdgf;vVi3LI$I#5DN-DON61|0hVdi$j7jPM;QGB7Z)^n 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 HcmV?d00001 literal 3418 zcmai1>vJ2`75^Q-R+86_BPStiz$9S64-tjX1}ep&iR%ytJ27!0M+qfa*=t)yUZtxQ zG3M1*c($eQ2IvEtmK556=``|C&vck}#?16fXW&!&rTt6V{_d`{mMq+Uu+SOun-$6NruoXXxJTBlKOQFC=Ww!-uEI5!96;{h=dTQF;p2LQts2Rj~T6wO;xmYd=8%% zbk15Xkw8I~xp369r*oDgh;MFNIp;MDNtKHGmG2J-4%Q~PoX2V}Yw}zxs4t~NC3GZl zfH}-FR6}{&CW^9oThLX>VFmfY9WzOA8G*AtQrCGS7{nKK9KvBjnLhJg0h=rpk#(4l z;7d57VOX%;6T6W>$3r+OXr;6<)6ULV1-Ht=fVy(WARWV~hKDPFtE12{hU0>*p1`bq z$R$QIMb|0_ZmF|!{WclKI8JJKL~v`Zq3bj~$IS&x#{^E%{h`rA6BFmh51pd*xB1Bk zY}vpLv?39@+GN$*HA+V{`dYm(Vk5&rJWAi&l1n2OW0@iu2 z$Wj{2N|rq;zW`3S#ubh9yCFfblUiH^bIuO|yW97pJU?sz@|E&8qfjvibPP ziQs~YMzgkcytt6DoKt2-fj>H$pE7eP)5)su@?n!Zm!%PR)s$&f=ct)6Z0)UH@6UPj zhsoKDjg*?2AvBgeW~PwO5!jglAw|K6pvE~C!nZk_ST*b2ifn*W}wy~)EQmx^nRmc~e zDW2`GMuN{)Y50|PRyD{gd~E$crc8Ez16OpshS%vp!8IMXFqu`erv_jZu>_cbpX&G- zeoijppd?67HBZn$@vdqj&pj z34Mu{ez}2|Bs58cR6)Qr{}n&}cn)9X7c+sc z;p@zf+I@qWYw&j8MrBFYQx zuw3GcdJ#Ki3A^Pf+$m3EuRQBTWS6fgh{!(thL-VP3=YY6@U9mTK8ebfjdNAe+TmNK z$u&gOmN;9Uq;_=|MQ4!jb|qadqf=hMHhIa@sH%Yy0*$}L?|8!cK%A?(Yo^H9x+^W} bP+qNKZZ0z`m??+f!~0w#9{asm#?Jo&a*=(0 diff --git a/libjava/classpath/lib/java/net/URLClassLoader$JarURLResource.class b/libjava/classpath/lib/java/net/URLClassLoader$JarURLResource.class deleted file mode 100644 index 74ebc39810169e5085ce183bcda9a30250221746..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2202 zcma)7TUQ%Z6#jMy3`s{Q>4o40fnZHS+9~2ah?huhFtkb_mDbxKIfUs76V_y+w!gqv zU%fo|;*(43S~M)hOP~EwF87%kl8Ir~@&V?YefIhG<@?Ug-~asfCxAulX^0Rm-4&k+ z!;+4%wNWZGM5|S5ikh_N*M!ZM4cTh8?W)ueCCr5Ro_G<4rRCW72+5M`+jh)`aaY&| zqphlwJRxd{eMv}o9t~mDjk05#R-MmAmQBlaRtV*^cO06Smt}qsBrI^I!l4Vznv7!z zkLieEjH?e1!^QhCGL;wzXLSr?M6D7!G>j6)OQt1nwD)(Uy(xAYZcWXqXjFu4s=aTF zI(ue|5FV+&)2a&%mjX`j|22UyR+moEI%qrGNh$UTlj)3i*K8Vr0|t+;eo>VNj@h(Y z8lEDYbBR)JH@hdQ%BOWqVup|k&7s#J4ReI~Fm-tKdCiPr7V|ou!6kym!q_!c-zEo1 zyT%9kIMT>!$Pg|J$VoZqn8E_V@O$g3?Y?+0wZ;oexocL1Bbnw@I&;UXrX{Ow+jQ<3Rdz4} zUT#@0>3A8h5JnlnjX=oxWdxsuU%+5xD&xG4=kWsTg)x{6*60cA{nIY=RMq%6(e6|qUf^DS6z_8X znEW`_aZ|$$7C=Z09q-|N)~HvYC+_RQsx_qDqy3bA`Stf*;I^-ztRDU*VWs~$hR%^w zfie{hJWaf$-RMQjk+vlotG3sxu~i;Zc$_Uy@G8naPr9*}*`oXt*+Wb}!t5bZyc+M|*#~U(qK_yK`reJG zd*0oMIb3Fos$$7Uih1|1eEH*l0DcGn#JT|ddVPR3A0XM6%0ve*K7!G~tG$HAR5|n$ z&ePABR9}wdC6?^sF5@*H_bb2rrDLpYcd_5#)r8s|;_bv*2c;uyJSZJwYx@Yd)^iIT z+`g6j%dK`6bNJZr#WeR7)IoxdFwNgN`V}cU<`Mim7U>T+l^M6&OMWUT=HgQbMp|G- Xc2H%c2y?EwE3wO8r32zQP)G7#2cskh diff --git a/libjava/classpath/lib/java/net/URLClassLoader$RemoteResource.class b/libjava/classpath/lib/java/net/URLClassLoader$RemoteResource.class deleted file mode 100644 index 19b703190ee1b31646e64629a2529090fe437492..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1152 zcma)5O>fgc5Pf4i2}w>AfAer-2v8Zs?th zXm22M8caAn(2!l_WJU2mYiv~0t7-% zk_!U$`SRSCesV$>bry*JEstwX%RNqkfhQ+DCiUec^JJZ6x23%O?vP-ehUcOJ6Pq?R zP~(xT&-yoCcUT6YZli#rvToQY;hM5qHp-|FHeFweSF`CzL~p!NAQD(%#1Ca$ z!b3ts(<#{NKQDwb6S|q8W~ZwpWe*RJP`jeO5{5a?^oqUo)r=a8Yj~vi33gvf5o!Ge zCw{^u<~J<27~IX`!0?ncF?r)n)RkCl)sY9hSMy}(fq;?18x3qF`fE^3WkA-VWMVOXc+};^V>;EfgRlB8yJ5Jw>g2b?%*yn zC`*;2N^9$aR2glxJBk#b7MuYfsRhmg~MlsX$S{6#P)AYsr1JH diff --git a/libjava/classpath/lib/java/net/URLClassLoader$RemoteURLLoader.class b/libjava/classpath/lib/java/net/URLClassLoader$RemoteURLLoader.class deleted file mode 100644 index d32ac11656c6789416c63a24f19fa03a89744ba9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1724 zcmah}+inwA6kR*9Jzx)U2!vc9Ei@EjC&A&Clo&#r0F9{$5Fp&d!^AlXgC;Z9c!K&X zed;d+2@(k;1TTH)wjXtE%c3R9$DrF`ig}EYHk2`?mJlmv8@j`W(Pf%o}JE z9DZOuv=9JA(`mJ zPC;f_1y>pi;mL3y^7^5SiY^#^~*$X->wPj z&RS7#WsJFIDwSu3-ayW}WeP-E5LH&SF~A zJ0n<()7xr9PtkC{kNLWMOHQTSf`RjFj1Za@UOxY2MOC8$BwTBSJ)5pHXchFv>iH&n za+7lE6ibPRTG(WQ?#N(EU@jS7)k1z4;958x7i>MayW->=(a5+XO6&_i%wKVWvs+dh z#yAY^+=(1~y%G4;#y{5#Z?^O62Blh_%@2=kAe|pshxr6uk3z-We0FHDe8*+-J$KR% z=;q!2$OL=P!xN45u+gFZ>c`$N#6Ao}Atb|a24(l2VaM(KV|*~o#{vGk)-kw&+$F{w znHycl*m#1^@yX=qOH6)+p3xVWT*vA0RClU#$w_{Vq^$KNzd_eCoV`uFeaY^`20mMp zwVSdQ2A#$ooa66i_-=zvV2Yq1uhAo~&?`S;Kz_oY{EVFZf-(6G6Y?wD{dY{uA2=s} zq9lLemi&!7@(=FHzhT0&Q38#G@8JTuWYIBQPj~=l@Hu8l%pfLE!bK#I<1~GNGI>9R a3@-65MU->I)P~Er!grcJgiGowdjAI;54`#S 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 HcmV?d00001 literal 1217 zcma)5YfsZq7=GT-(RGyT5D-xqL)-bA(AXC>bqjJEQ*!6O=>~ zznb`)4Emna%`qaGS-Nw1pZ9s*+xdC^^*ewKJk^mREFC)U9m^N7^?KLdYB^D42hP3- zS9V1dv_n_u&)pGo%wbM8hZcG?%DIB3-Uq!);30all&ph9YpA%M#|A8;n3EEb$ zFR~cIhzT7gVW?QD8z79CNMo2VZhO9X**NS&n7K#4P4G7U?L$*n8)>PApijP%OQ@ znC*Ibfpx*a&e<0qTyY$GfgkDEB;-_0By8ueg;7c0w>>#b zx&8;SEj;_dWNAx0DntD0xPNkXc_%*|8NM-iw~ZA4fNc4U zzshHfe&SOKl147b|%)X~khC)`Wv)%BVoft>La(*I_Z@9y4gXZg52RRa_77kXQNE2#@eY%lrZJfF1Av 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 HcmV?d00001 literal 1097 zcmaJ<$!^n76g~H4aN;;EG|+}Jg_1&s(v%IGKv{$$1zD|VAbU4`YK>Amava1*u>c8* z#DWjtqY(E!C$WuG7IE&o!#U>;zyJLF1>h<63<$#32j`>H@nqO}e{A>0&U9+~&Z!LQ z1OHe~{aG-Q2C{_ORe6gnLS`0>2`hFovrEW7cRe@UCp>GULTNH)kBGaeq;7La$oBkG zX(EG?1p^l0(bY&XPIFiU%dwC{p0H}Wo;;jgoXFsvb265MHQOIKOFU6!*h2^ zsHa4vl`a}qt&R1p2;2Y3j}@_+Ga2^1$t)a%fpjhi8;xdE>iV5TfU(VkPa`=AUEiA; zxJ9Vwv8uGAWyHj7+%<5AU?qoc;U4ZYnLm+U&-XkzQZR(g1=(WV%UIXM13WaaMOaTF z#nl#WVx3np;u=CV-EWLTC~}Lo^v=R_zKBM%&r@O#4}oy)AAZ&4K%dxaS8b%iS&3Qi zDka=npF0S&U-Bq+d1xt#@y%+u#d@&E+t2W&Gp{-UwzB*)P+(7yt+x<5UTU>}z-;Y& zNBJwe1y=dHqC(;Ya$+B*c*zhzElS6Atnmvdp@JI>rYuDu*y17a{{~xGj#M?#0b43o zZhb@f5}S7W616Yvh^R~z6g?EgD@~&SIC)M}VCXuw8G_FqkNK;#@8~y|iO)-%Jo_Nt sXbel)j1x&EG|-$^cIK5iB_mWFCGDPZdIC+ML17qb`bp#T5? diff --git a/libjava/classpath/lib/java/net/URLClassLoader$SoURLLoader.class b/libjava/classpath/lib/java/net/URLClassLoader$SoURLLoader.class deleted file mode 100644 index 403dfafd09cf61f3724c31cee279f35a00db67e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1625 zcma)6Yfscb6g^WGx-CVJck#g+c9(@BFVO{jkQg;9A6O;PZ>2jfB}-SkT@wElCJIIq zznb`?jCZEp(v58JLpz<$x%ZrV?#%rD^Zh4)dw8lsVVFL)Pi@QNf%Rs;xLdXB^afUvxw#)rMm{zJae1~Gj!iYL| z8onERvM$$%dlJ(srWnSr>7Ria%rfZjU9TK=l%W!JLTX9)6Lm2uvAu+M*=x6ssBhjt zC%VY&+9~&ax6El5GNj2ENle{JiiwO#dL?19;JkrF^$j(9&Vy=^9{7#7)wG574pLKxG$yfx{AjPBW*O2iwROJQ(HUeW@7YE zZ|R+)M@5?cX!P}x=3+gaTgc}xpns-s1wHiEX@oKfRhhyKnooo{^rDYu6oH%QmwD3| zz@R{jyCcf`k=O*2NqHA9Fhs*ShI3zVJM|3{Uom${G)zz^b3`>qf{%e^1sl@&VFFyZH_G4yiDCM)G8~`lvS!^4ZX^G!a6giF;S2-8d(`yr(jD8 Q+{O-#;wENzgeMsN3p}fXP5=M^ 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 HcmV?d00001 literal 1354 zcma)6T~8B16g|_fw3G@JuzXc50@^NxRW!t;#upM3O+^FR#P~E_23S&dlie+e|4JVk z5>0&57}RI~f-n9B0ITWeq={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3ZGDKBQ%BL+s%7=7TGRZ;hoWn!f zvX0t0gW8Hi+NvXj)HbMa{kI_K!Ks_1{*VNWklq)1w+IdLWhG`4L(?KlfMNMnAe_OOxJQK+2H^IKwDId4uxgO`3>+w7v zZxC=Dq-}&-y$#PzsBgw|3+nsu>_B}ho)@5g6Q0{qzYx!hQNIPxFzP$-?7|l>w_+Y# L<7&&~L8bo-^YA1W diff --git a/libjava/gnu/gcj/runtime/BootClassLoader.h b/libjava/gnu/gcj/runtime/BootClassLoader.h index dbfd156..df9fcdb 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 8495235..731703a 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 0000000..da8a2ac --- /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 0000000..69d2ef5 --- /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 0000000..ea39204 --- /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 25fe59a..2e5f15c 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 fd70fdf..0000000 --- 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 fea09f2..418bd8d 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.7.4