Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-3068

NPE because ObjectSpecification is of sort VIEW_MODEL but has no ViewModelFacet

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-M7
    • 2.0.0-M8
    • Core
    • None

    Description

      I get a NPE in MangedObjects.refreshViewModel (viewModelFacet is null).
      C.f. https://the-asf.slack.com/archives/CFC42LWBV/p1654177074469069

      Comparisons (uppermost VM) calls a method in ConfigComparisons (another VM).

      @DomainService(nature = NatureOfService.VIEW)
      @Named("knife.Comparisons")
      @RequiredArgsConstructor(onConstructor_ = {@Inject})
      public class Comparisons {
          private final ReleaseComparisons releaseComparisons;
          private final ConfigComparisons configComparisons;
      [...]
       
      @DomainService(nature = NatureOfService.VIEW)
      @Named("knife.ConfigComparisons")
      @RequiredArgsConstructor(onConstructor_ = {@Inject})
      @Slf4j
      public class ConfigComparisons {
          private final MessageService messageService;
          private final Configurations configurations;
          private final Stages stages;
          private final com.kn.ife.Properties properties;
      [...]
      
      @DomainObject(logicalTypeName = "knife.ConfigComparison")
      public class ConfigComparison implements Comparable<ConfigComparison> {
      [...]
      

      Attachments

        1. NPE.txt
          13 kB
          Jörg Rade

        Activity

          People

            hobrom Andi Huber
            joerg.rade Jörg Rade
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: