Skip to content

Commit a4c5a6e

Browse files
committed
Support java version 1.8
1 parent 5a37420 commit a4c5a6e

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

api/pom.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<profile>
6868
<id>disable-doclint</id>
6969
<activation>
70-
<jdk>[11,)</jdk>
70+
<jdk>[1.8,11,)</jdk>
7171
</activation>
7272
<properties>
7373
<doclint>none</doclint>
@@ -149,6 +149,9 @@
149149
</goals>
150150
</execution>
151151
</executions>
152+
<configuration>
153+
<doclint>none</doclint>
154+
</configuration>
152155
<dependencies>
153156
<!-- https://issues.apache.org/jira/browse/MJAVADOC-517 -->
154157
<dependency>
@@ -177,8 +180,8 @@
177180
<artifactId>maven-compiler-plugin</artifactId>
178181
<version>3.7.0</version>
179182
<configuration>
180-
<source>11</source>
181-
<target>11</target>
183+
<source>1.8</source>
184+
<target>1.8</target>
182185
</configuration>
183186
</plugin>
184187
<plugin>

api/src/main/java/com/messagebird/objects/PurchasedNumbersFilter.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,14 @@ public void setType(PhoneNumberType type) {
106106
public HashMap<String, Object> toHashMap() throws GeneralException {
107107
final HashMap<String, Object> map = new HashMap<String, Object>();
108108
for (Field f: getClass().getDeclaredFields()) {
109-
if (f.canAccess(this)) {
110-
try {
111-
Object value = f.get(this);
112-
String key = f.getName();
113-
if (value != null) {
114-
map.put(key, value);
115-
}
116-
} catch (IllegalAccessException exception) {
117-
throw new GeneralException("Error converting to HashMap.");
109+
try {
110+
Object value = f.get(this);
111+
String key = f.getName();
112+
if (value != null) {
113+
map.put(key, value);
118114
}
115+
} catch (IllegalAccessException exception) {
116+
throw new GeneralException("Error converting to HashMap.");
119117
}
120118
}
121119
return map;

0 commit comments

Comments
 (0)