FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

exception type and other util by thinkAfCod · Pull Request #42 · optimism-java/hildr · GitHub

exception type and other util - #42

Merged
GrapeBaBa merged 2 commits into
optimism-java:mainfrom
thinkAfCod:exception
Aug 16, 2023
Merged

exception type and other util#42
GrapeBaBa merged 2 commits into
optimism-java:mainfrom
thinkAfCod:exception

Conversation

Copy link
Copy Markdown
Collaborator

exception type and util

Copy link
Copy Markdown
Collaborator Author

#37

* @since 0.1.1
*/
public class CompressorFactory {
public class RandomUtil {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

这个也不需要,依赖的库里面有

* @param channelId channelId
* @param frameNumber channel frame number
*/
public record TxData(byte[] data, byte[] channelId, int frameNumber) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

这个node里面有吗?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

这个是frame变了一个形式,可直接使用Frame,已移除

* either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

包名不要缩写,另外exception不用都放一块,除非是会共用的

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

好的,这个是公共的,不同的包内都会使用

if (p.length > avail) {
readLen = avail;
}
System.arraycopy(data, pos, p, 0, readLen);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

可以用arrayUtils或者arrays简化下代码吧,你看下node里面的batches

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

这里需要把数据填充到参数里的byte[]里。
ArrayUtils和Arrays工具都是返回一个新创建的数组,没办法替换System.arraycopy这个操作。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

copy应该也有工具方法吧

GrapeBaBa merged commit af7c08e into optimism-java:main Aug 16, 2023
thinkAfCod deleted the exception branch December 5, 2023 08:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL