Package org.apache.calcite.util
Class Unsafe
java.lang.Object
org.apache.calcite.util.Unsafe
Contains methods that call JDK methods that the
 forbidden
 APIs checker does not approve of.
 
This class is excluded from the check, so methods called via this class will not fail the build.
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidclear(StringWriter sw) Clears the contents of aStringWriter.static voidCallsObject.notifyAll().static StringregexpReplace(String s, Pattern pattern, String replacement, int pos, int occurrence) Helper for the SQLREGEXP_REPLACEfunction.static voidsystemExit(int status) CallsSystem.exit(int).static voidCallsObject.wait().
- 
Method Details- 
systemExitpublic static void systemExit(int status) CallsSystem.exit(int).
- 
notifyAllCallsObject.notifyAll().
- 
waitCallsObject.wait().- Throws:
- InterruptedException
 
- 
clearClears the contents of aStringWriter.
- 
regexpReplacepublic static String regexpReplace(String s, Pattern pattern, String replacement, int pos, int occurrence) Helper for the SQLREGEXP_REPLACEfunction.It is marked "unsafe" because it uses StringBuffer; Versions ofMatcher.appendReplacement(StringBuffer, String)andMatcher.appendTail(StringBuffer)that useStringBuilderare not available until JDK 9.
 
-