File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
main/java/io/ebean/enhance
test/java/io/ebean/enhance/ant Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 11package io .ebean .enhance .ant ;
22
3+ import java .util .ArrayList ;
4+ import java .util .List ;
5+
36import io .ebean .enhance .Transformer ;
47import org .apache .tools .ant .BuildException ;
58import org .apache .tools .ant .Task ;
@@ -55,12 +58,14 @@ public void execute() throws BuildException {
5558 * Combine the packages into the transformArgs to filter enhanced classes via PackageFilter.
5659 */
5760 static String combine (String packages , String transformArgs ) {
58- StringBuilder args = new StringBuilder ();
59- args .append ("packages=" ).append (packages .replace ("**" , "" ));
61+ List <String > args = new ArrayList <>();
62+ if (packages != null && !packages .isEmpty ()) {
63+ args .add ("packages=" + packages .replace ("**" , "" ));
64+ }
6065 if (transformArgs != null && !transformArgs .isEmpty ()) {
61- args .append ( ',' ). append (transformArgs );
66+ args .add (transformArgs );
6267 }
63- return args . toString ( );
68+ return String . join ( ";" , args );
6469 }
6570
6671 /**
Original file line number Diff line number Diff line change @@ -230,8 +230,8 @@ public boolean detectQueryBeanEnhancement(String className) {
230230 * known libraries JDBC drivers etc can be skipped.
231231 */
232232 public boolean isIgnoreClass (String className ) {
233- if (packageFilter != null && packageFilter . ignore ( className ) ) {
234- return true ;
233+ if (packageFilter != null ) {
234+ return packageFilter . ignore ( className ) ;
235235 }
236236 return ignoreClassHelper .isIgnoreClass (className );
237237 }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class AntEnhanceTaskTest {
1010 @ Test
1111 void combine () {
1212 String result = AntEnhanceTask .combine ("com/one/**, com/two/**" , "debug=1" );
13- assertThat (result ).isEqualTo ("packages=com/one/, com/two/, debug=1" );
13+ assertThat (result ).isEqualTo ("packages=com/one/, com/two/; debug=1" );
1414 }
1515
1616 @ Test
You can’t perform that action at this time.
0 commit comments