From 98310ad4c6ec2f00049ecd9dd6d46effdd6cd344 Mon Sep 17 00:00:00 2001 From: anshulvijayvargi <30700915+anshulvijayvargi@users.noreply.github.com> Date: Fri, 10 Apr 2020 22:21:51 +0530 Subject: [PATCH 01/10] create new file --- TestSCMPoll.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 TestSCMPoll.txt diff --git a/TestSCMPoll.txt b/TestSCMPoll.txt new file mode 100644 index 00000000..45b983be --- /dev/null +++ b/TestSCMPoll.txt @@ -0,0 +1 @@ +hi From 4dbf83a0d4e40fa854af9a2785a3ff7149419632 Mon Sep 17 00:00:00 2001 From: "anshul.vijayvargiya" Date: Wed, 10 Mar 2021 11:18:00 +0530 Subject: [PATCH 02/10] file commit --- .DS_Store | Bin 0 -> 8196 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..da890880465e9f3f789ed966a760abb65bdc199d GIT binary patch literal 8196 zcmeHMO>f*p7=9-S)SD9Gq)8JM4l5$0qDE1oHjOHT*lf0f1);3ss3c0-t-rFd>h-v` zHy;hD_Foiw?TItu2f&RB5+{xv_yZi^hE$%J@ox8{<%kf>Se|G6evRM99^3CO5wUX1 zTOpb!A_KcX^CG&JG@%#!P#ei5lRyT4s)pQkLhj($9J1B|&46Y=GoTsJ3}^=a4GiF& zEt>I)_rB8VUNfK>_+K(0o)1Or0!ulz70O2kI#~h$#~_vsWBKV1ED8azlw(^VBxp>z z0+lPvOAMA*4ota2U&`&<3Y9xCIWywqGqb!xVR_-fiqf1|NulmF1Db(h21M;XMoZM7 zfU<%5{e9@JK9@~8cI}+wG|ub%ADlQ0(rkJ8XEriA_S)+g3}f6FpBTSu9r9x*mY`k1{)m{6snjo)44#&x6S0$7SA%yi~@ql)^9y zMxk!bpPj9&-dZfK-n@0bSUg)>TV5>QxPJ5eykN||yYfNxe)IIv*%#-Jzf!rg{P{s5 z@!s|n2i*h%_b5-0ebY(s7t`#dSQx+f#>AVG=G641shO$S+1bl;v-8te-m06I9NT@+ zNW{r*@Q^3vu;tgy$rR~VT^`jE{|Kq>Wd2EJ1&^Sb9&p(5y?ZZ2+ov&XW?l$n(2o+| zkM+MKw#wF6iLJ8@_A#rn zE#*DZxs-2rrc%iEfZaf^(n z*y=^po%hH}qL4=o#1rRvg>3S$CFE0z%^{BM0o5^frPQYg<3mU@tj8Efje+&}HRANH zM-x$6ShpeK3XcT7G2$nP5QupO{Kb0yvS&RP`utC*N#THpn6cO60^)PnEz!%Y5uX`- z@wezUu5X1t11`bO8;;-SF$x9}atEwL+>@TTle8^a%y8#yAa)Js6k=OK-X}v(G33za zjg)lL3}^;uRBi^rX{{3Gwr5Vr+{D&D}V->4XMuMFWs=-`EtzE=^AG>J6uB}kI mpp)e|P<{mgyMGvBT!g9cDdpH!2nm}0AwbfgJI%m9%D`Vt>sQzS literal 0 HcmV?d00001 From fdb1437b4eb2f991da85991100cc6ed5f9fbe105 Mon Sep 17 00:00:00 2001 From: "anshul.vijayvargiya" Date: Wed, 10 Mar 2021 12:31:16 +0530 Subject: [PATCH 03/10] foo --- .DS_Store | Bin 8196 -> 8196 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.DS_Store b/.DS_Store index da890880465e9f3f789ed966a760abb65bdc199d..354dbb5d09617cb5d7669c120f203b8b381d6a04 100644 GIT binary patch delta 470 zcmZp1XmQx!E#USwsURn_xWvHV1|t(Q3o9Et2PYRdCpRBAXKZjretB?7Vo7PSQ({rP zfJ|^^N@`MKQFvxbNk&L&o@-8OS!$ktkxybt>f{;$PqAo_hJeJ944@(oWruhN1`wEh zTtLB-LsH!>D6X`rZ`SN3OP4J_bQmnfz{m)p83ds;j5-2jurTN`q%&kPlw>BC6(r^4 zCowQE?whPDsH7n#DlQ=^DJ3NnFCd(hn4FznlwX>c;+&t8U*wcini`RroSzq*S(Q4u zL2y@nya0bO&|RKDv4En~vdq--==7q@l;DEIggN41El<7}hZCU^vQfi{TB!H%4m~ zMlnVuMr}qDMq5UEMi0h7#vsNJ#z@8}#%PEEOt3(Zg;@uo8B-=d5RznO*1S0RkB|gw laYyCafXR}=(omMAunZHc!sc+{N|w#+65m-i9~WU`1^}u>ZfyVn delta 422 zcmZp1XmQx!Ens*usURn_xWvHVIwKP^3o9Et2L~4i7cWO9pD16O?9*1~OO}^cd0^G8sy8(hY-?^K%Qpl1vvlk>zspU0jlK@{@pK9A7lW lg}f#Q2urg Date: Wed, 10 Mar 2021 12:33:29 +0530 Subject: [PATCH 04/10] Push test --- .DS_Store | Bin 8196 -> 8196 bytes TestSCMPoll.txt | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.DS_Store b/.DS_Store index 354dbb5d09617cb5d7669c120f203b8b381d6a04..e4717f19ee0bab9de74d8828bf443831e1bcfa69 100644 GIT binary patch delta 976 zcmZp1XmOa}&nUVvU^hRb=wu!Nd&84S1v#0;B?bo98JU<_SlQS)IJh{tc)4POGxE!W zOA<>;i=7gSqCvcX#FC7p#K{u{JOem5I5{}u1thAg4b3fe6iiJlYjqT=&CLyT6ikfG zYHK+;#8nM#Jri;(tEy{i>t-^50V5-XX5fd?FlyFhM?rDM&66Vql?+8i#l%G=grub7 z1%#6lle5!{@=Nnlobz+?i=1*wQ{x5ri-B(OOwP{>C`v8MOf8?hSa26-L?%!mII}8s za=wsgJ*TpR2E=Ru24$Ef90H6XdHH#%K*<1zn6iU6RFZ>1o57JGm?4ItkfDKLI>Tay ztqcbl&M`b@_{#8~k(W`7QHfETQHRl#(VWqN(UH-a(Sy;GF$kiY3Fa*ssA*16nlT#4 zU}4Z>NN31oD9K4T3{K9^EdWb0o5mu`<>tG%B<18M0mV2ru&c@iPYw{4W`(c{gk>26 zHunif{E&UG?z-{KY^gdjiD* zic-rmQ_G{%i!xJ!3lftv^U{^=KS1nMb_jqmG$0HC24x6?fkD~93c}IbYXc@r3QI#-mcp`( h3Y)`)GZ;6kh&^W9*r3O_nO))=%Vuq{J3yW`BLMlLdshGe diff --git a/TestSCMPoll.txt b/TestSCMPoll.txt index 45b983be..fd12ebb1 100644 --- a/TestSCMPoll.txt +++ b/TestSCMPoll.txt @@ -1 +1 @@ -hi +Hello hi From eb7b78b617c9a7fadcdbea9121aa18dd850300be Mon Sep 17 00:00:00 2001 From: "anshul.vijayvargiya" Date: Wed, 10 Mar 2021 12:47:33 +0530 Subject: [PATCH 05/10] commit --- .DS_Store | Bin 8196 -> 8196 bytes TestSCMPoll.txt | 1 + src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/java/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/.DS_Store | Bin 0 -> 6148 bytes src/test/.DS_Store | Bin 0 -> 6148 bytes 7 files changed, 1 insertion(+) create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store create mode 100644 src/main/java/.DS_Store create mode 100644 src/main/java/com/.DS_Store create mode 100644 src/test/.DS_Store diff --git a/.DS_Store b/.DS_Store index e4717f19ee0bab9de74d8828bf443831e1bcfa69..8b6ec341c64a6dd6c99ef4a119a2be7d50b8ab0a 100644 GIT binary patch delta 63 zcmZp1XmQx^ONhxfbMhY{36`KAOA{tb2+Kei7Q%9j6E=qn|7T>gwA4{BHQF2_`imXG HUcm$a;3pLs delta 57 zcmZp1XmQx^ONhxdcJdz~36>4)s&bPhgk>NM3t>6NfX(5;{~0G=5b)SMPjm-6l##{+ E03w7FI{*Lx diff --git a/TestSCMPoll.txt b/TestSCMPoll.txt index fd12ebb1..5525f3bf 100644 --- a/TestSCMPoll.txt +++ b/TestSCMPoll.txt @@ -1 +1,2 @@ Hello hi +hi \ No newline at end of file diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..99f4c691bc51661d0bf373cfa1e227bd986be7f8 GIT binary patch literal 6148 zcmeHKQHv8X5T4wvnpV^z;vMM2z6d@PY(4cTBCNFv=aaCa4=Q)N*K%Fh-IVUua@NZJ z4aGm;zYyR21wQ!T9}#pW8QX5}^hv}!GLU>pCX?)ZLy{c;5baU72~Yz7iG|RqVs(g+ zp2`7P;gPe5g4WoI)ovK85c{;C70ZBS;QwZT&aMLq1Q0>GbbfE6?&=RM+KJh`aGVYJ zoPQ1nag^na#uu@&>YO-vO3JFNo~gd@`)cgxK|adb!SEUN9tC+nh^HT^QTeTRpYiArQJ-g;~RyP69F(i{kMzfAAbLIx2*5}Q9tM}uKkg=nC<)0AEvQN_i&89(}5g%kU_o_m=CBc2ZrYz z-@vegrNF?0{Y8=%1M~IL+B`69o2YqU4%3$c0|hQU55Q7jNO$ywkAggX^j)zYSOzQu zf0+TgA6zVi9%ErpUmaNK6adk|VJ+C!zy63W4Ip}qg+Uxa5ylkJm+sHkGZevzhj8_D5S~F>TLvrxWd>GFw?^;(eLTaz$^Xknwr3fz3>+&4 zgwydmZFGs>)&tJbTkB%k!9qgw3WM4ND}Ii3gP!7bELu?KQUlRrEDYiZiv1DLG}y{A I@J|`|2}uXwcmMzZ literal 0 HcmV?d00001 diff --git a/src/main/.DS_Store b/src/main/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2f3f27331e587272f5df0bc3082634f494175b3d GIT binary patch literal 6148 zcmeHK&5qMB5FT#>xCKPDLa@hNkT~?v^0TW7A%#*7%Lyq64uE!(O|=b5M+t zuK*{mJOejwJOK~F6$xhSA=_+$6GEu+NcLy@^EjT*vK<3}=uM*zKobBYCPJry*)NQE zN-MU(E$0vgjj@}kgD_Dc)@eX%RspNP|E&P+T?d{+07np<*uS@syZT+54x;QA&L$b} z^Uq`NlJUsAhg15lc7gFHyu(5nU~<^;57a0#Z1cQ z{RBXCuvr_H^{+poOAUw~V_^_m(1dYCG_Hc57=m98!nh;vasR@gaR;HljN|Z^1;0=P zKRkr1yMyoy+T1E&6{spuGu0;D|MzeY|K|N)b+R?9fK_0v6cA3|@AohyzFSvjGWHTbQ&V=TZUDV=N3}3!42A&@$M}D)3Jg_yIBWn*IO) literal 0 HcmV?d00001 diff --git a/src/main/java/.DS_Store b/src/main/java/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4a7206ea2eb55c1c1493741569ea2e5c2045cdd0 GIT binary patch literal 6148 zcmeHK&2AGh5Vn&*oghS1A?VSUNh$WUjHf#FDdUICO(~XUKO+SD3ayBcg zr>l+ETL=9wU#H(@-+#K3knkt9@`!K_zd)hwC5H{aWBLQ6><&Hm=_Mc(VNd z?D*|vZ}boEpm!;&)DSjb@3TKl6O$f-W&Z2X%fbvW1I)mUGC&uOdT^twaB^mV8MuuM z;QgSXA$o+lLwj{VXG;LU5}2)kZa@A3H5vdt!rUQPK%@%=bfJ<;3`wduD(cSY)8+hE;t3H?Ob%7lU}j3@`(CiUC<_`|TEN ziQd*Lo5QzOLpy+mg7b2R7a^e7rx@nqQ@jGr3fMI&fF5D)5G)}4Az*3Xjv4r`44eZ% CzH!R{ literal 0 HcmV?d00001 diff --git a/src/main/java/com/.DS_Store b/src/main/java/com/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..09c77697724916d1cb7a5fefc0ece9b71a5ffb67 GIT binary patch literal 6148 zcmeHK&2AGh5FWRII;jv*g=mkyAoY+#!e133q$N!cS;;0d^K;|X|~N-$$j3su-kTu{||r13Ylzwxd=t?e}ch|V}_0n`CNq7znXSp3DP zpM1_1xMc}Zm@#5_0|7)3Lw}C#8k_=7fy<@T`>g`k?hN%vbLEFO< z^!1;{Fe=RoC!+ypeGdm|GRm9HA7Wv#a^vQblr>qqReSCC^u*7Dd_3v|!&5Xp)mCM#`(bB#ZQ=4nXAL#o*l0G?!v~LNv#MOZ*Lu2r(0})S`eF9*vzZVG+{BFCW;}&s3`#^wk6Qkr z?hh>W>qJ<(2ZfAq5#ojEG%LR Qn)?wjGPuGi@Lv`91%h;mvH$=8 literal 0 HcmV?d00001 diff --git a/src/test/.DS_Store b/src/test/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..561e982fc029c096a4ba612c9104ba1cebfc79d8 GIT binary patch literal 6148 zcmeHK&2G~`5T0!f-2@O(h1#BwFGw76NGNR;AtV#hO663^6&wJyb{sXX9B&jmjUWy3 zYqW2`YjEomAf5#zn4R5}xHUaSfOe$aZ}w+qcD|K&y#T=oPc-b`+bIEkAIR-5|{I$qq^G` zy}n9qXMNU3PqbS44B+3suPnd%@#RH+Jh*YZ-<|bMAxbcS4kRF8h+13fS62ENBh0R} zz``FTeZ8&=zaNE3TC06!3yapR+e@66dHG)Xz1tNdH}%qC()0#zWoyq%yS~=-e^?qjVFys z)gEtc)vET>_07qo#8)5HpYI;_K71UXPClI}f*BsJB=f;t`hh_>uNbTnoPu?K}IQ$%IT^b>>WmjhGgIPU2AnL=d_ zj3T2S9hvDD3Zv-QZ_{*OjzUu#1`Gpv1{PJbBJcn0KfnL;My6#LFbw=x3^1$Zwwjod zzFV&)C+}Jt%OMsia$cs8Ot8||F)8vYUc*9yW42Tf9gUen>_IU<0z`wU3 Date: Wed, 10 Mar 2021 12:52:05 +0530 Subject: [PATCH 06/10] Test commit --- TestSCMPoll.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestSCMPoll.txt b/TestSCMPoll.txt index 5525f3bf..eb1cf7ab 100644 --- a/TestSCMPoll.txt +++ b/TestSCMPoll.txt @@ -1,2 +1,2 @@ Hello hi -hi \ No newline at end of file +hi hello From fc49b10c72021650136472090a780043e9a1bd52 Mon Sep 17 00:00:00 2001 From: "anshul.vijayvargiya" Date: Wed, 10 Mar 2021 13:01:39 +0530 Subject: [PATCH 07/10] test commit --- TestSCMPoll.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestSCMPoll.txt b/TestSCMPoll.txt index 5525f3bf..ffd38bc3 100644 --- a/TestSCMPoll.txt +++ b/TestSCMPoll.txt @@ -1,2 +1,2 @@ Hello hi -hi \ No newline at end of file +hello hi From 59e8362f3fe8785be9c9d29d03813b469b6b2519 Mon Sep 17 00:00:00 2001 From: "anshul.vijayvargiya" Date: Wed, 10 Mar 2021 14:40:30 +0530 Subject: [PATCH 08/10] Test Commit --- .DS_Store | Bin 8196 -> 8196 bytes .pre-commit-config.yaml | 11 ++ README.md | 2 +- TestSCMPoll.txt | 1 + build.properties | 20 +-- build.xml | 138 +++++++++--------- pom.xml | 16 +- repos: | 0 .../helper/GenericResourceBundle.java | 7 +- .../utilities/CaseInsensitiveComparator.java | 20 +-- .../utilities/GenericComparator.java | 24 +-- .../utilities/HexAsciiConvertor.java | 12 +- .../utilities/LoggerStackTraceUtil.java | 28 ++-- .../edurekademo/utilities/PropertyHelper.java | 59 ++++---- .../edurekademo/utilities/PropertyLoader.java | 122 ++++++++-------- .../utilities/StringUtilities.java | 70 ++++----- src/main/pmd/pmd.xsl | 4 - src/main/pmd/ruleset_basics.xml | 12 +- src/main/pmd/ruleset_j2ee.xml | 36 ++--- src/main/pmd/ruleset_security.xml | 10 +- .../utilities/ExceptionThrower.java | 38 ++--- .../utilities/TestGenericComparator.java | 136 ++++++++--------- .../utilities/TestHexAsciiConversion.java | 16 +- .../com/edurekademo/utilities/TestLogger.java | 46 +++--- .../com/edurekademo/utilities/UnitDTO.java | 14 +- src/test/resources/Dateformat.properties | 2 +- 26 files changed, 425 insertions(+), 419 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 repos: diff --git a/.DS_Store b/.DS_Store index 8b6ec341c64a6dd6c99ef4a119a2be7d50b8ab0a..dedeb7eeb2c5593eb372fb0eb9ce64aeccf42f22 100644 GIT binary patch delta 297 zcmZp1XmOa}&nUhzU^hRb_+%b|Ba_2KJvK`SK4N4F^PK!gNP_j`6z+9llO=_vp)5;b znPj#D3_!rbpvRETkjYR|7F?87><^thQOx6Mf45~vjVkN?ejfF~# To7pA4v25NdvX+rDljIozH;`1g delta 119 zcmZp1XmOa}&nUVvU^hRb=wu#&BW&iDItr#Ho39C|FfrL?PW~e#!5Z{qX+rR1NnvRy z%TicInsovL5U?=lF{CqOGL)1B7v<&T=cNP17&q?_{=~HTm6$B!#D=NHtCYK8= Mocv7m2vo2Y0DXWa+yDRo diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..ddf6ce49 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace +- repo: https://github.com/psf/black + rev: 19.3b0 + hooks: + - id: black diff --git a/README.md b/README.md index fefd2a53..789ca3c0 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,4 @@ To use the built in server adapters of Eclipse, instead of doing "Run As -> Mave - Select the server you want to run on, e.g. Apache Tomcat 8 and click ok - *Do not use the suggested J2EE Preview server* as it is outdated, deprecated and does not support Servlet 3, which is required for this application -*** End of documentation \ No newline at end of file +*** End of documentation diff --git a/TestSCMPoll.txt b/TestSCMPoll.txt index ffd38bc3..3d16f7ec 100644 --- a/TestSCMPoll.txt +++ b/TestSCMPoll.txt @@ -1,2 +1,3 @@ Hello hi hello hi +hello diff --git a/build.properties b/build.properties index 886c42fd..d9cf4884 100644 --- a/build.properties +++ b/build.properties @@ -1,7 +1,7 @@ # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- # Copyright 2015, Seshagiri Sriram. All rights reserved. # -# Created on: Feb 02, 2015, Seshagiri Sriram +# Created on: Feb 02, 2015, Seshagiri Sriram # Updated: June 20,2016 fixed some property paths.. # File Name : build.properties # @@ -23,22 +23,22 @@ # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- # The below are general for *** ALL *** Projects and defined inside build.xml or passed via -D options. DO NOT CHANGE # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- -# |Property Description +# |Property Description # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- # |build.basesrcdir Location where the project is found. Passed to this script via -Dbasesrcdir= -# |maven.build.finalName Final name - hardcoded into build.xml e.g. X-1.0.0-SNAPSHOT.jar +# |maven.build.finalName Final name - hardcoded into build.xml e.g. X-1.0.0-SNAPSHOT.jar # |maven.build.dir Location relative to buildsrcdir where build will be done. usually target -# |maven.build.outputDir Usually target/classes. +# |maven.build.outputDir Usually target/classes. # |maven.build.srcdir location of source under buid.basesrcdir -# |maven.build.resourceDir location of resources under build.basesrcdir -# |maven.build.testDir Location of test classes -# |maven.build.testResourceDir Location of test resources +# |maven.build.resourceDir location of resources under build.basesrcdir +# |maven.build.testDir Location of test classes +# |maven.build.testResourceDir Location of test resources # |maven.build.testOutputDir Location of test class compilation -# |maven.test.reports Where test reports (from JUNIT) will be located. -# |maven.build.pmddir Location where PMD rules and XSL will belocated. +# |maven.test.reports Where test reports (from JUNIT) will be located. +# |maven.build.pmddir Location where PMD rules and XSL will belocated. # |maven.reporting.outputDirectory Location of reports from PMD # |project.3rdpartylibdir lib under build.basesrcdir -# |build.type dev,qa, or prod. passed via -Dbuildtype={dev|qa|prod} +# |build.type dev,qa, or prod. passed via -Dbuildtype={dev|qa|prod} # |environment.type.default Value if build.type is not passed. defaults to dev -- DO NOT CHANGE # ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/build.xml b/build.xml index 246417e2..f7e83d3e 100644 --- a/build.xml +++ b/build.xml @@ -9,11 +9,11 @@ - - + + - + @@ -36,7 +36,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -69,16 +69,16 @@ - - + + - - + + - + @@ -88,7 +88,7 @@ - + @@ -98,13 +98,13 @@ - + - + @@ -112,7 +112,7 @@ - + @@ -130,17 +130,17 @@ - - + + - @@ -157,14 +157,14 @@ - - @@ -183,8 +183,8 @@ - @@ -205,14 +205,14 @@ - + - + @@ -221,7 +221,7 @@ - @@ -237,8 +237,8 @@ - =================================== WARNING ========================================== JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed. @@ -249,25 +249,25 @@ - @@ -289,7 +289,7 @@ - + @@ -311,14 +311,14 @@ - - + @@ -338,7 +338,7 @@ - + @@ -346,19 +346,19 @@ - + - + - + @@ -373,7 +373,7 @@ - + @@ -388,12 +388,12 @@ - + - + @@ -403,7 +403,7 @@ - + @@ -413,7 +413,7 @@ - + @@ -426,7 +426,7 @@ - + @@ -448,7 +448,7 @@ - + @@ -460,7 +460,7 @@ - + diff --git a/pom.xml b/pom.xml index f2b7c142..27e4ac9c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ Vaadin Pre-releases https://maven.vaadin.com/vaadin-prereleases - vaadin-addons @@ -81,8 +81,8 @@ 3.0.1 compile - commons-beanutils @@ -90,7 +90,7 @@ 1.9.2 jar - + log4j @@ -173,7 +173,7 @@ jetty-maven-plugin 9.2.3.v20140905 - + org.apache.maven.plugins maven-surefire-plugin @@ -195,8 +195,8 @@ addressbook - - + + @@ -206,7 +206,7 @@ - + development diff --git a/repos: b/repos: new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/com/edurekademo/helper/GenericResourceBundle.java b/src/main/java/com/edurekademo/helper/GenericResourceBundle.java index c75801ba..cf38ef01 100644 --- a/src/main/java/com/edurekademo/helper/GenericResourceBundle.java +++ b/src/main/java/com/edurekademo/helper/GenericResourceBundle.java @@ -9,15 +9,14 @@ public static String getProperties(String source){ Enumeration keys = rb.getKeys(); String value=""; while (keys.hasMoreElements()) { - + String key = keys.nextElement(); - + if(key.equalsIgnoreCase(source)){ value = rb.getString(key); } } return value; } - -} +} diff --git a/src/main/java/com/edurekademo/utilities/CaseInsensitiveComparator.java b/src/main/java/com/edurekademo/utilities/CaseInsensitiveComparator.java index cee7d853..6e9676ef 100644 --- a/src/main/java/com/edurekademo/utilities/CaseInsensitiveComparator.java +++ b/src/main/java/com/edurekademo/utilities/CaseInsensitiveComparator.java @@ -9,7 +9,7 @@ public class CaseInsensitiveComparator extends GenericComparator { private static final long serialVersionUID = -6836701171640412573L; - private static final Logger LOG =LoggerFactory.getLogger(CaseInsensitiveComparator.class); + private static final Logger LOG =LoggerFactory.getLogger(CaseInsensitiveComparator.class); /* * This function call base GenericComparator(boolean sortAscending) class and set whether sorting is in ascending or descending @@ -58,28 +58,28 @@ public int compare(Object o1, Object o2) { v2=getValue(o2); returnType=getMethod(o1).getReturnType().getName(); } - + CompareMode cm = findCompareMode(v1, v2); if (!cm.equals(CompareMode.DEFAULT)) { return compareAlternate(cm); } response = compareActual(v1, v2, returnType); - } - catch (NoSuchMethodException e){LOG.error(new LoggerStackTraceUtil().getErrorMessage(e));} - catch (IllegalAccessException e){LOG.error(new LoggerStackTraceUtil().getErrorMessage(e));} - catch (InvocationTargetException e){LOG.error(new LoggerStackTraceUtil().getErrorMessage(e));} + } + catch (NoSuchMethodException e){LOG.error(new LoggerStackTraceUtil().getErrorMessage(e));} + catch (IllegalAccessException e){LOG.error(new LoggerStackTraceUtil().getErrorMessage(e));} + catch (InvocationTargetException e){LOG.error(new LoggerStackTraceUtil().getErrorMessage(e));} return response; } /* - * This Method is the overridden compareActual of GenericComparator. + * This Method is the overridden compareActual of GenericComparator. * If the data type is String then it convert string to upper case and compare it with other. */ protected int compareActual(Object v1, Object v2, String returnType) { String obj = returnType; - if ("java.lang.Object".equals(obj) && v1!=null) { - obj = v1.getClass().getName(); + if ("java.lang.Object".equals(obj) && v1!=null) { + obj = v1.getClass().getName(); } - int acutal = LESSER; + int acutal = LESSER; if (obj.equals(DATATYPE_INTEGER)) { acutal = ((Integer) v1).compareTo((Integer) v2) * determinePosition(); } else if (obj.equals(DATATYPE_LONG)) { diff --git a/src/main/java/com/edurekademo/utilities/GenericComparator.java b/src/main/java/com/edurekademo/utilities/GenericComparator.java index 3309221e..303f3c1a 100644 --- a/src/main/java/com/edurekademo/utilities/GenericComparator.java +++ b/src/main/java/com/edurekademo/utilities/GenericComparator.java @@ -9,10 +9,10 @@ * Sorting - Generic Comparator * * @author Seshagiri Sriram -* @version 1.0 +* @version 1.0 * @since Janauary 12, 2015 -* -* This is an adaptation of a genenic comparator found on github linked from myjeeva.com +* +* This is an adaptation of a genenic comparator found on github linked from myjeeva.com * Many thanks for the code! */ @@ -122,13 +122,13 @@ public int compare(Object o1, Object o2) { v2=getValue(o2); returnType=getMethod(o1).getReturnType().getName(); } - + CompareMode cm = findCompareMode(v1, v2); if (!cm.equals(CompareMode.DEFAULT)) { return compareAlternate(cm); } response = compareActual(v1, v2, returnType); - } + } // in JSE 1.7 the below is accepted /* catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException nsme) { @@ -139,10 +139,10 @@ public int compare(Object o1, Object o2) { LoggerStackTraceUtil.printErrorMessage(e); }catch (InvocationTargetException e){ LoggerStackTraceUtil.printErrorMessage(e); - } + } return response; } - + //---------------------------------------------------------------------------------// // Private methods used by {@link com.myjeeva.comparator.GenericComparator} // //---------------------------------------------------------------------------------// @@ -152,7 +152,7 @@ public int compare(Object o1, Object o2) { * @param cm - a enum used to idetify the position for sorting */ protected int compareAlternate(CompareMode cm) { - int compareState = LESSER; + int compareState = LESSER; switch(cm) { case LESS_THAN: compareState = LESSER * determinePosition(); @@ -176,11 +176,11 @@ protected int compareAlternate(CompareMode cm) { */ private int compareActual(Object v1, Object v2, String returnType) { String obj = returnType; - if ("java.lang.Object".equals(obj) && v1!=null) { - obj = v1.getClass().getName(); + if ("java.lang.Object".equals(obj) && v1!=null) { + obj = v1.getClass().getName(); } int acutal = LESSER; - + if (obj.equals(DATATYPE_INTEGER)) { acutal = ((Integer) v1).compareTo((Integer) v2) * determinePosition(); } else if (obj.equals(DATATYPE_LONG)) { @@ -209,7 +209,7 @@ protected final static String prepareTargetMethod(String name) { fieldName.append(name.substring(0, 1).toUpperCase()).append(name.substring(1)); return fieldName.toString(); } - + /** * fetching method from Class object through reflect * diff --git a/src/main/java/com/edurekademo/utilities/HexAsciiConvertor.java b/src/main/java/com/edurekademo/utilities/HexAsciiConvertor.java index e3d829db..2510bb00 100644 --- a/src/main/java/com/edurekademo/utilities/HexAsciiConvertor.java +++ b/src/main/java/com/edurekademo/utilities/HexAsciiConvertor.java @@ -7,7 +7,7 @@ public class HexAsciiConvertor { * @param hexValue * @return outputAscii */ - + public static String convertHexToASCII(String hexValue) { StringBuilder outputAscii = new StringBuilder(); @@ -27,19 +27,19 @@ public static String convertHexToASCII(String hexValue) } return asciiValue; } - + /** * Method to convert ascii values into hexadecimal * method is returning the hexadecimal value * @param asciiValue * @return hex */ - + public static String convertAsciiToHex(String asciiValue) { String hexvalue = null; try { - + if(asciiValue!=null) { char[] chars = asciiValue.toCharArray(); @@ -49,11 +49,11 @@ public static String convertAsciiToHex(String asciiValue) hex.append(Integer.toHexString((int) chars[i])); } hexvalue= hex.toString(); - } + } } catch (Exception e) { LoggerStackTraceUtil.printErrorMessage(e); } return hexvalue; } -} \ No newline at end of file +} diff --git a/src/main/java/com/edurekademo/utilities/LoggerStackTraceUtil.java b/src/main/java/com/edurekademo/utilities/LoggerStackTraceUtil.java index 3631b781..8c64bd78 100644 --- a/src/main/java/com/edurekademo/utilities/LoggerStackTraceUtil.java +++ b/src/main/java/com/edurekademo/utilities/LoggerStackTraceUtil.java @@ -6,28 +6,28 @@ // Class used to log the print stack trace items public class LoggerStackTraceUtil { - private static final Logger LOG =LoggerFactory.getLogger(LoggerStackTraceUtil.class); - private int maxCount=3; + private static final Logger LOG =LoggerFactory.getLogger(LoggerStackTraceUtil.class); + private int maxCount=3; /** - * @param th - The exception that was thrown and to be logged. - * @return at very least the 1st error, if stacktrace is more than 1, then it also + * @param th - The exception that was thrown and to be logged. + * @return at very least the 1st error, if stacktrace is more than 1, then it also * returns the immediate cause * - * Note this function cannot be made static for thread safety.. + * Note this function cannot be made static for thread safety.. */ - public String getErrorMessage(Throwable th){ - if (th==null) return ""; - StringBuilder b = new StringBuilder(""); + public String getErrorMessage(Throwable th){ + if (th==null) return ""; + StringBuilder b = new StringBuilder(""); String [] aryError = ExceptionUtils.getRootCauseStackTrace(th); - b.append(aryError[0].trim()); + b.append(aryError[0].trim()); if (aryError.length >= 2){ - b.append(String.format("%nCause:%s",aryError[1].trim())); + b.append(String.format("%nCause:%s",aryError[1].trim())); } if (aryError.length >= maxCount){ - b.append(String.format("%nCause:%s",aryError[2].trim())); + b.append(String.format("%nCause:%s",aryError[2].trim())); } - return b.toString(); + return b.toString(); } // Static Logger function @@ -52,8 +52,8 @@ public static void printErrorMessage(Throwable th) // log the exception error LoggerStackTraceUtil.printErrorMessage(e); } - - + + } } diff --git a/src/main/java/com/edurekademo/utilities/PropertyHelper.java b/src/main/java/com/edurekademo/utilities/PropertyHelper.java index a1bf5ab5..6b4ee808 100644 --- a/src/main/java/com/edurekademo/utilities/PropertyHelper.java +++ b/src/main/java/com/edurekademo/utilities/PropertyHelper.java @@ -6,38 +6,38 @@ @SuppressWarnings("unchecked") /** - * Helper Class to load Properties from a property file to be passed to caller for execution. - * Multiple properties can be loaded. - * Note that if same property is specified multiple times in a single file, there is no guaranteed "Winner" - * Also note in the case of loading multiple files and duplicate definition of properties across files, - * the last loaded property file "wins". + * Helper Class to load Properties from a property file to be passed to caller for execution. + * Multiple properties can be loaded. + * Note that if same property is specified multiple times in a single file, there is no guaranteed "Winner" + * Also note in the case of loading multiple files and duplicate definition of properties across files, + * the last loaded property file "wins". * The getProperty()/get() methods also returns "" silently if no such query exists. * @author Seshagiri Sriram - * @version 1.0 + * @version 1.0 * @see PropertyLoader */ public final class PropertyHelper { /** - * hMapProperties contains the hashmap of key/value pairs associated with each property + * hMapProperties contains the hashmap of key/value pairs associated with each property */ protected final static HashMap HMAPPROPERTIES = new HashMap(); - + /** * @param propertyFile * @return */ -public static HashMap loadProperties(String propertyFile) { - Properties properties = PropertyLoader.loadProperties(propertyFile); - Enumeration keys = (Enumeration) properties.propertyNames(); +public static HashMap loadProperties(String propertyFile) { + Properties properties = PropertyLoader.loadProperties(propertyFile); + Enumeration keys = (Enumeration) properties.propertyNames(); while (keys.hasMoreElements()) { String tmpKey = (String) keys.nextElement(); - HMAPPROPERTIES.put(tmpKey,properties.getProperty(tmpKey)); - + HMAPPROPERTIES.put(tmpKey,properties.getProperty(tmpKey)); + } - return HMAPPROPERTIES; + return HMAPPROPERTIES; } @@ -46,17 +46,17 @@ public static HashMap loadProperties(String propertyFile) { * @return */ public static String getProperty(String propertyName){ - String propertyValue = ""; - try { - propertyValue = (String) HMAPPROPERTIES.get(propertyName); + String propertyValue = ""; + try { + propertyValue = (String) HMAPPROPERTIES.get(propertyName); } catch (Exception e){ LoggerStackTraceUtil.printErrorMessage(e); - propertyValue = ""; + propertyValue = ""; } - finally { + finally { } - return propertyValue; + return propertyValue; } /** @@ -66,9 +66,9 @@ public static String getProperty(String propertyName){ * @return Property value/Default Value as String */ public static String getProperty(String propertyName,String strDefault){ - String propertyValue = ""; - try { - propertyValue = (String) HMAPPROPERTIES.get(propertyName); + String propertyValue = ""; + try { + propertyValue = (String) HMAPPROPERTIES.get(propertyName); // Check the property value is null/not if(propertyValue == null){ // Assign the default value to the propertyValue @@ -77,21 +77,20 @@ public static String getProperty(String propertyName,String strDefault){ } catch (Exception e){ LoggerStackTraceUtil.printErrorMessage(e); - propertyValue = ""; + propertyValue = ""; } - finally { + finally { } - return propertyValue; + return propertyValue; } /** - * A convenience method (aliasing getProperty) - * @param propertyName property to be retrieved. + * A convenience method (aliasing getProperty) + * @param propertyName property to be retrieved. * @return * @see getProperty */ public static String get(String propertyName){ - return getProperty(propertyName); + return getProperty(propertyName); } } - diff --git a/src/main/java/com/edurekademo/utilities/PropertyLoader.java b/src/main/java/com/edurekademo/utilities/PropertyLoader.java index 628918ae..8bc319d2 100644 --- a/src/main/java/com/edurekademo/utilities/PropertyLoader.java +++ b/src/main/java/com/edurekademo/utilities/PropertyLoader.java @@ -16,21 +16,21 @@ * following names refer to the same resource: * * @author Seshagiri Sriram - * @version 1.0 - * @param name classpath resource name [may not be null] - * @param loader classloader through which to load the resource [null + * @version 1.0 + * @param name classpath resource name [may not be null] + * @param loader classloader through which to load the resource [null * is equivalent to the application loader] - * @return resource converted to java.util.Properties [may be null if the - * resource was not found and THROW_ON_LOAD_FAILURE is false] + * @return resource converted to java.util.Properties [may be null if the + * resource was not found and THROW_ON_LOAD_FAILURE is false] * @throws IllegalArgumentException if the resource was not found and - * THROW_ON_LOAD_FAILURE is true + * THROW_ON_LOAD_FAILURE is true */ -public class PropertyLoader +public class PropertyLoader { - private static final boolean THROW_ON_LOAD_FAILURE = true; - private static final boolean LOAD_AS_RESOURCE_BUNDLE = false; + private static final boolean THROW_ON_LOAD_FAILURE = true; + private static final boolean LOAD_AS_RESOURCE_BUNDLE = false; private static final String SUFFIX = ".properties"; /** @@ -38,70 +38,70 @@ public class PropertyLoader */ private static final Logger LOG =LoggerFactory.getLogger(PropertyLoader.class); - /** - * A convenience overload of {@link #loadProperties(String, ClassLoader)} - * that uses the current thread's context classloader. + /** + * A convenience overload of {@link #loadProperties(String, ClassLoader)} + * that uses the current thread's context classloader. */ - public static Properties loadProperties (final String name) { - return loadProperties (name, Thread.currentThread ().getContextClassLoader ()); + public static Properties loadProperties (final String name) { + return loadProperties (name, Thread.currentThread ().getContextClassLoader ()); } @SuppressWarnings("rawtypes") - public static Properties loadProperties (String names, ClassLoader loader) - { + public static Properties loadProperties (String names, ClassLoader loader) + { String name = null; ClassLoader loaders; - if (names == null) throw new IllegalArgumentException ("null input: name"); - if (names.startsWith ("/")) name = names.substring (1); - if (names.endsWith (SUFFIX)) name = names.substring (0, names.length () - SUFFIX.length ()); - Properties result = null; - InputStream in = null; - try { + if (names == null) throw new IllegalArgumentException ("null input: name"); + if (names.startsWith ("/")) name = names.substring (1); + if (names.endsWith (SUFFIX)) name = names.substring (0, names.length () - SUFFIX.length ()); + Properties result = null; + InputStream in = null; + try { if (loader == null) - loaders = ClassLoader.getSystemClassLoader (); - if (LOAD_AS_RESOURCE_BUNDLE) - { - name = name.replace ('/', '.'); // Throws MissingResourceException on lookup failures: - final ResourceBundle rb = ResourceBundle.getBundle (name, Locale.getDefault (), loaders); - result = new Properties (); - for (Enumeration keys = rb.getKeys (); keys.hasMoreElements ();) - { - final String key = (String) keys.nextElement (); - final String value = rb.getString (key); - result.put (key, value); - } - } - else { - name = name.replace ('.', '/'); - if (! name.endsWith (SUFFIX)) name = name.concat (SUFFIX); // Returns null on lookup failures: + loaders = ClassLoader.getSystemClassLoader (); + if (LOAD_AS_RESOURCE_BUNDLE) + { + name = name.replace ('/', '.'); // Throws MissingResourceException on lookup failures: + final ResourceBundle rb = ResourceBundle.getBundle (name, Locale.getDefault (), loaders); + result = new Properties (); + for (Enumeration keys = rb.getKeys (); keys.hasMoreElements ();) + { + final String key = (String) keys.nextElement (); + final String value = rb.getString (key); + result.put (key, value); + } + } + else { + name = name.replace ('.', '/'); + if (! name.endsWith (SUFFIX)) name = name.concat (SUFFIX); // Returns null on lookup failures: if(loader!=null) - in = loader.getResourceAsStream (name); - if (in != null) { - result = new Properties (); - result.load (in); // Can throw IOException - } - } - } - catch (Exception e) { + in = loader.getResourceAsStream (name); + if (in != null) { + result = new Properties (); + result.load (in); // Can throw IOException + } + } + } + catch (Exception e) { result = new Properties (); LoggerStackTraceUtil.printErrorMessage(e); - } - finally { - if (in != null) - try - { - in.close (); - } - catch (Throwable ignore) {} - } - if (THROW_ON_LOAD_FAILURE && (result == null)) - { - // LOG exception... Do not re-throw this.. as I do not expect users to catch this exception :-) + } + finally { + if (in != null) + try + { + in.close (); + } + catch (Throwable ignore) {} + } + if (THROW_ON_LOAD_FAILURE && (result == null)) + { + // LOG exception... Do not re-throw this.. as I do not expect users to catch this exception :-) //throw new IllegalArgumentException ("could not load [" + name + "]"+ " as " + (LOAD_AS_RESOURCE_BUNDLE ? "a resource bundle" : "a classloader resource")); result = new Properties (); - } - return result; + } + return result; } -} \ No newline at end of file +} diff --git a/src/main/java/com/edurekademo/utilities/StringUtilities.java b/src/main/java/com/edurekademo/utilities/StringUtilities.java index 2f83a35b..8ee0135d 100644 --- a/src/main/java/com/edurekademo/utilities/StringUtilities.java +++ b/src/main/java/com/edurekademo/utilities/StringUtilities.java @@ -14,47 +14,47 @@ /** - * An utility class that is used to split an string into an array list and providing mechanism to - * build a HashMap value based on a variable number of arguements. + * An utility class that is used to split an string into an array list and providing mechanism to + * build a HashMap value based on a variable number of arguements. * @author Seshagiri Sriram - * @version 1.0 + * @version 1.0 * */ public class StringUtilities { /** * The string separator for splitting a string into a list */ - private final static String COMMA_SEPARATOR = ","; + private final static String COMMA_SEPARATOR = ","; /** - * The String separator for splitting a parameter value. + * The String separator for splitting a parameter value. * Parameters are expected to be in form: "parametername=value" */ private final static String PARAM_SEPARATOR = "="; /** - * The String separator for splitting a parameter value into appropriate type. + * The String separator for splitting a parameter value into appropriate type. * Required for HQL Queries, never for Native SQL queries * Parameters are expected to be in form: "parametername=value:type (int, string, float, double)" */ private final static String TYPE_SEPARATOR = ";"; /** - * The String separator for splitting a date parameter value into appropriate format. + * The String separator for splitting a date parameter value into appropriate format. */ private final static String DATEFORMAT_SEPARATOR = "@"; - + /** * The method to be invoked to convert a given String value to a specific Object type */ private final static String CONVERTOR_METHOD_NAME = "valueOf" ; - + /** * The String to represent the type "DATE" */ private final static String DATE_TYPE = "date" ; - + /** * Default Date format to which the date will be formatted */ - + private final static String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss" ; /** * Variable to represent the type "STRING" @@ -78,24 +78,24 @@ public class StringUtilities { } /** - * given a comma separated string and type, returns an ArrayList of specific types - * @param strParamValueList The string (assumed to be comma separated). Usually meant for use in creating + * given a comma separated string and type, returns an ArrayList of specific types + * @param strParamValueList The string (assumed to be comma separated). Usually meant for use in creating * parameter values for passing in IN Clauses * @param type The type of the Arraylist passed * @return ArrayList if passed value is not null or empty, null otherwise */ public static List convertStringToList(String strParamValueList,String type){ - if (strParamValueList==null||strParamValueList.trim().isEmpty()) return null; - ArrayList list = new ArrayList(); - String arr[] = strParamValueList.trim().split(COMMA_SEPARATOR); + if (strParamValueList==null||strParamValueList.trim().isEmpty()) return null; + ArrayList list = new ArrayList(); + String arr[] = strParamValueList.trim().split(COMMA_SEPARATOR); for(String tmpString: arr){ - list.add(convert(tmpString,type)); + list.add(convert(tmpString,type)); } - return list; + return list; } - + /** - * given a variable list of String parameters, forms a hash map + * given a variable list of String parameters, forms a hash map * @param strParamValueList Variable list of arguments each of format: key=kevalue;type. * For the type date,you can even pass the dateformat value as key=keyvalue@dateformat;type. * If dateformat is not passed default format yyyy-MM-dd HH:mm:ss will be taken. @@ -103,26 +103,26 @@ public static List convertStringToList(String strParamValueList,String t * support only int, string, boolean, float, double, long, date */ public static HashMap createParameterList(String... strParamValueList){ - HashMap hMap = new HashMap(); + HashMap hMap = new HashMap(); for(String strArg: strParamValueList){ String type = null; if(strArg.contains(TYPE_SEPARATOR)){ - type = strArg.split(TYPE_SEPARATOR)[1]; + type = strArg.split(TYPE_SEPARATOR)[1]; strArg = strArg.split(TYPE_SEPARATOR)[0]; } if (strArg.contains(PARAM_SEPARATOR)){ - String arr[] = strArg.split(PARAM_SEPARATOR); + String arr[] = strArg.split(PARAM_SEPARATOR); if (arr[1].contains(COMMA_SEPARATOR)){ - hMap.put(arr[0], convertStringToList(arr[1],type)); + hMap.put(arr[0], convertStringToList(arr[1],type)); } else { - hMap.put(arr[0], convert(arr[1],type)); + hMap.put(arr[0], convert(arr[1],type)); } } } - return hMap; + return hMap; } - + /** * Converts the given String value to the intended type of Object * @param value The String value to be converted @@ -136,14 +136,14 @@ private static Object convert(String value, String types) { if ((value == null) || value.isEmpty() || types == null || types.isEmpty() || types.equalsIgnoreCase(STRING_TYPE)) return value; String type = types.toLowerCase(); - - if (type.equals(DATE_TYPE)) return convertStringToDate(value); - - //Based on the passed type load the wrapper class. + + if (type.equals(DATE_TYPE)) return convertStringToDate(value); + + //Based on the passed type load the wrapper class. //If the given type not permitted returns values as such if(PRIMITIVE_NAME_TYPE_MAP.containsKey(type)) finalClass = PRIMITIVE_NAME_TYPE_MAP.get(type); - + try { //Invoking the valueOf method of the Wrapper Class dynamically using reflection if(finalClass!=null){ @@ -152,13 +152,13 @@ private static Object convert(String value, String types) { if (Modifier.isStatic(mods) && Modifier.isPublic(mods)) { return method.invoke(null, value); } - } + } } catch (NoSuchMethodException e) { LoggerStackTraceUtil.printErrorMessage(e); } catch (IllegalAccessException e) { - // this won't happen + // this won't happen LoggerStackTraceUtil.printErrorMessage(e); } catch (InvocationTargetException e) { @@ -183,7 +183,7 @@ private static Object convertStringToDate(String dateString) { dateFormat = (dateString.contains(DATEFORMAT_SEPARATOR)) ? dateString.split(DATEFORMAT_SEPARATOR)[1] : DATE_FORMAT ; dateStringVal = (dateString.contains(DATEFORMAT_SEPARATOR)) ? dateString.split(DATEFORMAT_SEPARATOR)[0] : dateString ; SimpleDateFormat dateFormatter = new SimpleDateFormat(dateFormat); - + try{ finalDate = dateFormatter.parse(dateStringVal); }catch(ParseException e){ diff --git a/src/main/pmd/pmd.xsl b/src/main/pmd/pmd.xsl index 33eee081..f44df772 100644 --- a/src/main/pmd/pmd.xsl +++ b/src/main/pmd/pmd.xsl @@ -269,7 +269,3 @@ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> - - - - diff --git a/src/main/pmd/ruleset_basics.xml b/src/main/pmd/ruleset_basics.xml index 99e5c5b6..ccc2c4a4 100644 --- a/src/main/pmd/ruleset_basics.xml +++ b/src/main/pmd/ruleset_basics.xml @@ -7,13 +7,13 @@ These are the rules by which Applications will be built. - +--> 3 3 3 diff --git a/src/main/pmd/ruleset_j2ee.xml b/src/main/pmd/ruleset_j2ee.xml index b249f1d3..273e4868 100644 --- a/src/main/pmd/ruleset_j2ee.xml +++ b/src/main/pmd/ruleset_j2ee.xml @@ -7,13 +7,13 @@ These are the rules by which J2EE/Web Applications will be built. - +LOW : 5 +--> 3 3 3 @@ -29,7 +29,7 @@ Scripts should be part of Tag Libraries, rather than part of JSP pages. - 10) ] ]]> @@ -82,7 +82,7 @@ Scriptlets should be factored into Tag Libraries or JSP declarations, rather tha - <% @@ -101,7 +101,7 @@ response.setHeader("Pragma", "No-cache"); message="Avoid having style information in JSP files." class="net.sourceforge.pmd.lang.jsp.rule.basic.NoInlineStyleInformationRule" externalInfoUrl="http://pmd.sourceforge.net/snapshot/pmd-jsp/rules/jsp/basic.html#NoInlineStyleInformation"> - or tags, or attributes like "align='center'". ]]> 3 @@ -171,7 +171,7 @@ through SSL. See http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q261188 - @@ -203,7 +203,7 @@ through SSL. See http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q261188 - @@ -230,7 +230,7 @@ through SSL. See http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q261188 3 - /foo\">xxtext ]]> @@ -253,8 +253,8 @@ A missing 'meta' tag or page directive will trigger this rule, as well as a non- //Content[ not(Element[@Name="meta"][ Attribute[@Name="content"]/AttributeValue[contains(lower-case(@Image),"charset=utf-8")] -]) -and +]) +and not(JspDirective[@Name='page']/JspDirectiveAttribute[@Name='contentType'][contains(lower-case(@Value),"charset=utf-8")]) ] ]]> @@ -264,9 +264,9 @@ and - + ]]> @@ -296,14 +296,14 @@ Externalized script could be reused between pages. Browsers can also cache the - + ]]> - + These rules check the security guidelines from Sun, published at http://java.sun.com/security/seccodeguide.html#gcg - +LOW : 5 +--> 3 3 diff --git a/src/test/java/com/edurekademo/utilities/ExceptionThrower.java b/src/test/java/com/edurekademo/utilities/ExceptionThrower.java index dad8c99e..23888e8a 100644 --- a/src/test/java/com/edurekademo/utilities/ExceptionThrower.java +++ b/src/test/java/com/edurekademo/utilities/ExceptionThrower.java @@ -9,38 +9,38 @@ public class ExceptionThrower { private static final Logger LOG=LoggerFactory.getLogger(ExceptionThrower.class); - public void getCounter() { + public void getCounter() { int i = 1/0; // this will throw the error... LOG.info(""+i); } - + public void doNothing() throws IOException { - throw new IOException("TESTIOEXCEPTION"); + throw new IOException("TESTIOEXCEPTION"); } - - private void doXXX() { - try { - doYYY(); - String s = null; - if("sss".equals(s)) { + + private void doXXX() { + try { + doYYY(); + String s = null; + if("sss".equals(s)) { LOG.info("ssss"); } } - catch (Exception e){ - LOG.error(new LoggerStackTraceUtil().getErrorMessage(e)); + catch (Exception e){ + LOG.error(new LoggerStackTraceUtil().getErrorMessage(e)); } } - - private void doYYY() { + + private void doYYY() { LOG.error(new LoggerStackTraceUtil().getErrorMessage(new Exception("DEAR"))); } - public void doCheck() throws Exception { - try { - doXXX(); - doNothing(); + public void doCheck() throws Exception { + try { + doXXX(); + doNothing(); } - catch (Exception e){ - throw new Exception("TEST MESSAGE"); + catch (Exception e){ + throw new Exception("TEST MESSAGE"); } } } diff --git a/src/test/java/com/edurekademo/utilities/TestGenericComparator.java b/src/test/java/com/edurekademo/utilities/TestGenericComparator.java index 28e4338b..4567152b 100644 --- a/src/test/java/com/edurekademo/utilities/TestGenericComparator.java +++ b/src/test/java/com/edurekademo/utilities/TestGenericComparator.java @@ -9,7 +9,7 @@ import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; -import org.junit.*; +import org.junit.*; /** * @author Seshagiri Sriram * @@ -20,47 +20,47 @@ public class TestGenericComparator extends TestCase { - public void initialize(ArrayList myData) { - UnitDTO d1 = new UnitDTO(); - d1.setDeptID(100);d1.setEmpID(200);d1.setEmpName("Sriram");d1.setSpare(new Double(18.0));d1.setSpare2(new Double(18.0)); - UnitDTO d2 = new UnitDTO(); + public void initialize(ArrayList myData) { + UnitDTO d1 = new UnitDTO(); + d1.setDeptID(100);d1.setEmpID(200);d1.setEmpName("Sriram");d1.setSpare(new Double(18.0));d1.setSpare2(new Double(18.0)); + UnitDTO d2 = new UnitDTO(); d2.setDeptID(100);d2.setEmpID(201);d2.setEmpName("Somebody");d2.setSpare(new Double(11.0));d2.setSpare2(new Double(11.0)); - UnitDTO d3 = new UnitDTO(); + UnitDTO d3 = new UnitDTO(); d3.setDeptID(100);d3.setEmpID(100);d3.setEmpName("Rajan");d3.setSpare(new Double(12.0));d3.setSpare2(new Double(12.0)); - UnitDTO d4 = new UnitDTO(); + UnitDTO d4 = new UnitDTO(); d4.setDeptID(100);d4.setEmpID(102);d4.setEmpName("Vellman");d4.setSpare(new Double(10.0));d4.setSpare2(new Double(10.0)); - UnitDTO d5 = new UnitDTO(); + UnitDTO d5 = new UnitDTO(); d5.setDeptID(100);d5.setEmpID(110);d5.setEmpName("Asma");d5.setSpare(new Double(10.0));d5.setSpare2(new Double(10.0)); - myData.add(d1); myData.add(d2); myData.add(d3); myData.add(d4); myData.add(d5); + myData.add(d1); myData.add(d2); myData.add(d3); myData.add(d4); myData.add(d5); } - public void initialize2(ArrayList myData) { - UnitDTO d1 = new UnitDTO(); - d1.setDeptID(100);d1.setEmpID(200);d1.setEmpName("Sriram");d1.setSpare(new Double(18.0));d1.setSpare2("A"); - UnitDTO d2 = new UnitDTO(); + public void initialize2(ArrayList myData) { + UnitDTO d1 = new UnitDTO(); + d1.setDeptID(100);d1.setEmpID(200);d1.setEmpName("Sriram");d1.setSpare(new Double(18.0));d1.setSpare2("A"); + UnitDTO d2 = new UnitDTO(); d2.setDeptID(100);d2.setEmpID(201);d2.setEmpName("Somebody");d2.setSpare(new Double(11.0));d2.setSpare2("B"); - UnitDTO d3 = new UnitDTO(); + UnitDTO d3 = new UnitDTO(); d3.setDeptID(100);d3.setEmpID(100);d3.setEmpName("Rajan");d3.setSpare(new Double(12.0));d3.setSpare2("C"); - UnitDTO d4 = new UnitDTO(); + UnitDTO d4 = new UnitDTO(); d4.setDeptID(100);d4.setEmpID(102);d4.setEmpName("Vellman");d4.setSpare(new Double(10.0));d4.setSpare2("D"); - UnitDTO d5 = new UnitDTO(); + UnitDTO d5 = new UnitDTO(); d5.setDeptID(100);d5.setEmpID(110);d5.setEmpName("Asma");d5.setSpare(new Double(10.0));d5.setSpare2("Z"); - myData.add(d1); myData.add(d2); myData.add(d3); myData.add(d4); myData.add(d5); + myData.add(d1); myData.add(d2); myData.add(d3); myData.add(d4); myData.add(d5); } - public void initialize3(ArrayList myData) { - UnitDTO d1 = new UnitDTO(); - d1.setDeptID(100);d1.setEmpID(200);d1.setEmpName("Sriram");d1.setSpare(new Double(18.0));d1.setSpare2("A"); - UnitDTO d2 = new UnitDTO(); + public void initialize3(ArrayList myData) { + UnitDTO d1 = new UnitDTO(); + d1.setDeptID(100);d1.setEmpID(200);d1.setEmpName("Sriram");d1.setSpare(new Double(18.0));d1.setSpare2("A"); + UnitDTO d2 = new UnitDTO(); d2.setDeptID(100);d2.setEmpID(201);d2.setEmpName("asma");d2.setSpare(new Double(11.0));d2.setSpare2("B"); - UnitDTO d3 = new UnitDTO(); + UnitDTO d3 = new UnitDTO(); d3.setDeptID(100);d3.setEmpID(100);d3.setEmpName("Rajan");d3.setSpare(new Double(12.0));d3.setSpare2("C"); - UnitDTO d4 = new UnitDTO(); + UnitDTO d4 = new UnitDTO(); d4.setDeptID(100);d4.setEmpID(102);d4.setEmpName("Vellman");d4.setSpare(new Double(10.0));d4.setSpare2("D"); - UnitDTO d5 = new UnitDTO(); + UnitDTO d5 = new UnitDTO(); d5.setDeptID(100);d5.setEmpID(110);d5.setEmpName("Asma");d5.setSpare(new Double(10.0));d5.setSpare2("Z"); - - UnitDTO d6 = new UnitDTO(); + + UnitDTO d6 = new UnitDTO(); d6.setDeptID(100);d6.setEmpID(110);d6.setEmpName("ASMA");d6.setSpare(new Double(10.0));d6.setSpare2("Z"); myData.add(d1); myData.add(d2); myData.add(d3); myData.add(d4); myData.add(d5); myData.add(d6); @@ -90,8 +90,8 @@ public static Test suite() */ public void testSortEmpNameAsc() { ArrayList myData = new ArrayList(); initialize(myData); - Collections.sort(myData, new GenericComparator("empName", true)); // sort ascending.. - assertEquals("Asma", ((UnitDTO)myData.get(0)).getEmpName()); + Collections.sort(myData, new GenericComparator("empName", true)); // sort ascending.. + assertEquals("Asma", ((UnitDTO)myData.get(0)).getEmpName()); } /** @@ -100,11 +100,11 @@ public void testSortEmpNameAsc() { public void testSortEmpNameDesc() { ArrayList myData = new ArrayList(); initialize(myData); Collections.sort(myData, new GenericComparator("empName", false)); // sort ascending.. - assertEquals("Vellman", ((UnitDTO)myData.get(0)).getEmpName()); - + assertEquals("Vellman", ((UnitDTO)myData.get(0)).getEmpName()); + } - + /** * Test for Sorting by Emp ID Ascending */ @@ -112,8 +112,8 @@ public void testSortEmpNameDesc() { public void testSortEmpIDAsc() { ArrayList myData = new ArrayList(); initialize(myData); - Collections.sort(myData, new GenericComparator("empID", true)); // sort ascending.. - assertEquals("Rajan", ((UnitDTO)myData.get(0)).getEmpName()); + Collections.sort(myData, new GenericComparator("empID", true)); // sort ascending.. + assertEquals("Rajan", ((UnitDTO)myData.get(0)).getEmpName()); } @@ -123,9 +123,9 @@ public void testSortEmpIDAsc() { public void testSortEmpIDDesc() { ArrayList myData = new ArrayList(); initialize(myData); - Collections.sort(myData, new GenericComparator("empID", false)); // sort Descending - assertEquals("Somebody", ((UnitDTO)myData.get(0)).getEmpName()); - + Collections.sort(myData, new GenericComparator("empID", false)); // sort Descending + assertEquals("Somebody", ((UnitDTO)myData.get(0)).getEmpName()); + } /** @@ -133,8 +133,8 @@ public void testSortEmpIDDesc() { */ public void testSortEmpSpareAsc() { ArrayList myData = new ArrayList(); initialize(myData); - Collections.sort(myData, new GenericComparator("spare", true)); // sort ascending - assertEquals("Vellman", ((UnitDTO)myData.get(0)).getEmpName()); + Collections.sort(myData, new GenericComparator("spare", true)); // sort ascending + assertEquals("Vellman", ((UnitDTO)myData.get(0)).getEmpName()); } /** @@ -142,9 +142,9 @@ public void testSortEmpSpareAsc() { */ public void testSortEmpSpareDesc() { ArrayList myData = new ArrayList(); initialize(myData); - Collections.sort(myData, new GenericComparator("spare", false)); // sort Descending - assertEquals("Sriram", ((UnitDTO)myData.get(0)).getEmpName()); - + Collections.sort(myData, new GenericComparator("spare", false)); // sort Descending + assertEquals("Sriram", ((UnitDTO)myData.get(0)).getEmpName()); + } @@ -154,9 +154,9 @@ public void testSortEmpSpareDesc() { public void testSortEmpSpareDesc2() { ArrayList myData = new ArrayList(); initialize(myData); - Collections.sort(myData, new GenericComparator("spare2", false)); // sort Descending - assertEquals("Sriram", ((UnitDTO)myData.get(0)).getEmpName()); - + Collections.sort(myData, new GenericComparator("spare2", false)); // sort Descending + assertEquals("Sriram", ((UnitDTO)myData.get(0)).getEmpName()); + } /** @@ -165,9 +165,9 @@ public void testSortEmpSpareDesc2() { public void testSortEmpSpareAsc2() { ArrayList myData = new ArrayList(); initialize(myData); - Collections.sort(myData, new GenericComparator("spare2", true)); // sort ascending - assertEquals("Vellman", ((UnitDTO)myData.get(0)).getEmpName()); - + Collections.sort(myData, new GenericComparator("spare2", true)); // sort ascending + assertEquals("Vellman", ((UnitDTO)myData.get(0)).getEmpName()); + } /** @@ -175,8 +175,8 @@ public void testSortEmpSpareAsc2() { */ public void testSortEmpSpare2StringAsc() { ArrayList myData = new ArrayList(); initialize2(myData); - Collections.sort(myData, new GenericComparator("spare2", true)); // sort ascending - assertEquals("A", ((UnitDTO)myData.get(0)).getSpare2()); + Collections.sort(myData, new GenericComparator("spare2", true)); // sort ascending + assertEquals("A", ((UnitDTO)myData.get(0)).getSpare2()); } /** @@ -184,31 +184,31 @@ public void testSortEmpSpare2StringAsc() { */ public void testSortEmpSpare2StringDesc() { ArrayList myData = new ArrayList(); initialize2(myData); - Collections.sort(myData, new GenericComparator("spare2", false)); // sort Descending - assertEquals("Z", ((UnitDTO)myData.get(0)).getSpare2()); + Collections.sort(myData, new GenericComparator("spare2", false)); // sort Descending + assertEquals("Z", ((UnitDTO)myData.get(0)).getSpare2()); } /** * Test for Sorting by caseInsensitive Emp Name Ascending */ public void testSortEmpNameAscNewComparator() { ArrayList myData = new ArrayList(); initialize3(myData); - Collections.sort(myData, new CaseInsensitiveComparator("empName", true)); // sort ascending.. + Collections.sort(myData, new CaseInsensitiveComparator("empName", true)); // sort ascending.. assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(0)).getEmpName().toUpperCase()); - assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(1)).getEmpName().toUpperCase()); + assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(1)).getEmpName().toUpperCase()); } - + /** * Test for Sorting caseInsensitive by Emp Name Ascending */ public void testSortEmpNameAscNewComparator3Element() { ArrayList myData = new ArrayList(); initialize3(myData); - Collections.sort(myData, new CaseInsensitiveComparator("empName", true)); // sort ascending.. + Collections.sort(myData, new CaseInsensitiveComparator("empName", true)); // sort ascending.. assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(0)).getEmpName().toUpperCase()); - assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(1)).getEmpName().toUpperCase()); - assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(2)).getEmpName().toUpperCase()); + assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(1)).getEmpName().toUpperCase()); + assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(2)).getEmpName().toUpperCase()); } @@ -217,18 +217,18 @@ public void testSortEmpNameAscNewComparator3Element() { */ public void testSortEmpNameDescNewComparator3Element() { ArrayList myData = new ArrayList(); initialize3(myData); - Collections.sort(myData, new CaseInsensitiveComparator("empName", false)); // sort ascending.. + Collections.sort(myData, new CaseInsensitiveComparator("empName", false)); // sort ascending.. assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(3)).getEmpName().toUpperCase()); - assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(4)).getEmpName().toUpperCase()); - assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(5)).getEmpName().toUpperCase()); + assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(4)).getEmpName().toUpperCase()); + assertEquals("Asma".toUpperCase(), ((UnitDTO)myData.get(5)).getEmpName().toUpperCase()); } public void testDoubleSort() { - ArrayList myData = new ArrayList(); - UnitDTO d1 = new UnitDTO(); - d1.setDeptID(100);d1.setEmpID(200);d1.setEmpName("A");d1.setSpare(new Double(18.0));d1.setSpare2(new Double(18.0)); - UnitDTO d2 = new UnitDTO(); + ArrayList myData = new ArrayList(); + UnitDTO d1 = new UnitDTO(); + d1.setDeptID(100);d1.setEmpID(200);d1.setEmpName("A");d1.setSpare(new Double(18.0));d1.setSpare2(new Double(18.0)); + UnitDTO d2 = new UnitDTO(); d2.setDeptID(100);d2.setEmpID(199);d2.setEmpName("D");d2.setSpare(new Double(11.0));d2.setSpare2(new Double(11.0)); UnitDTO d3 = new UnitDTO(); d3.setDeptID(100);d3.setEmpID(201);d3.setEmpName("C");d3.setSpare(new Double(12.0));d3.setSpare2(new Double(12.0)); @@ -237,12 +237,12 @@ public void testDoubleSort() { assertEquals (Integer.valueOf(3), writeList(myData)); Collections.sort(myData, new GenericComparator("empName", true)); // sort Asc assertEquals (Integer.valueOf(3), writeList(myData)); - assertFalse( ((UnitDTO)myData.get(1)).getEmpID() < ((UnitDTO)myData.get(2)).getEmpID()); + assertFalse( ((UnitDTO)myData.get(1)).getEmpID() < ((UnitDTO)myData.get(2)).getEmpID()); } private Integer writeList(ArrayList s){ Integer c = new Integer(s.size()); - return c; + return c; } - - + + } diff --git a/src/test/java/com/edurekademo/utilities/TestHexAsciiConversion.java b/src/test/java/com/edurekademo/utilities/TestHexAsciiConversion.java index 16e58505..df89d419 100644 --- a/src/test/java/com/edurekademo/utilities/TestHexAsciiConversion.java +++ b/src/test/java/com/edurekademo/utilities/TestHexAsciiConversion.java @@ -27,32 +27,32 @@ public void testAsciiToHexValid() { assertEquals(" ",hexadecimalValue, "74657374696e6720617363696920636f6e76657274696f6e20696e746f2068657861646563696d616c"); System.out.println(hexadecimalValue); } - + @Test public void testAsciiToHexNull() { String hexvalueNull=conversion.convertHexToASCII(null); assertNull("Result should be null", hexvalueNull); - + } - + @Test - + public void testHexToAsciiValid() { String asciiValue=conversion.convertHexToASCII(hexvalue); - + assertEquals(" ",asciiValue,"testing ascii convertion into hexadecimal"); System.out.println(asciiValue); } - + @Test public void testHextoAsciiNull() { String asciiValueNull=conversion.convertAsciiToHex(null); assertNull("Result should be null", asciiValueNull); - + } - + } diff --git a/src/test/java/com/edurekademo/utilities/TestLogger.java b/src/test/java/com/edurekademo/utilities/TestLogger.java index db577c50..68be98cf 100644 --- a/src/test/java/com/edurekademo/utilities/TestLogger.java +++ b/src/test/java/com/edurekademo/utilities/TestLogger.java @@ -10,79 +10,79 @@ public class TestLogger { @Test public void testGetErrorMessage1() { String s = "Not Implemented"; - try { - int f = 1/0; + try { + int f = 1/0; System.out.println(f); } catch (Exception e){ LoggerStackTraceUtil util = new LoggerStackTraceUtil(); - s = util.getErrorMessage(e); + s = util.getErrorMessage(e); } LOG.info(s); - assert(s.contains(System.getProperty("line.separator"))); + assert(s.contains(System.getProperty("line.separator"))); } @Test public void testGetErrorMessage2() { String s = "Not Implemented"; LoggerStackTraceUtil util = new LoggerStackTraceUtil(); - try { - int f = 1/0; + try { + int f = 1/0; LOG.info(""+f); } catch (Exception e){ - s = util.getErrorMessage(e); + s = util.getErrorMessage(e); } LOG.info(s); - assert(s.contains("/ by zero")); + assert(s.contains("/ by zero")); } @Test public void testGetErrorMessage3() { String s = "Not Implemented"; - try { - ExceptionThrower g = new ExceptionThrower(); + try { + ExceptionThrower g = new ExceptionThrower(); g.getCounter(); } catch (Exception e){ LoggerStackTraceUtil util = new LoggerStackTraceUtil(); - s = util.getErrorMessage(e); + s = util.getErrorMessage(e); } LOG.info(s); - assert(s.contains("/ by zero")); + assert(s.contains("/ by zero")); } @Test public void testGetErrorMessage4() { String s = "Not Implemented"; - try { - ExceptionThrower g = new ExceptionThrower(); + try { + ExceptionThrower g = new ExceptionThrower(); g.doNothing(); } catch (Exception e){ LoggerStackTraceUtil util = new LoggerStackTraceUtil(); - s = util.getErrorMessage(e); + s = util.getErrorMessage(e); } LOG.info(s); - assert(s.contains("TESTIOEXCEPTION")); + assert(s.contains("TESTIOEXCEPTION")); } - + @Test public void testGetErrorMessage5() { String s = "Not Implemented"; - try { - ExceptionThrower g = new ExceptionThrower(); + try { + ExceptionThrower g = new ExceptionThrower(); g.doCheck(); } catch (Exception e){ LoggerStackTraceUtil util = new LoggerStackTraceUtil(); - s = util.getErrorMessage(e); + s = util.getErrorMessage(e); } - finally { + finally { LOG.info(s); - System.out.println("***** "+s); - assert(s.contains("TEST MESSAGE")); + System.out.println("***** "+s); + assert(s.contains("TEST MESSAGE")); } } diff --git a/src/test/java/com/edurekademo/utilities/UnitDTO.java b/src/test/java/com/edurekademo/utilities/UnitDTO.java index 67c92ad5..575ebd2b 100644 --- a/src/test/java/com/edurekademo/utilities/UnitDTO.java +++ b/src/test/java/com/edurekademo/utilities/UnitDTO.java @@ -3,12 +3,12 @@ public class UnitDTO { private Integer empID; - private String empName; - private Integer deptID; + private String empName; + private Integer deptID; private String dateofJoining; - private Double spare; - private Object spare2; - + private Double spare; + private Object spare2; + public Integer getEmpID() { return empID; } @@ -45,7 +45,7 @@ public Object getSpare2() { public void setSpare2(Object spare2) { this.spare2 = spare2; } - - public UnitDTO() { + + public UnitDTO() { } } diff --git a/src/test/resources/Dateformat.properties b/src/test/resources/Dateformat.properties index 330e2c4d..8a2250a3 100644 --- a/src/test/resources/Dateformat.properties +++ b/src/test/resources/Dateformat.properties @@ -1,4 +1,4 @@ EXPECTED=yyyy-MM-dd ACTUAL=dd-MM-yyyy TIME=hh:mm:ss aa -TIMEIN=HH:mm:ss \ No newline at end of file +TIMEIN=HH:mm:ss From cedfa0455c1a370cc6a0d6e6036406ae8b212ebf Mon Sep 17 00:00:00 2001 From: "anshul.vijayvargiya" Date: Wed, 10 Mar 2021 14:47:21 +0530 Subject: [PATCH 09/10] Update .DS_Store --- .DS_Store | Bin 8196 -> 8196 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/.DS_Store b/.DS_Store index dedeb7eeb2c5593eb372fb0eb9ce64aeccf42f22..d913f6d9fdd5b5359b56fb3537b278e894e76790 100644 GIT binary patch delta 199 zcmZp1XmOa}&nUSuU^hRbC;EWf!}IFFH+4XmjEsHK>}YVv6@`OObS)-Y{mm-xmqdA*1c IR{51o06pn5r2qf` delta 108 zcmZp1XmOa}&nUhzU^hRb_+%b|BaJT^-RK4N4F^PK!gNP_j`6z+9llO=_vp)5;b z8ELiy3_!rbpvRETkjYR|7F?8hAbF}Chril$zo7pA4v1~3EodD#N F0{{^GA=dx^ From 6b10c6c94e5f5468b1e2183e8db5eef0397c59fc Mon Sep 17 00:00:00 2001 From: "anshul.vijayvargiya" Date: Wed, 10 Mar 2021 14:48:53 +0530 Subject: [PATCH 10/10] Update TestSCMPoll.txt --- TestSCMPoll.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/TestSCMPoll.txt b/TestSCMPoll.txt index 3d16f7ec..26d91cb7 100644 --- a/TestSCMPoll.txt +++ b/TestSCMPoll.txt @@ -1,3 +1,2 @@ Hello hi -hello hi -hello +hello hi