Skip to content

Commit

Permalink
GEODE-3: small java 9 compatibility fixes
Browse files Browse the repository at this point in the history
Co-authored-by: Owen Nichols <onichols@pivotal.io>

* fix InstallerJUnitTest
* -64 options will be removed in java9 and later for all platforms (fix DeprecatedAgentLauncherIntegrationTest)
* PowerMock needs to ignore more modules in PulseControllerJunitTest in java9
  • Loading branch information
jinmeiliao committed Sep 17, 2018
1 parent 9c6ae18 commit e43f8d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.apache.geode.modules.session.installer;

import static org.junit.Assert.assertEquals;
import static org.assertj.core.api.Assertions.assertThat;

import java.io.ByteArrayOutputStream;
import java.io.File;
Expand Down Expand Up @@ -55,7 +55,7 @@ private void testTransformation(final String name) throws Exception {
.replaceAll(IOUtils.LINE_SEPARATOR_WINDOWS, "").replaceAll(IOUtils.LINE_SEPARATOR_UNIX, "");
String actual = output.toString().replaceAll(IOUtils.LINE_SEPARATOR_WINDOWS, "")
.replaceAll(IOUtils.LINE_SEPARATOR_UNIX, "");
assertEquals(expected, actual);
assertThat(actual).isEqualToIgnoringWhitespace(expected);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,6 @@ private String[] defineCommand(final String[] jvmArguments, String workingDir)
argumentList.add("-classpath");
argumentList.add(manifestJar);

// -d64 is not a valid option for windows and results in failure
final int bits = Integer.getInteger("sun.arch.data.model", 0).intValue();
if (bits == 64 && !(System.getProperty("os.name").toLowerCase().contains("windows"))) {
argumentList.add("-d64");
}

argumentList.add("-Djava.library.path=" + System.getProperty("java.library.path"));

if (jvmArguments != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
@PowerMockRunnerDelegate(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration("classpath*:mvc-dispatcher-servlet.xml")
@PowerMockIgnore("javax.management.*")
@PowerMockIgnore({"javax.management.*", "javax.xml.*", "org.xml.*", "org.w3c.*"})
public class PulseControllerJUnitTest {

private static final String PRINCIPAL_USER = "test-user";
Expand Down

0 comments on commit e43f8d1

Please sign in to comment.