There hasn’t been much reason for optimism for the Yankees this season, which is why when Robinson Cano took a 96 mph Matt Harvey fastball off his right quadriceps in the first inning of last night’s 3-0 American League All-Star Game win, the fear was that it would be the team’s latest serious injury.

“That didn’t go through my mind,” Cano said after X-rays came back negative.

The drilling occurred hours after Cano’s father reiterated his belief that the second baseman would remain with the Yankees beyond this season, just as he did during spring training.

Jose Cano, with his son now just over three months away from free agency — and armed with a new agent — hasn’t changed his opinion.

“I’m still thinking the same way,” the elder Cano said. “We’re not gonna talk about the contract right now. We’re gonna wait. But like I said, I wish he could stay here and finish his career here.”

Robinson has been reluctant to discuss his future and yesterday was no different. When told of his father’s most recent comments, Cano replied: “No comment. Next question. I’m not saying anything about the contract.”

Though some have thought Cano’s recent dumping of agent Scott Boras and new affiliation with Jay-Z’s Roc Nation might increase Cano’s odds of staying in The Bronx, Cano has insisted that’s not the case.

Still, it’s clear where his father expects him to end up.

“I’m confident the Yankees will come up with something good [at] the end of the season,” Jose said. “I hope that he can stay here.”

He did acknowledge the decision is up to his son.

“We’ll talk as a family, but he’s gonna be the one to make the decision in the end,” Jose said. “We can say ‘Yes,’ ‘No,’ but he’s the one. Whatever decision he makes, he’s gonna ask me first.”

Before he gets to free agency, Robinson has more work to do on the field. And it’s work that he would like to resume Friday after icing and resting the quad for the remainder of the break.

“It was feeling tight and I didn’t want to aggravate it,” Cano said. “It’s not pain, but I [didn’t] want to take my chances. I don’t want to make it worse. It would be different in the regular season. This is the All-Star game. You have to be smart.”