Spring Batch
  1. Spring Batch
  2. BATCH-363

StringBuilder (Java5 only) used in JdbcJobInstanceDao

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.0.m5
    • Fix Version/s: 1.0.0.m5
    • Component/s: Core
    • Labels:
      None

      Description

      StringBuilder is OK, and is used in other places. We compile with Java 5 (with compatibility set to 1.4).

        Activity

        Hide
        Gregory Kick added a comment -

        use StringBuffer instead.

        Show
        Gregory Kick added a comment - use StringBuffer instead.
        Hide
        Douglas C. Kaminsky added a comment -

        StringBuffer is threadsafe, so it's overkill when you don't need threadsafety

        The compiled code will run under 1.4, which satisfies our requirements.

        Show
        Douglas C. Kaminsky added a comment - StringBuffer is threadsafe, so it's overkill when you don't need threadsafety The compiled code will run under 1.4, which satisfies our requirements.
        Hide
        nebhale added a comment -

        Just as some follow up, the Java5 compiler converts all use of StringBuilder to StringBuffer with -target is set to 1.4.

        Show
        nebhale added a comment - Just as some follow up, the Java5 compiler converts all use of StringBuilder to StringBuffer with -target is set to 1.4.
        Hide
        Jean-Rémi PINNA added a comment -

        Does this mean that if I want to use Spring batch with a 1.4.x JDK , I have to recompile with -target 1.4 ??? or will you deploy 2 versions of Spring batch on the maven repo?
        The version 1.0.0-m4 I have retrieved on your repo is not 1.4 compliant.

        java.lang.NoClassDefFoundError: java/lang/StringBuilder
        at org.springframework.batch.execution.repository.dao.JdbcJobDao.createJobKey(JdbcJobDao.java:142)
        at org.springframework.batch.execution.repository.dao.JdbcJobDao.findJobInstances(JdbcJobDao.java:197)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)

        Show
        Jean-Rémi PINNA added a comment - Does this mean that if I want to use Spring batch with a 1.4.x JDK , I have to recompile with -target 1.4 ??? or will you deploy 2 versions of Spring batch on the maven repo? The version 1.0.0-m4 I have retrieved on your repo is not 1.4 compliant. java.lang.NoClassDefFoundError: java/lang/StringBuilder at org.springframework.batch.execution.repository.dao.JdbcJobDao.createJobKey(JdbcJobDao.java:142) at org.springframework.batch.execution.repository.dao.JdbcJobDao.findJobInstances(JdbcJobDao.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
        Hide
        Dave Syer added a comment -

        See also BATCH-383. The distributed jars should be 1.4 compatible, so open another issue if you are sure that they are not - we won't be able to fix it until m5, but that is supposed to be in the next couple of days.

        Show
        Dave Syer added a comment - See also BATCH-383 . The distributed jars should be 1.4 compatible, so open another issue if you are sure that they are not - we won't be able to fix it until m5, but that is supposed to be in the next couple of days.

          People

          • Assignee:
            Robert Kasanicky
            Reporter:
            Robert Kasanicky
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: