its base plugin HTTP-516 ERROR NoSuchFieldError: change

149 views
Skip to first unread message

Jiri Tomek

unread,
May 24, 2016, 3:17:03 AM5/24/16
to Repo and Gerrit Discussion
Hi,

I'm trying to use its-jira plugin but every time I try do post a reply and score review I got error 500 displayed and following error appears in error_log:

[2016-05-24 08:00:50,374] [HTTP-516] WARN  org.eclipse.jetty.servlet.ServletHandler : Error for /changes/39/revisions/7fd86f27111f2256b5dc2f0c2caca0a8cf1d7b57/review
java.lang.NoSuchFieldError: change
        at com.googlesource.gerrit.plugins.its.base.its.ItsConfig.isEnabled(ItsConfig.java:70)
        at com.googlesource.gerrit.plugins.its.base.workflow.ActionController.onEvent(ActionController.java:50)
        at com.google.gerrit.common.ChangeHookRunner.fireEventForUnrestrictedListeners(ChangeHookRunner.java:912)
        at com.google.gerrit.common.ChangeHookRunner.fireEvent(ChangeHookRunner.java:924)
        at com.google.gerrit.common.ChangeHookRunner.doCommentAddedHook(ChangeHookRunner.java:495)
        at com.google.gerrit.server.change.PostReview$Op.postUpdate(PostReview.java:385)
        at com.google.gerrit.server.git.BatchUpdate.executePostOps(BatchUpdate.java:601)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:364)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:500)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:495)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:165)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:138)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:90)
        at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:337)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at com.google.gerrit.httpd.GetUserFilter.doFilter(GetUserFilter.java:82)
        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:73)
        at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:117)
        at com.google.gerrit.httpd.RequestMetricsFilter.doFilter(RequestMetricsFilter.java:60)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:136)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:105)
        at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
        at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
[2016-05-24 08:00:50,375] [HTTP-516] ERROR com.google.gerrit.pgm.http.jetty.HiddenErrorHandler : Error in POST /changes/39/revisions/7fd86f27111f2256b5dc2f0c2caca0a8cf1d7b57/review
java.lang.NoSuchFieldError: change
        at com.googlesource.gerrit.plugins.its.base.its.ItsConfig.isEnabled(ItsConfig.java:70)
        at com.googlesource.gerrit.plugins.its.base.workflow.ActionController.onEvent(ActionController.java:50)
        at com.google.gerrit.common.ChangeHookRunner.fireEventForUnrestrictedListeners(ChangeHookRunner.java:912)
        at com.google.gerrit.common.ChangeHookRunner.fireEvent(ChangeHookRunner.java:924)
        at com.google.gerrit.common.ChangeHookRunner.doCommentAddedHook(ChangeHookRunner.java:495)
        at com.google.gerrit.server.change.PostReview$Op.postUpdate(PostReview.java:385)
        at com.google.gerrit.server.git.BatchUpdate.executePostOps(BatchUpdate.java:601)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:364)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:500)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:495)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:165)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:138)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:90)
        at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:337)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at com.google.gerrit.httpd.GetUserFilter.doFilter(GetUserFilter.java:82)
        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:73)
        at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:117)
        at com.google.gerrit.httpd.RequestMetricsFilter.doFilter(RequestMetricsFilter.java:60)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:136)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:105)
        at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
        at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)


I suspect I'm missing some configuration of its-base plugin but don't know what. The files I've edited are as follows:

site_data/etc/its/actions-its-jira.config
[rule "merged"]
    event-type = change-merged
    action = add-standard-comment
[rule "negative-review"]
    event-type = comment-added
    approval-Code-Review = -2,-1
    action = add-comment Someone gave a negative code review in Gerrit on an associated change.
[rule "positive-review"]
    event-type = comment-added
    approval-Code-Review = +2,+1
    action = add-comment Someone gave a positive code review in Gerrit on an associated change
.

site_data/etc/issue-state-transition.config
[action "Start Progress"]
    change=created

[action "Start Review"]
    change=created

[action "Resolve Issue"]
    change=merged



Best regards,
Jiri Tomek

David Pursehouse

unread,
May 24, 2016, 4:29:34 AM5/24/16
to Jiri Tomek, Repo and Gerrit Discussion
What version of Gerrit are you using, and is the plugin you're using built for that version?


--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luca Milanesio

unread,
May 24, 2016, 4:42:54 AM5/24/16
to Jiri Tomek, Repo and Gerrit Discussion
Hi Jiri,
the 'change' field name is the one you specified in your issue state transition config:

[action "Start Progress"]
    change=created

[action "Start Review"]
    change=created

[action "Resolve Issue"]
    change=merged

... are you sure that the field actually exist?
See the documentation of the rule properties at [1] for the latest master version.

What version of ITS Jira and Gerrit are you using?


Jiri Tomek

unread,
May 24, 2016, 5:41:39 AM5/24/16
to Repo and Gerrit Discussion, jiri...@gmail.com

Luca Milanesio

unread,
May 24, 2016, 5:45:43 AM5/24/16
to Jiri Tomek, Repo and Gerrit Discussion
You do not need its-base.jar, it is not a complete plugin and it only contains the base classes for all other its-* jars.
Remove its-base.jar and try again.

Luca.

On 24 May 2016, at 10:41, Jiri Tomek <jiri...@gmail.com> wrote:

Jiri Tomek

unread,
May 24, 2016, 6:11:50 AM5/24/16
to Repo and Gerrit Discussion, jiri...@gmail.com

removed its-base.jar but the error is still there

Luca Milanesio

unread,
May 24, 2016, 6:30:53 PM5/24/16
to Jiri Tomek, Repo and Gerrit Discussion
Look at the code (see [1]) the point of the exception is here:

if (event instanceof CommentAddedEvent) {
CommentAddedEvent e = (CommentAddedEvent) event;
>>>> return isEnabled(e.change.project, e.getRefName());
Seems like the CommentAddedEvent has not anymore the field 'change'.

However look at the hierarchy of CommentAddedEvent, the 'change' field is inherited by ChangeEvent and is here:
public abstract class ChangeEvent extends RefEvent {
public ChangeAttribute change;

Are you 100% sure you are running against a Gerrit 2.12.x ?


On 24 May 2016, at 11:11, Jiri Tomek <jiri...@gmail.com> wrote:


removed its-base.jar but the error is still there

Jiri Tomek

unread,
May 25, 2016, 1:58:31 AM5/25/16
to Repo and Gerrit Discussion, jiri...@gmail.com
this is what I see at the bottom of our Gerrit page:

Powered by Gerrit Code Review (2.12-711-g6e1b2aa)



David Pursehouse

unread,
May 25, 2016, 2:10:01 AM5/25/16
to Jiri Tomek, Repo and Gerrit Discussion
On Wed, May 25, 2016 at 2:58 PM Jiri Tomek <jiri...@gmail.com> wrote:
this is what I see at the bottom of our Gerrit page:

Powered by Gerrit Code Review (2.12-711-g6e1b2aa)



It looks like you're running Gerrit built off the master branch.  Commit 6e1b2aa is not in any released version.

gerrit $ git tag --contains 6e1b2aa
gerrit $

This means you need to use the its-jira plugin built from master, not stable-2.12.

luca.mi...@gmail.com

unread,
May 25, 2016, 2:14:46 AM5/25/16
to David Pursehouse, Jiri Tomek, Repo and Gerrit Discussion
Yeah, that's what I thought straight away ;-) that field was changed to an accessor in Gerrit Master !

@Jiri I would suggest to use a stable 2.12 version of Gerrit rather than master

Luca

Sent from my iPhone

Matthias Sohn

unread,
May 25, 2016, 2:31:51 AM5/25/16
to Jiri Tomek, Repo and Gerrit Discussion
this means your version has 711 commits on top of 2.12 which rather looks like you are running master

On Wed, May 25, 2016 at 7:58 AM, Jiri Tomek <jiri...@gmail.com> wrote:
this is what I see at the bottom of our Gerrit page:

Powered by Gerrit Code Review (2.12-711-g6e1b2aa)



Jiri Tomek

unread,
May 25, 2016, 4:42:00 AM5/25/16
to Repo and Gerrit Discussion
I just tried to update to 2.12.2-51-g24c1634 but the initialization failed with:


Exception in thread "main" com.google.gwtorm.server.OrmException: Cannot downgrade database schema from version 116 to 115.
    at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:68)
    at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:107)
    at com.google.gerrit.pgm.init.BaseInit$SiteRun.upgradeSchema(BaseInit.java:341)
    at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:127)
    at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:159)
    at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:100)
    at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:56)
    at Main.main(Main.java:25)

Is there any way to downgrade the db schema?

Luca Milanesio

unread,
May 25, 2016, 4:44:32 AM5/25/16
to Jiri Tomek, Repo and Gerrit Discussion
Not really: there is no known / easy path to downgrade your set-up.
Is it a new installation or have you been running Gerrit on master in production for some time?

Luca.

David Pursehouse

unread,
May 25, 2016, 4:44:55 AM5/25/16
to Jiri Tomek, Repo and Gerrit Discussion
No.  Instead of downgrading core Gerrit, upgrade the plugin.

Luca Milanesio

unread,
May 25, 2016, 4:58:38 AM5/25/16
to David Pursehouse, Jiri Tomek, Repo and Gerrit Discussion
On 25 May 2016, at 09:44, David Pursehouse <dpurs...@collab.net> wrote:

On Wed, May 25, 2016 at 5:42 PM Jiri Tomek <jiri...@gmail.com> wrote:
I just tried to update to 2.12.2-51-g24c1634 but the initialization failed with:


Exception in thread "main" com.google.gwtorm.server.OrmException: Cannot downgrade database schema from version 116 to 115.
    at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:68)
    at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:107)
    at com.google.gerrit.pgm.init.BaseInit$SiteRun.upgradeSchema(BaseInit.java:341)
    at com.google.gerrit.pgm.init.BaseInit.run(BaseInit.java:127)
    at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:159)
    at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:100)
    at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:56)
    at Main.main(Main.java:25)

Is there any way to downgrade the db schema?

No.  Instead of downgrading core Gerrit, upgrade the plugin

Yes, that would be the only option if you want to keep the data.
Bearing in mind that keeping a Gerrit master version in production could be a "bumpy road" for you.

Luca.

Jiri Tomek

unread,
May 25, 2016, 6:21:11 AM5/25/16
to Repo and Gerrit Discussion, dpurs...@collab.net, jiri...@gmail.com
the "bumpy road" started when I wanted to upgrade from 2.9 to 2.12 and it failed to update the db schema correctly, then I couldn't wait for the .1 version so I grabbed a version from master which has the correction but I didn't realize the db schema has jumped to a higher version

Jiri Tomek

unread,
May 25, 2016, 6:24:22 AM5/25/16
to Repo and Gerrit Discussion, dpurs...@collab.net, jiri...@gmail.com
I just installed the its-jira plugin version v2.12.2-2426-gf9c4866-dirty and following error appeared when trying to post a comment:


[HTTP-49] ERROR com.google.gerrit.httpd.restapi.RestApiServlet : Error in POST /changes/39/revisions/7fd86f27111f2256b5dc2f0c2caca0a8cf1d7b57/review
java.lang.NullPointerException
        at com.googlesource.gerrit.plugins.its.base.util.PropertyExtractor.extractFrom(PropertyExtractor.java:135)
        at com.googlesource.gerrit.plugins.its.base.util.PropertyExtractor.extractFrom(PropertyExtractor.java:198)
        at com.googlesource.gerrit.plugins.its.base.workflow.ActionController.onEvent(ActionController.java:54)

        at com.google.gerrit.common.ChangeHookRunner.fireEventForUnrestrictedListeners(ChangeHookRunner.java:912)
        at com.google.gerrit.common.ChangeHookRunner.fireEvent(ChangeHookRunner.java:924)
        at com.google.gerrit.common.ChangeHookRunner.doCommentAddedHook(ChangeHookRunner.java:495)
        at com.google.gerrit.server.change.PostReview$Op.postUpdate(PostReview.java:385)
        at com.google.gerrit.server.git.BatchUpdate.executePostOps(BatchUpdate.java:601)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:364)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:500)
        at com.google.gerrit.server.git.BatchUpdate.execute(BatchUpdate.java:495)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:165)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:138)
        at com.google.gerrit.server.change.PostReview.apply(PostReview.java:90)
        at com.google.gerrit.httpd.restapi.RestApiServlet.service(RestApiServlet.java:337)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
        at com.google.gerrit.httpd.GetUserFilter.doFilter(GetUserFilter.java:82)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:73)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:117)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.RequestMetricsFilter.doFilter(RequestMetricsFilter.java:60)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)

        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:136)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:105)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)

Luca Milanesio

unread,
May 25, 2016, 6:38:55 AM5/25/16
to Jiri Tomek, Repo and Gerrit Discussion, dpurs...@collab.net
Hi Jiri,
you can navigate through the code yourself at [1] and go to line 135 of the PropertyExtractor.java.

 private Map<String,Set<String>> extractFrom(CommentAddedEvent event,
      Set<Property> common) {
    common.addAll(propertyAttributeExtractor.extractFrom(event.author.get(), "commenter"));
    if (event.approvals != null) {
>>>      for (ApprovalAttribute approvalAttribute : event.approvals.get()) { <<<
        common.addAll(propertyAttributeExtractor.extractFrom(
            approvalAttribute));
      }
    }
    common.add(propertyFactory.create("comment", event.comment));
    return extractFrom((PatchSetEvent) event, common);
  }

Looks like event.approvals.get() returns 'null' instead of an empty list on Gerrit master.

If you look at where CommentAddedEvent gets generated ... this  is actually the case:

event.approvals = Suppliers.memoize(
          new Supplier<ApprovalAttribute[]>() {
            @Override
            public ApprovalAttribute[] get() {
              LabelTypes labelTypes = projectCache.get(
                  change.getProject()).getLabelTypes();
              if (approvals.size() > 0) {
                ApprovalAttribute[] r = new ApprovalAttribute[approvals.size()];
                int i = 0;
                for (Map.Entry<String, Short> approval : approvals.entrySet()) {
                  r[i++] = getApprovalAttribute(labelTypes, approval,
                      oldApprovals);
                }
                return r;
              }
>>>              return null; <<<
            }
          });


Road is bumpy as I said ...


Reply all
Reply to author
Forward
0 new messages