Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-606

UnsupportedOperationException on blame GIT

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.5
    • Labels:
      None
    • Flags:
      Patch

      Description

      Sometimes, running the blame command for GIT return an error for exit code. In this case, Maven SCM throw an
      UnsupportedOperationException :

      Caused by: java.lang.UnsupportedOperationException
      at org.apache.maven.scm.provider.git.gitexe.command.blame.GitBlameCommand.executeBlameCommand(GitBlameCommand.java:46)
      etc...
      

      Is it possible to have the same way that others providers (SVN or TFS for example) which is to return a
      result (with a success to false) ?

      In other word replace :

        throw new UnsupportedOperationException();
      

      by :

      return new BlameScmResult(cl.toString(), "The git command failed.", stderr.getOutput(), false);
      

      Another reason is that we do not know that this UnsupportedOperationException may be raised because is
      a RuntimeException.

      A similar problem : http://jira.codehaus.org/browse/SONARPLUGINS-618

      Do you agree with that ?

        Attachments

        1. GitBlame_UnsupportedOperationException.patch
          1.0 kB
          Fabien Bousquet
        2. SCM606_bis.patch
          4 kB
          Fabien Bousquet

          Issue Links

            Activity

              People

              • Assignee:
                struberg Mark Struberg
                Reporter:
                fafanoulele Fabien Bousquet
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: