File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
modules/core-module/src/main/java/org/simplejavamail/api/email Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import static java .nio .charset .StandardCharsets .UTF_8 ;
16
16
import static org .simplejavamail .internal .util .Preconditions .checkNonEmptyArgument ;
17
+ import static org .simplejavamail .internal .util .Preconditions .verifyNonnull ;
17
18
18
19
/**
19
20
* A named immutable email attachment information object. The name can be a simple name, a filename or a named embedded image (eg.
@@ -116,7 +117,7 @@ public String readAllData(@SuppressWarnings("SameParameterValue") @NotNull final
116
117
@ NotNull
117
118
public InputStream getDataSourceInputStream () {
118
119
try {
119
- return dataSource .getInputStream ();
120
+ return getDataSource () .getInputStream ();
120
121
} catch (IOException e ) {
121
122
throw new AttachmentResourceException ("Error getting input stream from attachment's data source" , e );
122
123
}
@@ -127,7 +128,7 @@ public InputStream getDataSourceInputStream() {
127
128
*/
128
129
@ NotNull
129
130
public DataSource getDataSource () {
130
- return dataSource ;
131
+ return verifyNonnull ( dataSource ) ;
131
132
}
132
133
133
134
/**
You can’t perform that action at this time.
0 commit comments