Skip to content

Commit

Permalink
StrBuilder: remove commented-out code
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalSchumacher committed May 4, 2017
1 parent aa2a77e commit d4890a8
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/main/java/org/apache/commons/text/StrBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -2716,37 +2716,6 @@ public void appendTo(final Appendable appendable) throws IOException {
}
}

//-----------------------------------------------------------------------
// /**
// * Gets a String version of the string builder by calling the internal
// * constructor of String by reflection.
// * <p>
// * WARNING: You must not use the StrBuilder after calling this method
// * as the buffer is now shared with the String object. To ensure this,
// * the internal character array is set to null, so you will get
// * NullPointerExceptions on all method calls.
// *
// * @return the builder as a String
// */
// public String toSharedString() {
// try {
// Constructor con = String.class.getDeclaredConstructor(
// new Class[] {int.class, int.class, char[].class});
// con.setAccessible(true);
// char[] buffer = buf;
// buf = null;
// size = -1;
// nullText = null;
// return (String) con.newInstance(
// new Object[] {Integer.valueOf(0), Integer.valueOf(size), buffer});
//
// } catch (Exception ex) {
// ex.printStackTrace();
// throw new UnsupportedOperationException("StrBuilder.toSharedString is unsupported: " + ex.getMessage());
// }
// }

//-----------------------------------------------------------------------
/**
* Checks the contents of this builder against another to see if they
* contain the same character content ignoring case.
Expand Down

0 comments on commit d4890a8

Please sign in to comment.