I would clarify "We had broken the Japanese code (JN-25)." JN-25 had lookup tables changed often enough to be a real problem, and was being decrypted, as I recall, at about 10% of the characters in a message in about one fourth of the intercepts at that time. Rochefort was heavily reliant on traffic analysis for his Midway call. A brilliant job, actually.
To go on with the story, "Admiral Nimitz was CinCPAC and had the guts to support Rochefort (OIC of HYPO at Pearl) in his conviction that AF was Midway." Nimitz was an astonishingly good judge of character, an actually superior man. Rochefort was nearly insane from extreme concentration, extreme pressure, and cryptanalysis. Only true obsession could get Rochefort's job done, and Rochefort did his duty. Rochefort slept little, and when he did he dreamed enemy traffic. I think he was working twenty four hour days, and using too much benzedrine. Nimitz backed Rochefort when Rochefort suffered under extreme and widespread skepticism.