Tencent / VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.
Other
11.8k stars 1.61k forks source link

a bunch of updates / fixs. #322

Open XenoAmess opened 5 years ago

XenoAmess commented 5 years ago

add pom here and fix the pom.

  1. Suggest using semver for versioning.

  2. A version at github shall always be a SNAPSHOT version.

  3. The license license.url in your pom does not point to a BSD license as you said in license.name Just point it to your LICENSE file in github repo is a better choice.

  4. Specify java.version in properties.

  5. Specify source/target version in maven compiler plugin.

  6. Add maven-site-plugin and maven-project-info-reports-plugin to make sure when you run mvn site, a javadoc will generate and link to the generated site.

  7. Update maven dependencies to latest version.

  8. Update other dependencies to latest version of same major version.

  9. refine .gitignore for excluding .iml s and target folders.

fix bugs and malformed codes.

1. in class ServletOutputStreamCopier:

1.1 field ByteArrayOutputStream copy shall be final.

1.2 public boolean isReady()infinite loop itself.

1.3 public void setWriteListener(WriteListener writeListener) infinite loop itself.

2. in class TemplateReplace:

2.1 Don't create a StringBuilder for just 2 or 3 params. Just use + will be a faster / neater choice

3. in class SonicUtil:

3.1 Don't return inside a try block. Inside return it afterwards. And, you didn't use the local String encryptText. Even if you intend to return from the try block, you shall return null directly after the catch block.

Return in try block will always cause problem for maintainers so really not recommended to do so.

add missing @override.

specify init capacity for HashMap for better performance.

tencent-adm commented 5 years ago

CLA assistant check
All committers have signed the CLA.