Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-7625

Stop using System.lineSeparator, except for writing to files or pipes

    Details

    • Type: Improvement
    • Status: Close Issue
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.0.0, EJBCA 6.15.2
    • Component/s: None
    • Labels:
      None
    • Issue discovered during:
      Another issue
    • Sprint:
      EJBCA Team Bob - 2018 w51

      Description

      We use System.lineSeparator in several places in EJBCA. While this practice is often recommended, it should causes system dependent behavior in places where it is undesirable. For example:

      • Data in the database, which could prevent a migration between Windows <-> Linux.
      • Data sent over the network, for example API responses, which could cause breakage if a client is only tested in an environment using a particular line separator (for example, it has caused test failures on Windows: ECA-7543)

      We should only use System.lineSeparator in code that does something "OS related", such as writing to a file, inter-process communication (e.g. pipes) and server logging (this includes toString)

        Attachments

          Activity

            People

            Assignee:
            samuel Samuel Lidén Borell
            Reporter:
            samuel Samuel Lidén Borell
            Verified by:
            Jekaterina Bunina
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 15 minutes
                1h 15m