Kengo's blog

Technical articles about original projects, JVM, Static Analysis and JavaScript.

original

SpotBugsプラグイン実装方法2017

過去にFindBugsプラグインの実装方法について記事にしたとおり、FindBugsプラグインの実装には複雑なハックが必要でした。特にfindbugs.xmlやmessages.xmlなどのメタデータ管理が煩雑でした。 FindBugsのバグパターンを実装する - Kengo's blog FindBugsのバ…

MSAキャッチアップ用プロジェクトを作りました

MSAは理屈が多く、手を動かさないとわからないことが多すぎるので作りました。 GitHub - KengoTODA/brownie: A distributed video converter ついでに非同期I/OとサーバサイドReactiveを学ぶためにVert.xとRxJavaを採用しています。Spring Framework 5は別で…

How to track state of operand stack by FindBugs 3.0.1

Yesterday I released findbugs-slf4j v1.2.0, which supports more useful analysis based on OpcodeStackDetector. Here I will summarize my problem and solution. What is TOP? Problem is that my detector could not track state of OpcodeStack, bec…

My acts on the WWW in 2013

I will summarize my online actions in this year. Old articles are below: My acts on the WWW in 2011 (Japanese) My acts on the WWW in 2012 personal products I have released several personal products, and 4 of them are important to explain m…

処理の流れに関連したFindBugsプラグインを作る2

前回残したTODOの消化。 今の理解が正しいなら、各BasicBlockごとにFactを計算しておいてあとでmeetさせるという話になるので、この辺りのロジックを読めば決着は付くだろう。 結論から言うと、当時の理解は正しかった。 ただすべてのBasicBlockのFactを計算…

処理の流れに関連したFindBugsプラグインを作る

端午节3連休中に調べたことのメモ。たぶんこれで@WillCloseと@WilCloseWhenClosedをサポートするdetectorが実装できるはず。 資源が確実に開放されるかを調べるDetectorを実装するときなど、ありうる処理の流れを列挙してその全てに対して正しい処理が行われ…

ウェブサービス系OSSの浸透を期待して開発環境を配布するまで

あるいはVagrantでplayframework 2.0系ウェブサービスの環境を立ち上げるまで。 PARTAKEの開発者がいまいち増えずチケットばかりが積み重なるのは、サービスという粒度が大きすぎて環境を作るのが面倒なことも一因だと思っています。ここを手助けできないか…

finsbugs-slf4j version 1.0.1 released

Today I released findbugs-slf4j version 1.0.1, since I got a bug report. Now that ClassNotFoundException problem has been fixed. Getting feedback is always great experience. I am very happy :) To use latest version, what you have to do is …

log: 2013/Feb/16~24

Outputs RequireJS dependency graph plugin I found that r.js does not execute define function because it uses AST. It means that wrapping define function has no meaning. I think I need to use parentMap to know dependency, but currently I ca…

log: 2013/Feb/4~15

Interests FireFox OS Currently I do not like Android and iOS, so I hope that this OS (or Ubuntu) become popular and make the market actively. But they would be minor... Outputs This week is long holiday (the head of lunar new year), so I d…

I deployed jsr305-maven-plugin

I deployed jsr305-maven-plugin to the Sonatype repository. It will be deployed to Maven central soon. If you need more information about this plugin, please check this article.

findbugs-slf4j:0.2 is released

Today I released new version of finsbugs-slf4j and deployed it to Maven central. bug fix fixed findbugs.xml update SLF4J_LOGGER_SHOULD_BE_PRIVATE bug pattern

findbugs-slf4j:0.1 released

Today I released finsbugs-slf4j and deployed it to Maven central. This project is a FinfBugs plugin to support SLF4J user. You can use it from your Maven project like below. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>2.5.2</version> </plugin>

findbugs-slf4j is updated

I have added test cases to findbugs-slf4j project. https://github.com/eller86/findbugs-slf4j It still has a TODO comment, so I cannot release it yet. I guess it needs 1 or 2 weeks to fix.

FindBugs plugin for SLF4J might be stable

I tested my FindBugs plugin for SLF4J by hands, and I think it is now stable. I will release it next week. Currently this plugin helps you to check the count of placeholder. For instance: class Foo { private final Logger logger = LoggerFac…

Drawing graph about dependency between AMD modules

Sometimes I want to know dependency between AMD modules graphically, because it might be helpful to understand complexity. Today I have tried to realize it. AMDモジュール間の依存関係をおおまかに把握したい時って結構あります。規約どおりの依…

log: 2012/Aug/27~Sep/2

Interests Severe bugs in Java7 I think Java 7 is not stable yet. When will we start to use? Programming education for young I got nothing at school about programming because there was no teacher & student who is interested in. But even tho…

FindBugsのバグパターンを実装する

SLF4J用PMDルールセットの実装に限界が見えたのでFindBugsに乗り換えました。で、FingBugsプラグイン実装関連の日本語情報がわりとないようなので、試行錯誤の過程を残しておきます。まだ自分も完全にはできていないので、情報をお持ちでしたらぜひご指摘く…

ruleset-for-SLF4J version 0.4 has been released

I fixed some NPE in version 0.3. eller86/ruleset-for-SLF4J · GitHub But I found that parsing code is not enough to detect bugs. For example, we cannot know the difference between: // this is OK, both of placeholder and parameter is only on…

ruleset-for-SLF4J version 0.2 has been released

New version of ruleset-for-SLF4J has been released! Now it helps you to check number of placeholder. https://github.com/eller86/ruleset-for-SLF4J There are few limitations to use. Please read document for detail.

SLF4JのポカミスをPMDで自動検出する

※本記事は昨日世に出た個人プロダクトruleset-for-SLF4Jの宣伝と解説です。 SLF4Jをお使いの方はで有用でコントロールしやすいログを出すための工夫の一貫として、Logger生成時に生成元クラスを渡しているはずです。 private final Logger logger = LoggerFa…

ruleset-for-SLF4J is now on Maven central!

I am excited to announce the ruleset-for-SLF4J is now on Maven central! Many thanks for sonatype!So, you can use it easily with Maven like: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>2.7.1</version> <dependencies> <dependency> <groupId>jp.…</groupid></dependency></dependencies></plugin>

memo: How to generate code automatically for Java project

There are many way to generate code automatically. I think that the most common way is Annotation Processing Tool and Pluggable Annotation Processing API, but always I use PMD or ASM because I'm familiar with these libraries. Annotation Pr…

jenkins-regression-report-plugin released

Today I released jenkins-regression-report-plugin at GitHub. It helps you to import CI into running project. GitHubでjenkins-regression-report-pluginをリリースしました。主に既存プロジェクトにCIを導入するケースを想定したものです。 eller86/j…

jsr305-maven-plugin 1.1 released

Today I've released new version for jsr305-maven-plugin. eller86/jsr305-maven-plugin · GitHub This plugin injects precondition check into class file. It means that you don't have to code boring check logics like if (argument == null) {...}…

Simple timer for LT

I've released a simple timer for lightning talk. This tool creates small window at front of your screen. So it's useful to measure left time for talking. ライトニングトーク用のタイマーをリリースしました。残り時間を画面の手前側に表示するた…

enchant.js templates are ready for English user

I've translated PRESS-START to English. Now English user can use this site to generate templates for enchant.js programming. PRESS START for enchant.js But I think it isn't enough for them to use enchant.js. For example, there is one user …

New game for learning Periodic Table

I've posted new game to 9leap. I designed this game for junior high school students to learn Periodic Table. This is the first version of this game, so it's very simple. 新しいゲームを9leapに投稿しました。中学生が周期表を学ぶために使えるゲ…

Rakefile generator for enchant.js

I've created a website which generates Rakefile for enchant.js programming in my GitHub pages. Currently it supports 3 plugins. Please try to use if you're interested in. 先日作ったRakefileを主要プラグインに対応させつつ汎用化しました。Init…

Ruleset for SLF4J has been updated

Today I updated ruleset for SLF4J. There is no enhancement but many fixing. ruleset for SLF4Jを更新しました。バグ修正が主な変更となっています。 Comparing 3fefc4f29b...a9dd209 · eller86/ruleset-for-SLF4J · GitHub The biggest fix is avoiding…

PMD ruleset for SLF4J

I wanted to use ruleset to validate my codes so I asked to ML of SLF4J, but there is no tool to help. So I've created a PMD ruleset for SLF4J. It may help to code with unified valid logging. コードを統一するためのルールセットがほしくてSLF4…

Goodbye, checkNotNull

Precondition checking like null-checking is very important element for program, but sometimes it becomes boring because it's a defensive technique and far apart from our purpose -- hacking. nullチェックのような前提条件確認はプログラムにお…

released Brainf*ck implementation on Java7

I've released Brainjack at GutHub. It's a Java7 implementation of the Brainf*ck programming language. Brainf*ckのJava7実装をGitHubで公開しました。以前の記事で触れた、バイトコードを吐くコンパイラが含まれています。 eller86/Brainjack - GitHub…

remtterクローンのサービス @twistoire を終了しました

twistoireをトップページだけ残して停止しました。ご利用いただいた皆様、ありがとうございました。 以下、技術者が読むという想定のもとに終了の経緯とふりかえりをだらだら書きます。 終了の理由 大きく分けて3つあります。 私がTwitterをあまり使わなくな…

JVM用KEMURIインタプリタとコンパイラを実装

最近JavaScriptばかり書いていたためか無性にJVMと戯れたくなったので、KEMURIの実行環境を作成しました。 eller86/JKEMURI · GitHub 単なるインタプリタとJavaのclassファイルを生成するコンパイラがあります。インタプリタは以前実装したことがあるのです…