Results 1 to 4 of 4

Thread: StringBuilder JAVA 5

  1. #1
    Join Date
    Feb 2008
    Posts
    1

    Default StringBuilder JAVA 5

    org.springframework.batch.execution.repository.dao .JdbcJobDao.createJobKey(JdbcJobDao.java:142)
    use of class StringBuilder which appears in JAVA 5

    Will it be fixed ?
    Thanks you very much for great job.
    Jean-Rémi

  2. #2

  3. #3
    Join Date
    Apr 2007
    Posts
    4

    Angry Thread safety overkill

    BATCH-363 is listed as closed and won't be fixed??? As the last respondent suggested, unless you intend to provide separate jars for jdk1.4, (and duplicated for jdk5) you have effectively made an entire framework jdk5 dependent! (Or, if you are unfortunate enough to be stuck on jdk1.4, now you have to build your own framework?)
    Code:
    function @JdbcJobDao.java:142 (in M5: JdbcJobInstanceDao.java)
    =============================
    	private String createJobKey(JobParameters jobParameters){
    		
    		Map props = jobParameters.getParameters();
    		StringBuilder stringBuilder = new StringBuilder();
    		for(Iterator it = props.entrySet().iterator();it.hasNext();){
    			Entry entry = (Entry)it.next();
    			stringBuilder.append(entry.toString() + ";");
    		}
    		
    		return stringBuilder.toString();
    	}
    There are any number of clever ways to construct a semi-colon delimited string than to depend on java.lang.StringBuilder!

  4. #4

    Default

    Distributing Java5-only binaries must have happened by accident, Spring Batch can definitely be run on Java 1.4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •