Project

General

Profile

Revision 4b40006d

ID4b40006dcdd36d0cc6f4e1c225fca7e40a28bb1c
Parent 25593544
Child 15376c80

Added by Patrick Plitzner about 3 years ago

ref #6905, #6597 Fix potential NPE

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsPartE4.java
55 55
            return;
56 56
        }
57 57

  
58
        IStructuredSelection structuredSelection = createSelection(selection);
59
        if(structuredSelection.isEmpty()){
60
            showEmptyPage();
61
            return;
62
        }
63

  
64 58
        Object partObject = createPartObject(activePart);
65 59

  
66 60
        if(partObject instanceof IPartContentHasDetails){
61
            IStructuredSelection structuredSelection = createSelection(selection);
62
            if(structuredSelection==null || structuredSelection.isEmpty()){
63
                showEmptyPage();
64
                return;
65
            }
67 66
            if(partObject instanceof IConversationEnabled && ((IConversationEnabled) partObject).getConversationHolder()==null) {
68 67
                //TODO show specific message (refactor EmptyElement to allow specific messages)
69 68
                showEmptyPage();
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/supplementaldata/SupplementalDataPartE4.java
62 62
	        return;
63 63
	    }
64 64

  
65
	    IStructuredSelection structuredSelection = createSelection(selection);
66
	    if(structuredSelection.isEmpty()){
67
	        showEmptyPage();
68
	        return;
69
	    }
70

  
71 65
        Object partObject = createPartObject(activePart);
72 66

  
73 67
	    if(partObject instanceof IPartContentHasSupplementalData) {
68

  
69
	        IStructuredSelection structuredSelection = createSelection(selection);
70
	        if(structuredSelection==null || structuredSelection.isEmpty()){
71
	            showEmptyPage();
72
	            return;
73
	        }
74 74
	        if(structuredSelection.size() != 1){
75 75
	            showEmptyPage();
76 76
	            return;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)