-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SHRINKRES-325] Migrating Java language level to Java 8 #189
Conversation
@@ -67,7 +67,7 @@ private void verifyBuildContent(boolean shouldContain) { | |||
} | |||
|
|||
private void assertBuildStdoutContains(String expectedString, boolean shouldContain){ | |||
StringBuffer assertWarn = new StringBuffer("The build output printed on stdout should "); | |||
StringBuilder assertWarn = new StringBuilder("The build output printed on stdout should "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has nothing to do with JDK version, and it might be intentional if accessed from multiple threads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's any harm in using the StringBuilder. No other threads are accessing the same instance and StringBuilder should be faster, but in this case I don't mind having the StringBuffer back. Personally, I would keep the StringBuilder
@@ -32,7 +34,7 @@ public class ConfigurationStageTestCase { | |||
put("propertyKey1", "propertyValue1"); | |||
put("propertyKey2", "propertyValue2"); | |||
}}; | |||
final Map<String, String> shellEnvironments = new HashMap() {{ | |||
final Map<String, String> shellEnvironments = new HashMap<String, String>() {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final Map<String, String> shellEnvironments = new HashMap<String, String>() {{ | |
final Map<String, String> shellEnvironments = new HashMap<>() {{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually invalid due to the anonymous inner class, new HashMap<>()
won't even compile
This would work on JDK 9+, we're still on JDK 8
@petrberan needs rebase |
ed5b02c
to
c567b6e
Compare
https://issues.redhat.com/browse/SHRINKRES-325