Skip to content
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

Re-assignment of audioInputStream removed #57

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Commits on Dec 18, 2019

  1. Configuration menu
    Copy the full SHA
    719d370 View commit details
    Browse the repository at this point in the history
  2. Update StreamPlayerMethodsTest.java

    Some unit tests are improved, but there are more to be done.
    HelgeStenstrom committed Dec 18, 2019
    Configuration menu
    Copy the full SHA
    0ef3d2f View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2019

  1. Update StreamPlayer.java

    Re-assignment of audioInputStream removed by changing
    audioInputStream = AudioSystem.getAudioInputStream(targetFormat, audioInputStream);
    
    to assignment of a new variable.
    Variable name changes: Initial audioInputStream changed to encodedAudioInputStream
    audioInputStream after the re-assignment now assigned to a field called decodedAudioInputStream.
    Old encodedAudioInputStream renamed to encodedAudioInputStreamCopy.
    HelgeStenstrom committed Dec 19, 2019
    Configuration menu
    Copy the full SHA
    611b279 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    afb30bc View commit details
    Browse the repository at this point in the history
  3. encodedAudioInputStream doesn't change, so it doesn't have to be vola…

    …tile.
    
    According to Sonar, Non-primitive fields should not be "volatile"
    For primitive fields volatile inhibits caching. This is only of interest of the field changes value, but this one doesn't. Since the field is an object reference, value change in this context means that it gets replaced with a different object, but it will not happen.
    
    See also https://wiki.sei.cmu.edu/confluence/display/java/CON50-J.+Do+not+assume+that+declaring+a+reference+volatile+guarantees+safe+publication+of+the+members+of+the+referenced+object
    HelgeStenstrom committed Dec 19, 2019
    Configuration menu
    Copy the full SHA
    357eacf View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2019

  1. Configuration menu
    Copy the full SHA
    68c67ca View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2019

  1. Improved and more complete unit tests.

    StreamPlayerMethodsTest still contains tests that don't pass. The tested methods are candidates for removal from StreamPlayer.
    
    All tests in StreamPlayerMethodsTest must be reviewed: Do they actually verify anything that need to be verified? Or are they too coupled with the current implementation?
    
    StreamPlayerFutureImprovementTest contains tests that currently fail. Failures are caused by behavior in StreamPlayer which I think is wrong or bad. But I may have misinterpreted the intended behavior.
    HelgeStenstrom committed Dec 22, 2019
    Configuration menu
    Copy the full SHA
    dca8c7a View commit details
    Browse the repository at this point in the history
  2. Merge pull request goxr3plus#59 from HelgeStenstrom/improveUnitTesting

    Improve unit testing
    goxr3plus committed Dec 22, 2019
    Configuration menu
    Copy the full SHA
    2905d6e View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2019

  1. Merge pull request goxr3plus#56 from HelgeStenstrom/removeNullChecks

    AudioSystem.getMixerInfo() will not return null, so we don't have to …
    goxr3plus committed Dec 31, 2019
    Configuration menu
    Copy the full SHA
    7f08cff View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2020

  1. Update README.md

    goxr3plus committed Jan 1, 2020
    Configuration menu
    Copy the full SHA
    8463821 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2020

  1. Update README.md

    goxr3plus committed Feb 27, 2020
    Configuration menu
    Copy the full SHA
    074a81b View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2020

  1. Update pom.xml

    goxr3plus committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    1ec869b View commit details
    Browse the repository at this point in the history
  2. Update StreamPlayer.java

    Re-assignment of audioInputStream removed by changing
    audioInputStream = AudioSystem.getAudioInputStream(targetFormat, audioInputStream);
    
    to assignment of a new variable.
    Variable name changes: Initial audioInputStream changed to encodedAudioInputStream
    audioInputStream after the re-assignment now assigned to a field called decodedAudioInputStream.
    Old encodedAudioInputStream renamed to encodedAudioInputStreamCopy.
    HelgeStenstrom committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    2cb8475 View commit details
    Browse the repository at this point in the history
  3. encodedAudioInputStream doesn't change, so it doesn't have to be vola…

    …tile.
    
    According to Sonar, Non-primitive fields should not be "volatile"
    For primitive fields volatile inhibits caching. This is only of interest of the field changes value, but this one doesn't. Since the field is an object reference, value change in this context means that it gets replaced with a different object, but it will not happen.
    
    See also https://wiki.sei.cmu.edu/confluence/display/java/CON50-J.+Do+not+assume+that+declaring+a+reference+volatile+guarantees+safe+publication+of+the+members+of+the+referenced+object
    HelgeStenstrom committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    d91395b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ef87e06 View commit details
    Browse the repository at this point in the history