File tree Expand file tree Collapse file tree 3 files changed +5
-22
lines changed
src/main/org/apache/tools/ant/taskdefs/email Expand file tree Collapse file tree 3 files changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ Other changes:
12
12
13
13
Bugzilla Report 26453
14
14
15
+ * Removes direct references to com.sun.net.ssl.internal.ssl.Provider class
16
+ from the mail task, since that internal JDK class is no longer available
17
+ in recent versions of Java.
18
+ Bugzilla Report 68460
19
+
15
20
Fixed bugs:
16
21
-----------
17
22
Original file line number Diff line number Diff line change 25
25
import java .io .OutputStream ;
26
26
import java .io .PrintStream ;
27
27
import java .io .UnsupportedEncodingException ;
28
- import java .security .Provider ;
29
- import java .security .Security ;
30
28
import java .util .ArrayList ;
31
29
import java .util .List ;
32
30
import java .util .Locale ;
@@ -148,15 +146,6 @@ public void send() {
148
146
Session sesh ;
149
147
Authenticator auth = null ;
150
148
if (SSL ) {
151
- try {
152
- final Provider p =
153
- Class .forName ("com.sun.net.ssl.internal.ssl.Provider" )
154
- .asSubclass (Provider .class ).getDeclaredConstructor ().newInstance ();
155
- Security .addProvider (p );
156
- } catch (final Exception e ) {
157
- throw new BuildException (
158
- "could not instantiate ssl security provider, check that you have JSSE in your classpath" );
159
- }
160
149
// SMTP provider
161
150
props .put ("mail.smtp.socketFactory.class" , SSL_FACTORY );
162
151
props .put ("mail.smtp.socketFactory.fallback" , "false" );
Original file line number Diff line number Diff line change 25
25
import java .io .OutputStream ;
26
26
import java .io .PrintStream ;
27
27
import java .io .UnsupportedEncodingException ;
28
- import java .security .Provider ;
29
- import java .security .Security ;
30
28
import java .util .ArrayList ;
31
29
import java .util .List ;
32
30
import java .util .Locale ;
@@ -150,15 +148,6 @@ public void send() {
150
148
Session sesh ;
151
149
Authenticator auth = null ;
152
150
if (SSL ) {
153
- try {
154
- final Provider p =
155
- Class .forName ("com.sun.net.ssl.internal.ssl.Provider" )
156
- .asSubclass (Provider .class ).getDeclaredConstructor ().newInstance ();
157
- Security .addProvider (p );
158
- } catch (final Exception e ) {
159
- throw new BuildException (
160
- "could not instantiate ssl security provider, check that you have JSSE in your classpath" );
161
- }
162
151
// SMTP provider
163
152
props .put ("mail.smtp.socketFactory.class" , SSL_FACTORY );
164
153
props .put ("mail.smtp.socketFactory.fallback" , "false" );
You can’t perform that action at this time.
0 commit comments