• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aspectran / aspectran / #3628

22 Jul 2024 08:55PM CUT coverage: 34.07% (+0.01%) from 34.06%
#3628

Pull #681

github

web-flow
Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.7.0 to 3.8.0

Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/apache/maven-javadoc-plugin/releases)
- [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.7.0...maven-javadoc-plugin-3.8.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-javadoc-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #681: Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.7.0 to 3.8.0

13344 of 39166 relevant lines covered (34.07%)

0.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/core/src/main/java/com/aspectran/core/activity/aspect/AspectAdviceResult.java
1
/*
2
 * Copyright (c) 2008-2024 The Aspectran Project
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package com.aspectran.core.activity.aspect;
17

18
import com.aspectran.core.context.rule.AspectAdviceRule;
19
import com.aspectran.core.context.rule.type.AspectAdviceType;
20
import com.aspectran.utils.annotation.jsr305.NonNull;
21

22
import java.util.HashMap;
23
import java.util.Map;
24

25
/**
26
 * Represents the result data for the Aspect Advices.
27
 * Also, It contains the bean objects associated with the Aspect Advice.
28
 */
29
public class AspectAdviceResult {
×
30

31
    private Map<String, Object> aspectAdviceBeanMap;
32

33
    private Map<String, Object> beforeAdviceResultMap;
34

35
    private Map<String, Object> afterAdviceResultMap;
36

37
    private Map<String, Object> aroundAdviceResultMap;
38

39
    private Map<String, Object> finallyAdviceResultMap;
40

41
    public Object getAspectAdviceBean(String aspectId) {
42
        return (aspectAdviceBeanMap != null ? aspectAdviceBeanMap.get(aspectId) : null);
×
43
    }
44

45
    public void putAspectAdviceBean(String aspectId, Object adviceBean) {
46
        if (aspectAdviceBeanMap == null) {
×
47
            aspectAdviceBeanMap = new HashMap<>();
×
48
        }
49
        aspectAdviceBeanMap.put(aspectId, adviceBean);
×
50
    }
×
51

52
    public Object getBeforeAdviceResult(String aspectId) {
53
        return (beforeAdviceResultMap != null ? beforeAdviceResultMap.get(aspectId) : null);
×
54
    }
55

56
    private void putBeforeAdviceResult(String aspectId, Object actionResult) {
57
        if (beforeAdviceResultMap == null) {
×
58
            beforeAdviceResultMap = new HashMap<>();
×
59
        }
60
        beforeAdviceResultMap.put(aspectId, actionResult);
×
61
    }
×
62

63
    public Object getAfterAdviceResult(String aspectId) {
64
        return (afterAdviceResultMap != null ? afterAdviceResultMap.get(aspectId) : null);
×
65
    }
66

67
    private void putAfterAdviceResult(String aspectId, Object actionResult) {
68
        if (afterAdviceResultMap == null) {
×
69
            afterAdviceResultMap = new HashMap<>();
×
70
        }
71
        afterAdviceResultMap.put(aspectId, actionResult);
×
72
    }
×
73

74
    public Object getAroundAdviceResult(String aspectId) {
75
        return (aroundAdviceResultMap != null ? aroundAdviceResultMap.get(aspectId) : null);
×
76
    }
77

78
    private void putAroundAdviceResult(String aspectId, Object actionResult) {
79
        if (aroundAdviceResultMap == null) {
×
80
            aroundAdviceResultMap = new HashMap<>();
×
81
        }
82
        aroundAdviceResultMap.put(aspectId, actionResult);
×
83
    }
×
84

85
    public Object getFinallyAdviceResult(String aspectId) {
86
        return (finallyAdviceResultMap != null ? finallyAdviceResultMap.get(aspectId) : null);
×
87
    }
88

89
    private void putFinallyAdviceResult(String aspectId, Object actionResult) {
90
        if (finallyAdviceResultMap == null) {
×
91
            finallyAdviceResultMap = new HashMap<>();
×
92
        }
93
        finallyAdviceResultMap.put(aspectId, actionResult);
×
94
    }
×
95

96
    public void putAdviceResult(@NonNull AspectAdviceRule aspectAdviceRule, Object adviceActionResult) {
97
        if (aspectAdviceRule.getAspectAdviceType() == AspectAdviceType.BEFORE) {
×
98
            putBeforeAdviceResult(aspectAdviceRule.getAspectId(), adviceActionResult);
×
99
        } else if (aspectAdviceRule.getAspectAdviceType() == AspectAdviceType.AFTER) {
×
100
            putAfterAdviceResult(aspectAdviceRule.getAspectId(), adviceActionResult);
×
101
        } else if (aspectAdviceRule.getAspectAdviceType() == AspectAdviceType.AROUND) {
×
102
            putAroundAdviceResult(aspectAdviceRule.getAspectId(), adviceActionResult);
×
103
        } else if (aspectAdviceRule.getAspectAdviceType() == AspectAdviceType.FINALLY) {
×
104
            putFinallyAdviceResult(aspectAdviceRule.getAspectId(), adviceActionResult);
×
105
        } else {
106
            throw new UnsupportedOperationException("Unrecognized aspect advice type: " +
×
107
                    aspectAdviceRule.getAspectAdviceType());
×
108
        }
109
    }
×
110

111
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc