From 779092f48fc61aaa37d8b2ad5cc00064a6822e05 Mon Sep 17 00:00:00 2001 From: Howard Gao Date: Tue, 14 Jul 2015 20:07:00 +0800 Subject: [PATCH] fix empty keystore files fix Collections.EMPTY_MAP doesn't support put() method issue --- .../activemq/ActiveMQConnectionFactory.java | 5 +++++ .../src/test/java/client.keystore | Bin 0 -> 2197 bytes .../src/test/java/dummy.keystore | Bin 0 -> 1224 bytes .../src/test/java/server.keystore | Bin 0 -> 2197 bytes .../src/test/resources/client.keystore | Bin 0 -> 2197 bytes .../src/test/resources/dummy.keystore | Bin 0 -> 1224 bytes .../src/test/resources/server.keystore | Bin 0 -> 2197 bytes 7 files changed, 5 insertions(+) mode change 100644 => 100755 tests/activemq5-unit-tests/src/test/java/client.keystore mode change 100644 => 100755 tests/activemq5-unit-tests/src/test/java/server.keystore diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java index c530ab783c..0de77f7b74 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java @@ -20,6 +20,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.security.AccessController; import java.security.PrivilegedAction; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Properties; @@ -241,6 +242,10 @@ public class ActiveMQConnectionFactory extends JNDIBaseStorable implements Conne String scheme = uri.getScheme(); if ("vm".equals(scheme)) { Map params = URISupport.parseParameters(uri); + //EMPTY_MAP is immutable, so use a normal map instead. + if (params == Collections.EMPTY_MAP) { + params = new HashMap(); + } params.put("invmBrokerId", uri.getHost() == null ? "localhost" : uri.getHost()); defaultTcpUri = URISupport.createRemainingURI(defaultTcpUri, params); return defaultTcpUri; diff --git a/tests/activemq5-unit-tests/src/test/java/client.keystore b/tests/activemq5-unit-tests/src/test/java/client.keystore old mode 100644 new mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a96e55c3d496405d403f59539bffc2a7b8d9b13b GIT binary patch literal 2197 zcmchY`8O1d8pmfd8ph5H#mJhFX2giGG`!Yg>@y~^B^pvBBErO6TPE{fON~^66kbau zYfMRG8Pv5ClcmU#EzvZt_ukVvo%;veAHF|)zUTYHbH3*}&%P*;BjN(z~Vd%@_RwNMd9Xk9zpPjw#+ ze@reAit^HpR>xkH;Mh4@DkaB`j?koxJ1;ubnVYqn-F=|_a<1G9o(w79Mbs1BAsd*o z2VUDA4l@-vjebanjmj4S>iZ|urg($jCXuJY{T8>Iz-yT;QhU@C1#Ot`z% zMd>esV?8n#8D>h%Q}7-DsXT$6luA21`@Ppe!p`}PE_#~$%1~)XnnnA%_H96JEbBx{ zc(idfYTn;>{LMrvR4h&;SN+GG#1@3chf)=3!Mu(1inbelBU^`P+Di0P1=H7SCBz8E{?6Dil}FpjUf z+5fq~o~kOE^IDP{s_3F-7)ai96PRvzvX*dyd3uJ#!GTV?q3sP;4i?H4m+krz)QmXJ z>W@$(SnA9|K6I!oJc5WC_#>~!DoS>yE4*z65CpOLakeHcV?$3J?5IQH&zG0Gm|4Ij zdbGUwj0GoysLF0F?G&TwdIt9%874vwT26aRIkH}*ojt#vyke@_K%`_=$`ZULddgTX z_wThDNqBnaA@_A(RI8@#8ZP_DQ5L4VZ{|lfUSG z$T$>(lYz#C*Ew}Rf@xZxy>zuL(%P=t)gvd9Nj^G4s3IQB9eC?dh!s>?RbDBkY~C-? zDR_P9<#G4&pstGhV{2b3q+*b3*8Xwph?aNM#34PABS4|2GACPWA~kAcLvBx-veDuT zU9pJDERx(IQjzcBI4h!icT&J~71S~yVLPQccL|GBx~n+XN!)apcHgG3dUQGCN9{uX zWRylWiRE28F4&8sYD>8zr^1dUS~p1f5`-;`z#iS+Dzwh zYjWHc2N}W6{o=ugl2}!)W^~q2U1;}yt@mFzrnV8ODwXSBnuwqVVN@lvA7$+T4#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NJrGQm#d`gFknY ziuI%OrPmAM_k8L6WN7qd)^7uux%Y1;cJKSA&HeT*U#PDlOI&+x%aykbtN%>BF1fc$ z!qwI9l}rKOW#gkywI;6C_!TvM%0;!;_YXJRl3TD(fATWBkj)kutD{z}aBDOBQ^{B0 zx>9V(nFn_tU3jB5@y#kv^DoKgoV8c%XIJ#^ms)o|=3!~KM)sa(cdxFQ-25Y|@%R$g zsq9J>XNuiF#;dvPJMsHM*u7~hIoz#Uzcy*5s(hXBT#%G4|4dldm4J-^yjm!;AOiYaoqQG1WBU31s*48&M?f@oD9hiq1fgE|J#zuy} z^}&s@r9zrP_r2!my?OHdo8a~!oA)jZhvn=WwgswXy2d&v1^$k-?Tz@g|LE6U2H#H4 z4$ZmVXx$)dlK&|!VSDz>fTc_3&ws&EEueJBfA`Ak|F$2K{$U;d{Md?RqWmnso4;K? zDtDO4G(Z%Pl04DZ`@CDQ*{A-h0h z!xm4mLgg1e8e+oR&vP2}oLKhIMy#qkq^4Kn!Qypt+MAb^PRv_e&;3i$H0k5-q$)-g z>oZF}?pqN!p>sv^{fALc=d(@fPK#@(4pmKI^s)YT-cyUYv6TVjj;`32#NJ=Crv=L1 ze>qvSW>Kwa`_b^KWAd9AW1RBsuc~eBGHzaX=k}aO|K~|${mgj$b)ELhhKkP2!Un@|9744(?OFS-Ch4PcHMzLe}!$_)*X}0j!`Oob^G96naOHw0AFtUPXGV_ literal 0 HcmV?d00001 diff --git a/tests/activemq5-unit-tests/src/test/java/server.keystore b/tests/activemq5-unit-tests/src/test/java/server.keystore old mode 100644 new mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0d549fc03c686f15a434729d6d46cbd233cc9b22 GIT binary patch literal 2197 zcmchY`8O1d8pmfbWULumy_h1)i!>u!WgD(FMAn(Ck!5Vzqcn^%Vi@~UiJCzeQLg1> z#_lDONOodU-jOw~k;b^*dr#+d?jLY}`2O(up6?IO`JU%I4`+?D1^@s+M*{vwkl@(B z8?i@pNsnUs765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A(B(Ci4l8c1q$Odnv&oFRLU{P!@rsA(cD003ZX1RiXG zz=Mz=F5CKy8H4~guX3_^GD`pm?{fJb8;EdEu@dna?`q)Tdpg49|Z zjllfEygHyeAn4lC!9M2QjZL_;I3;E5`NZIvb4S#I&fp)xZM>`Imimzv{+7?1$|f*W z-+Lt{-Bq0X(PmDf;=>NjY!l+-wOCe4*P>ZpnvU_ z-LzUgeb+kJo@m9sHS|oXKb9gJq%|576~}@$fWSZi@YjZpR^_N6Ai#RD>^k5YDP+;Z zc3BV|!T?XRyFDw*URvlJImQGI$F! z^uQIYW68?DjH0a9>A`W___eoTA@ur@_}VId_D2heQ>X1rg<}sS+j=cA?Q`*3X~w$u zU_>Kjo(u=ECFE>E=FX+g!&aZJ>&|G^fzr=26Ny^8UiKbt0pO*qPYmhLA~Ag_EXXcMRko+uEY)!kQ|oS_GvM*0*e>-~zwpf+$~RlOwum KFr{R{o__;xjp2s? literal 0 HcmV?d00001 diff --git a/tests/activemq5-unit-tests/src/test/resources/client.keystore b/tests/activemq5-unit-tests/src/test/resources/client.keystore index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a96e55c3d496405d403f59539bffc2a7b8d9b13b 100755 GIT binary patch literal 2197 zcmchY`8O1d8pmfd8ph5H#mJhFX2giGG`!Yg>@y~^B^pvBBErO6TPE{fON~^66kbau zYfMRG8Pv5ClcmU#EzvZt_ukVvo%;veAHF|)zUTYHbH3*}&%P*;BjN(z~Vd%@_RwNMd9Xk9zpPjw#+ ze@reAit^HpR>xkH;Mh4@DkaB`j?koxJ1;ubnVYqn-F=|_a<1G9o(w79Mbs1BAsd*o z2VUDA4l@-vjebanjmj4S>iZ|urg($jCXuJY{T8>Iz-yT;QhU@C1#Ot`z% zMd>esV?8n#8D>h%Q}7-DsXT$6luA21`@Ppe!p`}PE_#~$%1~)XnnnA%_H96JEbBx{ zc(idfYTn;>{LMrvR4h&;SN+GG#1@3chf)=3!Mu(1inbelBU^`P+Di0P1=H7SCBz8E{?6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1e8e+oR&vP2}oLKhIMy#qkq^4Kn!Qypt+MAb^PRv_e&;3i$H0k5-q$)-g z>oZF}?pqN!p>sv^{fALc=d(@fPK#@(4pmKI^s)YT-cyUYv6TVjj;`32#NJ=Crv=L1 ze>qvSW>Kwa`_b^KWAd9AW1RBsuc~eBGHzaX=k}aO|K~|${mgj$b)ELhhKkP2!Un@|9744(?OFS-Ch4PcHMzLe}!$_)*X}0j!`Oob^G96naOHw0AFtUPXGV_ literal 0 HcmV?d00001 diff --git a/tests/activemq5-unit-tests/src/test/resources/server.keystore b/tests/activemq5-unit-tests/src/test/resources/server.keystore index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0d549fc03c686f15a434729d6d46cbd233cc9b22 100755 GIT binary patch literal 2197 zcmchY`8O1d8pmfbWULumy_h1)i!>u!WgD(FMAn(Ck!5Vzqcn^%Vi@~UiJCzeQLg1> z#_lDONOodU-jOw~k;b^*dr#+d?jLY}`2O(up6?IO`JU%I4`+?D1^@s+M*{vwkl@(B z8?i@pNsnUs765>N5O^*QLXaD(!VTmCDua##fe-)}o@-^(+L(1NIomae99@R~5Rj(G z5xQb^d%VuV$;-9#Inoy_u$3b`Uk&eDe3}#1e6H>*qu9sKz<0I`w(o*2U3SlbD&?_V zYF$fOPo%R#1p|3xL*!R=XJ5IXQ_H<;Uc95CVbMO~>6RL?X&*2VdM_N_7(NcT^kcxf zTd0E4FZQ)Z>Xv7Xhnta-*c*C$P!zn>#5v}hyuDo4bKEySSe%W+DKuXk7GQcYj8BUc zw_n56WTDxtFY4vZ%*zBZNYapu{-z|h98@z;?_o-tv}mBn>PSaBSsFj(vsL}k>AOIu zF-oLDN~k`yntPiogKdg)Qu^)Yj{8% zt5{Tmmy&&c0Ny@5sI`cgxihEb)mUpO)2epNwprKTv#a{rs?eWr=57+L5bmo~Kl#!Ag(ybC z4N78&T}xlyX6$-rYC-M(jug+!P)PaS_P1OK`DdIjv1T=)l@08)x$!d(xjL{2ANa6K z%f*)AwBijt8GAL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