Announcement Announcement Module
Collapse
No announcement yet.
StringBuilder JAVA 5 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    thanks for pointing out - http://jira.springframework.org/browse/BATCH-363

    Comment


    • #3
      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!

      Comment


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

        Comment

        Working...
        X