Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openmrs/openmrs-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: edb4b985654c
Choose a base ref
...
head repository: openmrs/openmrs-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cbd72b476f00
Choose a head ref
  • 2 commits
  • 9 files changed
  • 2 contributors

Commits on Jan 17, 2014

  1. TRUNK-4224 SonarQube - method invokes inefficient Number constructor;…

    … use static valueOf instead
    Krzysztof Kaczmarczyk committed Jan 17, 2014
    Copy the full SHA
    52b19b8 View commit details
  2. Merge pull request #554 from kkaczmarczyk/TRUNK-4224

    TRUNK-4224 SonarQube - method invokes inefficient Number constructor; use static valueOf instead
    rkorytkowski committed Jan 17, 2014
    Copy the full SHA
    cbd72b4 View commit details
2 changes: 1 addition & 1 deletion api/src/main/java/org/openmrs/PersonName.java
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ public boolean equalsContent(PersonName otherName) {
public static PersonName newInstance(PersonName pn) {
if (pn == null)
throw new IllegalArgumentException();
PersonName newName = new PersonName(new Integer(pn.getPersonNameId()));
PersonName newName = new PersonName(Integer.valueOf(pn.getPersonNameId()));
if (pn.getGivenName() != null)
newName.setGivenName(new String(pn.getGivenName()));
if (pn.getMiddleName() != null)
Original file line number Diff line number Diff line change
@@ -119,7 +119,7 @@ public boolean hasDuplicateUsername(String username, String systemId, Integer us
systemId = "-";

if (userId == null)
userId = new Integer(-1);
userId = Integer.valueOf(-1);

String usernameWithCheckDigit = username;
try {
Loading