Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-34785

Where is my custom field helper throws exception for the default field configuration

    XMLWordPrintable

Details

    Description

      This occurs because the default field configuration's name is null, leading to an exception when trying to build the OK message for it:

      2013-09-13 09:08:11,445 http-bio-8090-exec-24 ERROR admin 548x7759x2 1ps6bjh 172.22.3.135 /rest/whereismycf/1.0/fields/customfield_10000 [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
      java.lang.NullPointerException
      	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
      	at com.google.common.collect.SingletonImmutableList.<init>(SingletonImmutableList.java:41)
      	at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:283)
      	at com.atlassian.jira.customfieldhelper.api.InspectionMessageParameter.<init>(InspectionMessageParameter.java:28)
      	at com.atlassian.jira.customfieldhelper.api.InspectionMessageBuilder.addPlainParameter(InspectionMessageBuilder.java:77)
      	at com.atlassian.jira.customfieldhelper.impl.inspector.field.FieldConfigurationInspector.createOkDetails(FieldConfigurationInspector.java:74)
      

      I changed it in my local copy to to do this:

          public InspectionMessageParameter(Type type, String... values)
          {
              this.type = type;
              if (values.length == 1 && values[0] == null)
              {
                  values[0] = "BUGBUGBUG";
              }
              this.values = ImmutableList.copyOf(values);
          }
      

      and got...

      Attachments

        Activity

          People

            Unassigned Unassigned
            cfuller crf
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: