Skip to content

Commit 4451f5b

Browse files
ludochgae-java-bot
authored andcommitted
This is Beta work, so we need to remove it from head in Github, and we are now working of a beta branch which has the change https://github.com/GoogleCloudPlatform/appengine-java-standard/tree/2.0.39-beta-wip
PiperOrigin-RevId: 800070758 Change-Id: I80c3330913f78ddf41d3ed2f77623c40c5b8668f
1 parent 457b5a2 commit 4451f5b

9 files changed

Lines changed: 18 additions & 1044 deletions

File tree

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
</dependency>
138138
<dependency>
139139
<groupId>org.mockito</groupId>
140-
<artifactId>mockito-core</artifactId>
140+
<artifactId>mockito-junit-jupiter</artifactId>
141141
<scope>test</scope>
142142
</dependency>
143143
<dependency>

api/src/main/java/com/google/appengine/api/EnvironmentProvider.java

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 Google LLC
2+
* Copyright 2021 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,31 +16,13 @@
1616

1717
package com.google.appengine.api.mail;
1818

19-
import com.google.appengine.api.EnvironmentProvider;
20-
2119
/**
2220
* Factory for creating a {@link MailService}.
2321
*/
2422
final class MailServiceFactoryImpl implements IMailServiceFactory {
2523

26-
private static final String APPENGINE_USE_SMTP_MAIL_SERVICE_ENV = "APPENGINE_USE_SMTP_MAIL_SERVICE";
27-
private final EnvironmentProvider envProvider;
28-
29-
MailServiceFactoryImpl() {
30-
this(new SystemEnvironmentProvider());
31-
}
32-
33-
// For testing
34-
MailServiceFactoryImpl(EnvironmentProvider envProvider) {
35-
this.envProvider = envProvider;
36-
}
37-
3824
@Override
39-
@SuppressWarnings("YodaCondition")
4025
public MailService getMailService() {
41-
if ("true".equals(envProvider.getenv(APPENGINE_USE_SMTP_MAIL_SERVICE_ENV))) {
42-
return new SmtpMailServiceImpl(envProvider);
43-
}
4426
return new MailServiceImpl();
4527
}
4628
}

api/src/main/java/com/google/appengine/api/mail/MailServiceImpl.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@
2525
import java.io.IOException;
2626

2727
/**
28-
* This class implements raw access to the mail service. Applications that don't want to make use of
29-
* Sun's JavaMail can use it directly -- but they will forego the typing and convenience methods
30-
* that JavaMail provides.
28+
* This class implements raw access to the mail service.
29+
* Applications that don't want to make use of Sun's JavaMail
30+
* can use it directly -- but they will forego the typing and
31+
* convenience methods that JavaMail provides.
32+
*
3133
*/
3234
class MailServiceImpl implements MailService {
3335
static final String PACKAGE = "mail";
3436

35-
/** Default constructor. */
36-
MailServiceImpl() {}
37-
3837
/** {@inheritDoc} */
3938
@Override
4039
public void sendToAdmins(Message message)
@@ -48,7 +47,7 @@ public void send(Message message)
4847
throws IllegalArgumentException, IOException {
4948
doSend(message, false);
5049
}
51-
50+
5251
/**
5352
* Does the actual sending of the message.
5453
* @param message The message to be sent.

api/src/main/java/com/google/appengine/api/mail/SmtpMailServiceImpl.java

Lines changed: 0 additions & 259 deletions
This file was deleted.

0 commit comments

Comments
 (0)