This commit is contained in:
Looly
2023-04-22 02:36:32 +08:00
parent 7387150f1a
commit 16e05bf9f5
108 changed files with 1244 additions and 857 deletions

View File

@@ -17,7 +17,7 @@ import org.dromara.hutool.core.bean.copier.CopyOptions;
import org.dromara.hutool.core.bean.copier.ValueProvider;
import org.dromara.hutool.core.collection.ListUtil;
import org.dromara.hutool.core.collection.iter.ArrayIter;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import org.dromara.hutool.core.io.file.FileUtil;
import org.dromara.hutool.core.io.IORuntimeException;
import org.dromara.hutool.core.io.IoUtil;
@@ -557,7 +557,7 @@ public class JakartaServletUtil {
writer.write(text);
writer.flush();
} catch (final IOException e) {
throw new UtilException(e);
throw new HutoolException(e);
} finally {
IoUtil.closeQuietly(writer);
}
@@ -649,7 +649,7 @@ public class JakartaServletUtil {
out = response.getOutputStream();
IoUtil.copy(in, out, bufferSize);
} catch (final IOException e) {
throw new UtilException(e);
throw new HutoolException(e);
} finally {
IoUtil.closeQuietly(out);
IoUtil.closeQuietly(in);

View File

@@ -17,7 +17,7 @@ import org.dromara.hutool.core.bean.copier.CopyOptions;
import org.dromara.hutool.core.bean.copier.ValueProvider;
import org.dromara.hutool.core.collection.ListUtil;
import org.dromara.hutool.core.collection.iter.ArrayIter;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import org.dromara.hutool.core.io.file.FileUtil;
import org.dromara.hutool.core.io.IORuntimeException;
import org.dromara.hutool.core.io.IoUtil;
@@ -568,7 +568,7 @@ public class ServletUtil {
writer.write(text);
writer.flush();
} catch (final IOException e) {
throw new UtilException(e);
throw new HutoolException(e);
} finally {
IoUtil.closeQuietly(writer);
}
@@ -660,7 +660,7 @@ public class ServletUtil {
out = response.getOutputStream();
IoUtil.copy(in, out, bufferSize);
} catch (final IOException e) {
throw new UtilException(e);
throw new HutoolException(e);
} finally {
IoUtil.closeQuietly(out);
IoUtil.closeQuietly(in);

View File

@@ -20,7 +20,7 @@ import java.nio.charset.Charset;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import org.dromara.hutool.core.exceptions.UtilException;
import org.dromara.hutool.core.exceptions.HutoolException;
import org.dromara.hutool.core.util.CharsetUtil;
import org.dromara.hutool.core.util.XmlUtil;
@@ -97,7 +97,7 @@ public class SoapUtil {
try {
messageToString = out.toString(charset.toString());
} catch (final UnsupportedEncodingException e) {
throw new UtilException(e);
throw new HutoolException(e);
}
return pretty ? XmlUtil.format(messageToString) : messageToString;
}