Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4559

Incorrectly formatted result produced by LocalPatchOperationTarget.info(stream)

XMLWordPrintable

      Addon patches are added to the wrong instance of ModelNode which breaks the CLI `patch info --verbose`. Here is how it should be fixed

      diff --git a/patching/src/main/java/org/jboss/as/patching/tool/PatchOperationTarget.java b/patching/src/main/java/org/jboss/as/patching/tool/PatchOperationTarget.java
      index e739c73847..4901ccc25d 100644
      --- a/patching/src/main/java/org/jboss/as/patching/tool/PatchOperationTarget.java
      +++ b/patching/src/main/java/org/jboss/as/patching/tool/PatchOperationTarget.java
      @@ -183,9 +183,10 @@ public abstract class PatchOperationTarget {
                           }
                       }
                       if(vInfo.hasAddOns()) {
      -                    final ModelNode layerNode = result.get(Constants.ADD_ON);
      +                    final ModelNode layersNode = result.get(Constants.ADD_ON);
                           for(String name : vInfo.getAddOnNames()) {
                               final TargetInfo layerInfo = vInfo.getAddOnInfo(name);
      +                        final ModelNode layerNode = layersNode.get(name);
                               layerNode.get(Constants.CUMULATIVE).set(layerInfo.getCumulativePatchID());
                               final ModelNode patchesNode = layerNode.get(Constants.PATCHES).setEmptyList();
                               if(!layerInfo.getPatchIDs().isEmpty()) {
      

              olubyans@redhat.com Alexey Loubyansky
              olubyans@redhat.com Alexey Loubyansky
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: